Settings → Developers is where API keys, outbound webhooks, the MCP connection and request logs live.
API keys
Create a key with a name, a scope (read-only or read + write) and a per-minute limit. The full key is shown once and starts with wx_live_. Wexlyn stores only a peppered SHA-256 hash, so keep your copy safe. Revoke any time; the last-used time is shown per key. Keys belong to the account that was active when you created them.
REST API v1
Base URL https://app.wexlyn.ai/api/v1, bearer authentication, JSON in and out. The OpenAPI 3.1 description is served at /api/v1/openapi.json.
# Who am I
curl https://app.wexlyn.ai/api/v1/me -H "Authorization: Bearer wx_live_..."
# Search leads
curl "https://app.wexlyn.ai/api/v1/leads?search=jane" -H "Authorization: Bearer wx_live_..."
# Record a sale (write key)
curl -X POST https://app.wexlyn.ai/api/v1/sales \
-H "Authorization: Bearer wx_live_..." -H "Content-Type: application/json" \
-d '{"email":"jane@example.com","amount":997,"currency":"USD","order_id":"A1001","product":"Coaching program"}'
# Performance report, Scientific model, last 30 days, grouped by campaign
curl "https://app.wexlyn.ai/api/v1/reports/performance?model=scientific&groupBy=campaign" \
-H "Authorization: Bearer wx_live_..."
| Endpoint | Scope | What it does |
|---|---|---|
GET /me | read | Account and key scopes |
GET /leads, GET /leads/{id} | read | Search leads; one lead with sales, calls and journey |
POST /leads, POST /leads/{id}/stage | write | Create/identify a lead; move it to a stage |
GET /sales, POST /sales | read / write | List sales; record a sale (deduped by order_id) |
GET /subscriptions, POST /subscriptions | read / write | List subscriptions; record or update one (one record per subscription_id) |
GET /calls, POST /calls | read / write | List calls; record a call with outcome and closer |
GET /sources, POST /sources | read / write | List sources; create a manual source with its ?sl= link |
GET /reports/performance | read | The Performance report with every setting the UI has |
GET /reports/ads | read | Ad-level metrics keyed by platform ids (what the Chrome extension reads) |
GET /reports/entity-drill | read | The sales, calls or leads behind one number of one campaign, ad set or ad: platform, level, id, column, plus from, to, model. Newest 200 |
| Agency keys | read / write | A key created from the Agency Hub reaches every client account: add Wexlyn-Account: <account id> (the public id from the Clients page) on each call; GET /me without it lists the accounts |
POST /aevent/events | write | Webinar registrations and attendance from AEvent's built-in Wexlyn integration (one registrant or a batch of up to 500; see Connecting AEvent) |
Errors come back as { "error": { "code", "message" } } with 401 (bad key), 403 (missing scope), 422 (validation), 429 (rate limit). Re-sending a sale with the same order_id updates instead of duplicating.
Webhooks
Sale recorded
Stripe webhook
Wexlyn signs it
X-Wexlyn-Signature · HMAC
Your endpoint
verify, then act
POST https://yourapp.com/hooks/wexlyn
X-Wexlyn-Signature: t=1760000000,v1=9f2a…
{ "type": "sale.created", "data": { "amount": 2400, "source": "meta/webinar/hook-a" } }Endpoints live under Settings → Developers, on the Webhooks tab (1): enter the address, switch on the events it should receive and press Add endpoint (2). Send test (3) posts a sample delivery to an endpoint you already have.
Register an https endpoint and pick events: lead.created, lead.stage_changed, sale.created, call.created, subscription.updated. Every delivery is a JSON POST:
{ "id": "evt_…", "event": "sale.created", "created_at": "2026-10-08T21:30:00Z",
"data": { "order_id": "…", "lead_id": "…", "amount": 997, "currency": "USD", "products": ["Coaching program"] } }
Headers: Wexlyn-Event, Wexlyn-Delivery and Wexlyn-Signature: t=<unix>,v1=<hex> where v1 = HMAC_SHA256(secret, t + "." + body). Reject anything older than five minutes or with a bad signature. Non-2xx answers retry after 1, 5, 30, 120 and 720 minutes; the delivery log shows every attempt and lets you retry or send a test ping.
MCP server
Claude Code, Claude Desktop and claude.ai can talk to your account through https://app.wexlyn.ai/api/mcp (Streamable HTTP). Authenticate with an API key in the Authorization header:
claude mcp add --transport http wexlyn https://app.wexlyn.ai/api/mcp \
--header "Authorization: Bearer wx_live_..."
Tools: list_accounts, get_account, list_sources, get_performance_report, search_leads, get_lead, list_sales, list_calls with any key, plus create_lead, create_sale, create_call, set_lead_stage with a write key. Every call shows under Request logs with source MCP.
An agency key (one key for every client account) works here too: each tool takes an account argument with the client account's name or id, and list_accounts names them.
Claude and other MCP clients
Wexlyn is a connector for Claude, Grok and ChatGPT. In claude.ai or Claude Desktop open Settings → Customize → Connectors, find Wexlyn in the directory (or Add custom connector with https://app.wexlyn.ai/api/mcp) and press Connect: a Wexlyn sign-in opens, you choose one account or all of your accounts (an agency reaches every client account from one connection) and allow read (or read and write) access, and Claude can then run every tool below. With several accounts the assistant calls list_accounts and passes the account's name as the account argument of each tool; a call that names no account is refused with the list of accounts. In Grok open grok.com/connectors, choose New Connector → Custom, paste the same URL and save. In ChatGPT (Business, Enterprise and Edu) turn on Developer mode under Settings → Apps → Advanced settings, then Settings → Apps → Create, paste the URL, choose OAuth, press Scan Tools and sign in; on the plugins page (chatgpt.com/plugins) press + → Add custom MCP server. In Claude Code run claude mcp add --transport http wexlyn https://app.wexlyn.ai/api/mcp and type /mcp to sign in. Cursor and other MCP clients work the same way (OAuth 2.1 with PKCE, dynamic client registration open to any client, client ID metadata documents, metadata at /.well-known/oauth-authorization-server). The consent screen names the app that is asking, and every connected session is listed under Settings → Integrations → AI Assistants (one tile each for Claude, Grok and ChatGPT), where it can be disconnected. ChatGPT's deep research and company knowledge use the search and fetch tools; get_health returns the hourly health alerts and get_match_quality the ad-platform match-quality check, so a scheduled task in your assistant can run a morning check-in; the rest of the catalogue is shared by every client.
Zapier
Wexlyn has its own Zapier app. Open the Zapier card under Settings → Integrations and add the app with the invite button, then connect it with an API key that has read and write access (Settings → API keys).
- Triggers: New Sale, New Lead, New Call Booked, Lead Stage Changed. They are instant: Zapier subscribes through
POST /api/v1/hooksand Wexlyn delivers the same signed payload as any outbound webhook. - Actions: Send Sale / Conversion, Create or Update Lead, Log Call, Update Lead Stage (the stage dropdown comes from Settings → Lead stages, and a name that is not on that list yet is added to it;
POST /api/v1/leads/stageandGET /api/v1/stagesbehind it). Each takes the person's email or phone, optional UTM values and click ids (fbclid,gclid,ttclid,msclkid) so the record lands on the right ad, and is idempotent onorder_id/call_id/ email. - Search: Find Lead by email or phone, also available as Find or Create Lead.
The same endpoints work from any HTTP client: GET /api/v1/leads/find?email=…, POST /api/v1/hooks with { "target_url", "event" } (events lead.created, lead.stage_changed, sale.created, call.created, call.booked, subscription.updated) and DELETE /api/v1/hooks/{id}.
Subscriptions and lifetime value
Lifetime value is worked out from sales, so every charge has to reach Wexlyn as its own sale: the first payment and each renewal, with the same email (or external_id) for the person, a unique and stable order_id per charge, the real charge time in date, and the plan as product. A refund is the same order_id sent again with "status": "refunded".
A subscription record adds what sales alone cannot show: monthly recurring revenue, who is active, trialing or past due, and who canceled when. Send one when a subscription starts and again whenever it changes:
curl -X POST https://app.wexlyn.ai/api/v1/subscriptions \
-H "Authorization: Bearer wx_live_..." -H "Content-Type: application/json" \
-d '{"email":"jane@example.com","subscription_id":"sub_1001","status":"active","plan":"Pro monthly","amount":49,"currency":"USD","interval":"month","started_at":"2026-11-01T15:04:05Z"}'
| Field | Required | Notes |
|---|---|---|
email, phone or external_id | one of them | The person; the same value you send with their sales |
subscription_id | yes | Your id for the subscription. Sending it again updates the record instead of adding one |
amount | yes | The price of one billing period, in currency (default USD) |
interval | no | day, week, month (default) or year |
status | no | active (default), trialing, past_due, canceled, paused, incomplete |
plan | no | Plan name as you want to see it in Wexlyn |
started_at, canceled_at, current_period_end | no | ISO 8601 times. A canceled subscription sent without canceled_at is dated at the time of the call |
test | no | true keeps it out of the numbers |
Fields left out of a later call keep their stored value, so a status change can be as short as {"email":"jane@example.com","subscription_id":"sub_1001","status":"canceled","amount":49}. Monthly recurring revenue counts a subscription while it is active or past_due; a yearly price is divided by twelve. Each change also fires the subscription.updated webhook event.
Your own definition of "new"
New Customers (and Cost per New Customer) count people whose first ever sale is in the date range, and New Leads count people Wexlyn saw for the first time. Both are judged from what Wexlyn holds, so somebody who bought or signed up before you started sending data looks new. Two ways to make them match your own books:
- Say it yourself. Add
"new_customer": trueorfalsetoPOST /api/v1/saleswhen your system knows whether this is the person's first purchase (a first-time donor, a first order). Wexlyn then takes your answer instead of working it out. - Load the history once. Import past customers and subscribers with their original dates (CRM → Sales → Import and CRM → Leads → Import, with the file's date column mapped to Date; or
POST /api/v1/saleswithdateset to the original time). Everyone already on file then stops counting as new.
To report them under your own names, add custom metrics under Settings → Custom metrics, for example "New donors" as newCustomers, "Cost per new donor" as cost / newCustomers, "Net new leads" as newLeads and "Cost per net new lead" as cost / newLeads. They appear as columns in every report and widget.
Dates and times
Any time you send (occurred_at or date on a sale, scheduled_at on a call, a subscription's dates, and the Sale time field of the Zapier step) can be written as 2026-11-19T14:30:00Z, with an offset such as 2026-11-19T14:30:00+13:00, as a plain day 2026-11-19, or as Unix time. A time without a zone is read as UTC. A sale sent with a time lands on that day in your reports; without one it is dated now.
Make and n8n
For other no-code tools use the Make / n8n / Webhook integration under Settings → Integrations: it gives you a private URL that accepts the same lead, sale, call and stage payloads without an API key, or call the REST API above with a key.
Match keys on leads and sales
POST /api/v1/leads and POST /api/v1/sales take, besides the person, the browser facts you have: fbclid, gclid, msclkid, ttclid, fbc, fbp, ip, user_agent, the utm_* values, and the address city, state, zip, country. Wexlyn stores them on the person and sends them to Meta, Google and the other platforms with every conversion as match keys. A sale pushed from a data warehouse with an email alone matches far fewer people than one with the phone, name, postcode and the click id of the visit; send what you have.