REST API
REST API
Last updated: 3 November 2026
Use this API from your own application. It performs the same CRM operations as MCP, except the three assistant widgets. Those widgets are not REST resources.
The current contract for this API, Zapier, Salesforce API v2, and MCP is the API reference (PDF).
YouEx.ai does not publish a general-purpose API key. A caller authenticates as one product. In-app session APIs are internal and are not part of this contract.
The REST API is included on Professional and Enterprise (restApi).
Base URL
https://engage.youex.ai/api/v1
Paths below are relative to that base.
Which API to use
| Need | API | Plan |
|---|---|---|
| CRM create, read, update, delete, and webhooks from Zapier | Zapier API | Professional or Enterprise (zapierIntegration) |
| CRM, email, research, and engagement from your own application | REST API | Professional or Enterprise (restApi) |
| CRM, research, enrich, and agents from the Salesforce package | Salesforce API v2 | Professional or Enterprise (salesforcePackage) |
| Lead sync from Salesforce | Salesforce API v2 bulk upsert | Professional or Enterprise (salesforcePackage) |
| An assistant such as Claude or ChatGPT operating the CRM | MCP | Every plan (mcpIntegration) |
A token never grants access to every workspace the user belongs to.
Authentication
Send:
Authorization: Bearer <access_token>
Content-Type: application/json
X-YouEx-Workspace-Id: <workspace-id>
The token is an Auth0 access token from Authorization Code with PKCE. The audience is https://engage.youex.ai/api/v1.
These tokens are rejected:
- a website, MCP, Zapier, or Salesforce token
- a client-credentials token
- a cookie session
Owners and Admins of a workspace with API access see the client ID, authorize URL, and token URL under Workspace Settings → Integrations. The authorize request uses scope=openid email profile crm:read crm:write, plus a PKCE code_challenge. YouEx registers the application's redirect URL.
crm:write does not include crm:read. Request both when the application does both.
| Scope | Allows |
|---|---|
crm:read | List, get, find, summary, engagement, history, and research read |
crm:write | Create, update, delete, send, schedule, research refresh, and bulk delete |
Workspace
Send X-YouEx-Workspace-Id for a workspace the user belongs to.
- If the header is omitted and the user has exactly one workspace with API access, that workspace is used.
- If the user has more than one, the API returns
workspace_selection_requiredand the eligible workspace ids and names.
Profile → Integration Workspace is not used. That setting is for MCP and Zapier.
{
"error": "workspace_selection_required",
"error_description": "Send the X-YouEx-Workspace-Id header. This user belongs to more than one workspace with API access.",
"workspaces": [{ "id": "ws_123", "name": "Acme" }]
}
Limits and errors
300 authenticated requests per user per 15 minutes. Over the limit, the API returns 429.
{ "error": "unauthorized", "error_description": "Missing or invalid Authorization header" }
{ "error": "invalid_token", "error_description": "Token validation failed" }
{ "error": "insufficient_scope", "error_description": "Missing required scopes: crm:read" }
| Status | Meaning |
|---|---|
| 200 | Read, update, or delete succeeded |
| 201 | Create succeeded when the operation reports that |
| 400 | Invalid payload, or the operation rejected the request |
| 401 | Missing or invalid token |
| 402 | Subscription is inactive |
| 403 | Missing scope, the user is not a member, or the REST API is not enabled |
| 404 | Record was not found in this workspace |
| 409 | More than one eligible workspace and the header was omitted |
| 429 | Rate limit exceeded |
| 503 | This environment is not configured for the API |
Conventions
- Ids travel in the path. Filters travel in the query. Creates and updates are JSON bodies.
- A path id overrides the same field in the body.
- List filters match the MCP operation for that path, including
cursor,limit,searchTerm,status,tag, andtimeframewhere that operation publishes them. - When a list has more rows, send the returned cursor back as
cursor. - A successful call returns that operation's JSON object.
GETof one lead, contact, company, or opportunity returns{ "lead": {} }(orcontact,company,opportunity).- Created leads are stored with source
MCP Tool, because these routes use the same operations as MCP. - Engagement reads omit IP address, precise location, and raw user agent.
- Research text is omitted from list and search results.
- Opportunities have no research report.
Shared CRM values
These values are the same on every surface that writes CRM records.
| Field | Values |
|---|---|
| Lead status on create | New, VIP, Hot, Warm, Cold, Opportunity. Reads can also return Converted and Lost. |
| Contact status | Active, Inactive, Do Not Contact |
| Company type | Customer, Competitor, Vendor, Partner, Other |
| Company status | Active, Inactive, Prospect, Former |
| Opportunity stage | Prospecting, Qualification, Needs Analysis, Proposal, Negotiation, Closed Won, Closed Lost |
companyId, contactId, opportunityId, and sourceLeadId must already belong to the same workspace. A reference to another workspace is rejected.
Summary
| Method | Path | Scope |
|---|---|---|
| GET | /summary | crm:read |
Leads
| Method | Path | Scope | Purpose |
|---|---|---|---|
| GET | /leads | crm:read | List leads |
| POST | /leads | crm:write | Create a lead |
| GET | /leads/find | crm:read | Find leads |
| POST | /leads/bulk-delete | crm:write | Delete leads by exact email |
| GET | /leads/:id | crm:read | Read one lead |
| PATCH | /leads/:id | crm:write | Update a lead |
| DELETE | /leads/:id | crm:write | Delete a lead |
| GET | /leads/:id/engagement | crm:read | Page views, clicks, and chats |
| GET | /leads/:id/page-views | crm:read | Page-view events |
| GET | /leads/:id/conversations | crm:read | Chat transcripts |
| GET | /leads/:id/history | crm:read | Lifecycle history |
| GET | /leads/:id/research | crm:read | Stored research report |
| POST | /leads/:id/research | crm:write | Start a research run |
Lead create fields: name, email, secondaryEmail, phone, company, companyWebsite, linkedinUrl, title, pronouns, status, notes.
POST /leads/bulk-delete body:
{ "emails": ["avery@example.com"] }
POST /leads/:id/research starts a new research run.
Contacts
| Method | Path | Scope | Purpose |
|---|---|---|---|
| GET | /contacts | crm:read | List contacts |
| POST | /contacts | crm:write | Create a contact |
| GET | /contacts/find | crm:read | Find contacts |
| GET | /contacts/:id | crm:read | Read one contact |
| PATCH | /contacts/:id | crm:write | Update a contact |
| DELETE | /contacts/:id | crm:write | Delete a contact |
| GET | /contacts/:id/research | crm:read | Stored research report |
| POST | /contacts/:id/research | crm:write | Start a research run |
Companies
| Method | Path | Scope | Purpose |
|---|---|---|---|
| GET | /companies | crm:read | List companies |
| POST | /companies | crm:write | Create a company |
| GET | /companies/find | crm:read | Find companies |
| GET | /companies/:id | crm:read | Read one company |
| PATCH | /companies/:id | crm:write | Update a company |
| DELETE | /companies/:id | crm:write | Delete a company |
| GET | /companies/:id/research | crm:read | Stored research report |
| POST | /companies/:id/research | crm:write | Start a research run |
Opportunities
| Method | Path | Scope | Purpose |
|---|---|---|---|
| GET | /opportunities | crm:read | List opportunities |
| POST | /opportunities | crm:write | Create an opportunity |
| GET | /opportunities/find | crm:read | Find opportunities |
| GET | /opportunities/:id | crm:read | Read one opportunity |
| PATCH | /opportunities/:id | crm:write | Update an opportunity |
| DELETE | /opportunities/:id | crm:write | Delete an opportunity |
Opportunities have no research report.
Actions and reminders
Action types are meeting, text, email, call, and other. An action is either logged or scheduled.
GET /crm-actions takes objectType and objectId.
| Method | Path | Scope | Purpose |
|---|---|---|---|
| GET | /crm-actions | crm:read | List actions for a record |
| POST | /crm-actions | crm:write | Log or schedule an action |
| PATCH | /crm-actions/:id | crm:write | Update an action |
| DELETE | /crm-actions/:id | crm:write | Delete an action |
| GET | /crm-reminders | crm:read | List CRM reminders |
| GET | /reminders | crm:read | List reminders |
| POST | /reminders | crm:write | Create a reminder |
| GET | /reminders/:id | crm:read | Read one reminder |
| PATCH | /reminders/:id | crm:write | Update a reminder |
| DELETE | /reminders/:id | crm:write | Delete a reminder |
Email drafts
| Method | Path | Scope | Purpose |
|---|---|---|---|
| GET | /leads/:leadId/email-drafts | crm:read | List lead drafts |
| POST | /leads/:leadId/email-drafts | crm:write | Create a lead draft |
| GET | /leads/:leadId/email-drafts/:draftId | crm:read | Read a lead draft |
| PATCH | /leads/:leadId/email-drafts/:draftId | crm:write | Update a lead draft |
| DELETE | /leads/:leadId/email-drafts/:draftId | crm:write | Delete a lead draft |
| POST | /leads/:leadId/email-drafts/:draftId/send | crm:write | Send a lead draft |
| GET | /contacts/:contactId/email-drafts | crm:read | List contact drafts |
| POST | /contacts/:contactId/email-drafts | crm:write | Create a contact draft |
| GET | /contacts/:contactId/email-drafts/:draftId | crm:read | Read a contact draft |
| PATCH | /contacts/:contactId/email-drafts/:draftId | crm:write | Update a contact draft |
| DELETE | /contacts/:contactId/email-drafts/:draftId | crm:write | Delete a contact draft |
| POST | /contacts/:contactId/email-drafts/:draftId/send | crm:write | Send a contact draft |
| POST | /email-drafts/:draftId/schedule | crm:write | Schedule a draft |
POST /email-drafts/:draftId/schedule body:
{
"recordType": "lead",
"recordId": "lead_01",
"scheduledAt": "2026-11-02T15:00:00.000Z",
"overwrite": false
}
recordType is lead or contact.
Email topics, lists, and campaigns
| Method | Path | Scope | Purpose |
|---|---|---|---|
| GET | /email-topics | crm:read | List topics |
| POST | /email-topics | crm:write | Create a topic |
| GET | /email-topics/:id | crm:read | Read a topic |
| PATCH | /email-topics/:id | crm:write | Update a topic |
| DELETE | /email-topics/:id | crm:write | Delete a topic |
| GET | /email-lists | crm:read | List email lists |
| POST | /email-lists | crm:write | Create an email list |
| GET | /email-lists/:id | crm:read | Read an email list |
| PATCH | /email-lists/:id | crm:write | Update an email list |
| DELETE | /email-lists/:id | crm:write | Delete an email list |
| GET | /email-lists/:emailListId/members | crm:read | List members |
| POST | /email-lists/:emailListId/members | crm:write | Add members |
| POST | /email-lists/:emailListId/members/from-tags | crm:write | Add members from tags |
| POST | /email-lists/:emailListId/members/from-date-range | crm:write | Add members from a date range |
| GET | /email-lists/:emailListId/members/:leadId | crm:read | Read a list member |
| DELETE | /email-lists/:emailListId/members/:leadId | crm:write | Remove a list member |
| GET | /email-lists/:emailListId/campaigns | crm:read | Campaigns on a list |
| GET | /email-list-campaigns/:campaignId | crm:read | Read a campaign |
| PATCH | /email-list-campaigns/:campaignId | crm:write | Update a campaign |
| DELETE | /email-list-campaigns/:campaignId | crm:write | Delete a campaign |
| GET | /email-list-campaigns/:campaignId/members | crm:read | Campaign members |
| PATCH | /email-list-campaigns/:campaignId/drafts/:draftId | crm:write | Update a campaign draft |
| DELETE | /email-list-campaigns/:campaignId/drafts/:draftId | crm:write | Delete a campaign draft |