Enroll existing leads by lead_ids, raw numbers via phone_numbers, or both in
one request. Raw numbers are normalized to E.164 and matched against your existing
leads; a lead is created only when there is no match. Required scope
campaigns:manage. A key limited to some agents enrolls into its own campaigns
the same way: leads belong to the whole workspace, so this is the one way such a
key creates or reuses one.
Enrollment is per-row and idempotent: unparseable numbers, numbers on the
do-not-call list, numbers another live campaign is calling, and unknown lead IDs
are reported in the response instead of failing the batch, and re-enrolling an
existing contact is a no-op. At most 1,000
contacts per request — send several requests for larger lists.
You can enroll into a running campaign; new contacts join the pacing queue. A
completed, stopped or archived campaign rejects enrollment.
Adds contacts to a campaign. Enroll leads you already have with lead_ids, raw phone numbers with phone_numbers, or both in one request. Numbers are matched to existing leads where possible and created as new leads otherwise.A key limited to some agents can enroll into its own campaigns the same way. Leads belong to the whole workspace, so a number it sends is matched to the workspace’s lead for that number, or becomes a new workspace lead — this is the one way such a key writes leads.The response is a report, not a failure: bad rows are described rather than aborting the batch, so a list with three unparseable numbers and two people on the do-not-call list still enrolls everybody else and tells you exactly who was skipped and why.Enrollment works on a draft campaign and on a live one — adding contacts to a running campaign is supported and they join the queue at the normal pace.Required scope: campaigns:manage.
Path parameters
Parameter
Type
Notes
id
uuid
Campaign ID. Must belong to the API key’s workspace.
Body
At least one of lead_ids / phone_numbers must be present and non-empty. Their combined length may not exceed 1000 per request — send several requests for a longer list.
Field
Type
Notes
lead_ids
uuid[]
IDs of existing leads (GET /leads). IDs that do not exist in your workspace, or are deleted, come back in not_found.
phone_numbers
array
Each entry is either a bare phone string, or an object (below).
phone_numbers[].phone
string
Required in object form. Any common format — +972501234567, 972501234567, 0501234567 — normalized to E.164 before anything is written.
phone_numbers[].name
string
Optional. Used when a new lead is created. A campaign call’s {{FirstName}} is its first word and {{FullName}} the whole of it, so write it the way it should be said. A first word that is not a name said alone — a household, a title or half of a given name — keeps the whole name under {{FirstName}} too (“משפחת כהן” greets as “משפחת כהן”).
phone_numbers[].email
string
Optional. Used when a new lead is created. Must be an email address (name@example.com); one that is not is dropped — the contact is still enrolled without it — and reported in invalid_email.
phone_numbers[].notes
string
Optional, truncated to 2000 characters. Becomes the lead’s long-term context, which the agent can draw on during the call.
No other field is read, at the top level or in an entry. A field that is not one of these — a misspelt emial, a lead_id for lead_ids — refuses the whole request with 400 CAMPAIGN_REQUEST_INVALID and nothing is enrolled, rather than being dropped (a misspelt email used to enrol the contact with no email and no word). Every such field is named at once in issues[], each with code: "field_unknown", its path, and, when a field it reads is close, the one it was likely meant to be:
{ "error": "phone_numbers[0] has a field it does not read: emial. Did you mean email? An entry reads phone, name, email and notes; nothing was enrolled.", "code": "CAMPAIGN_REQUEST_INVALID", "issues": [ { "code": "field_unknown", "path": "/phone_numbers/0/emial", "message": "phone_numbers[0] has a field it does not read: emial. Did you mean email? An entry reads phone, name, email and notes; nothing was enrolled." } ]}
Numbers are canonicalized before any lookup or insert, so the same person supplied as 0501234567 in one row and +972501234567 in another resolves to one lead and one enrollment rather than two.name, email and notes apply to newly created leads. When a number matches a lead you already have, the existing lead is enrolled as-is and its details are left untouched — update it through PATCH /leads/{id} if you need to change them.
What gets skipped
Reason
Reported as
Behaviour
A number nobody can dial
invalid_phone
Skipped, and no lead is created for it. The same rule as POST /leads: letters are refused rather than stripped, and an Israeli number of an impossible length or prefix (12345, +97250910730) is refused instead of being stored as +97212345. Each entry names the row: row (its position in the phone_numbers or lead_ids array you sent, from 1), phone as sent, name when the entry carried one, lead_id when it came from an existing lead, and reason — missing_phone (empty), not_a_number (letters or symbols, such as 054-71A-4034), impossible_number (digits nobody can dial, such as 05012), country_not_allowed (a number outside Israel, such as +14155550123: calls can only be placed to Israeli numbers (+972), and error says so) or lead_not_created (with error).
An email that is not an address
invalid_email
Only the email is dropped — the rule POST /leads applies, so it is never stored — and the contact is still enrolled (it is in results too): a new lead is created without an email, a lead you already have is left as it was. Each entry names the row: row (its position in phone_numbers, from 1), phone and email as sent, name when the entry carried one, and reasoninvalid_email. To add the address, correct it and set it with PATCH /leads/{id}.
Lead ID not in this workspace
not_found
Skipped.
Number on the do-not-call list
on_do_not_call
Skipped, and reported up front rather than surfacing later as blocked calls. A number in phone_numbers that matches no lead is screened before a lead is made for it, so a skipped number never becomes a new contact. Scope-limited entries are honoured against this campaign’s agent.
Already enrolled in this campaign
already_enrolled
No duplicate row, no error. Re-sending the same list is safe.
Already live in a different campaign
in_another_campaign
Skipped, with the campaign that holds it. A number can only be dialed by one campaign at a time — otherwise the same person receives two campaigns’ worth of attempts. Everyone else in the request is still enrolled. To move the person here, exclude them from that campaign (DELETE /campaigns/{campaign_id}/leads/{lead_id}) or let it finish, then send the number again.
A draft holds no number. A campaign that has never been launched dials nobody, so a
number sitting on a draft can be enrolled anywhere else. When a draft is launched, any
contact whose number another campaign is calling by then is retired as excluded with
stop_reason: "in_another_campaign" — visible in GET /campaigns/{id}/leads.A verbal opt-out during a call (“stop calling me”) adds that number to the do-not-call list automatically, workspace-wide, so it will be skipped by every future enrollment as well.
Response fields
Field
Type
Meaning
campaign_id
uuid
Echo of the path parameter.
enrolled
integer
Contacts newly added to this campaign.
already_enrolled
integer
Contacts that were already on this campaign.
leads_created
integer
New leads created from phone_numbers.
leads_matched
integer
phone_numbers entries that matched a lead you already had. A number an earlier entry of the same request carried is counted in duplicates_in_request instead.
duplicates_in_request
integer
Entries whose number (or lead) an earlier entry of this request already carried. Each is one contact with the first, reported in results as already_enrolled at its own row.
invalid_phone
array
Rows whose number nobody can dial — see What gets skipped.
invalid_email
array
Rows whose email is not an address — see What gets skipped.
on_do_not_call
string[]
E.164 numbers skipped because they are suppressed.
not_found
string[]
lead_ids that do not resolve in this workspace.
in_another_campaign
array
{ phone, lead_id, campaign_id, campaign_name } for each number another live campaign is calling.
results
array
One entry per number that got past parsing and the do-not-call screen, in the order you sent them (lead_ids first, then phone_numbers): { row, phone, lead_id, result } where row is the entry’s position in the array it came from, from 1 (the count invalid_phone and invalid_email use), and result is enrolled, already_enrolled (already on this campaign, or the same number twice in this request) or in_another_campaign (plus campaign_id and campaign_name).
total_leads
integer
Total contacts on the campaign after this request. Present whenever a number reached the enrolment step — also when every one was already enrolled; omitted when every entry was skipped before it (an undiallable number, an unknown lead, the do-not-call list).
Always inspect the report rather than assuming 200 means everything landed.
Errors
HTTP
Code
When
400
CAMPAIGN_REQUEST_INVALID
A field the request or one of its entries does not read. issues[] names each one (code: "field_unknown", path, and the field it was likely meant to be). Nothing was enrolled.
400
BAD_REQUEST
Neither lead_ids nor phone_numbers supplied (or both empty).
400
BAD_REQUEST
More than 1000 contacts in one request.
400
BAD_REQUEST
Campaign is completed or stopped — those cannot take new contacts.
400
BAD_REQUEST
Request body is not valid JSON, or not a JSON object.
The id in the path is not an id at all. Use an id exactly as GET /campaigns returned it.
500
INTERNAL_ERROR
The check for numbers already on a campaign, or the write, failed. Safe to retry: enrolment is idempotent.
A number another campaign is calling is not an error: it is reported under
in_another_campaign and everyone else is enrolled. Earlier versions refused the whole
request with 409 ALREADY_IN_ACTIVE_CAMPAIGN; that response is no longer returned.The code arrives in code, and is repeated in error for callers written against the older shape. Branch on code.
Authorizations
Authorization
string
header
required
Your Yappr API key (e.g. ypr_live_...). Generate one in the dashboard under Settings → API Keys. No key is 401 MISSING_KEY; a key that is not one of ours, or is revoked, is 401 INVALID_KEY; an expired one is 401 EXPIRED_KEY. A valid key without the scope an operation needs is 403 INSUFFICIENT_SCOPE on every operation, and the message names the scope. Every response, a 401 included, carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset: the budget is 60 requests a minute per API key. Every 429, whatever its code, carries Retry-After (whole seconds, never zero): the per-key budget's RATE_LIMIT asks for what is left of the minute, a route's daily cap (RATE_LIMITED) for the time until that cap resets. All four headers are listed in Access-Control-Expose-Headers, so a browser can read them. A path the API does not serve (an unknown sub-path, an id left empty) is 404 ROUTE_NOT_FOUND, and a method a served path does not take is 405 METHOD_NOT_ALLOWED with an Allow header; both are answered before any scope check, and nothing is read or changed. A trailing slash is ignored where it cannot be an id left empty (POST /calls/ is POST /calls) and refused where it can (GET /calls/). A doubled slash inside a path is merged into one before the request reaches the API (GET //calls is GET /calls).
Path Parameters
id
string<uuid>
required
Body
application/json
Supply lead_ids, phone_numbers, or both — at least one must be non-empty.
lead_ids
string<uuid>[]
IDs of leads that already exist in this workspace.
phone_numbers
(string | object)[]
Numbers to enroll. Each entry is either a bare phone string or an object. Any format is accepted and normalized to E.164.
string
object
Example:
"+972501234567"
Response
Enrollment report. Returned even when nothing was enrolled — read the counters and the rejection arrays to see why.
Result of POST /campaigns/{id}/leads. Enrollment is per-row and
best-effort: a bad phone number or a number on the do-not-call list is
reported here rather than failing the whole batch, and re-enrolling an
existing contact is idempotent.
Numbers are canonicalized to E.164 before anything is written, so the same
person cannot be enrolled twice under two formats.
campaign_id
string<uuid>
enrolled
integer
Contacts newly enrolled by this request.
already_enrolled
integer
Contacts that were already enrolled — no-ops, not errors.
leads_created
integer
New leads created from phone_numbers entries with no existing match.
leads_matched
integer
phone_numbers entries matched to a lead you already had. A number an earlier entry of the same request carried is not counted here; see duplicates_in_request.
duplicates_in_request
integer
Entries whose number (or lead) an earlier entry of this same request already carried. Each is one contact with the first: reported in results as already_enrolled at its own row, and never counted as a lead you already had.
invalid_phone
object[]
Rows rejected before enrollment because nobody can dial the number (the POST /leads rule: letters, or an Israeli number of an impossible length or prefix such as 12345), because the number is outside Israel (calls can only be placed to Israeli numbers, +972), or because the lead could not be created. No lead is created for these.
Show child attributes
invalid_email
object[]
phone_numbers entries whose email is not an address (the POST /leads rule). The email is never stored; the contact is still enrolled without it (a new lead is created with no email, a matched lead is left as it was), so each entry here also appears in results.
Show child attributes
on_do_not_call
string[]
Numbers excluded because they are on the workspace do-not-call list. A phone_numbers entry that matches no lead is screened before a lead is made for it, so a number reported here never becomes a new lead. A verbal opt-out on a call adds the number to that list automatically, workspace-wide, so previously-contacted people can appear here.
not_found
string<uuid>[]
IDs from lead_ids that are not leads in this workspace.
in_another_campaign
object[]
Numbers another live campaign is already calling, each with that campaign. Not enrolled here: a number is dialed by one campaign at a time. A draft holds no number, so a number parked on a draft never appears here.
Show child attributes
results
object[]
One entry per number that got past parsing and the do-not-call screen, in the order supplied (lead_ids first, then phone_numbers), each with its row: enrolled, already_enrolled (already on this campaign, or the same number twice in this request) or in_another_campaign (with campaign_id and campaign_name).
Show child attributes
total_leads
integer
Total contacts enrolled in the campaign after this request. Present whenever a number reached the enrolment step — including when every one was already enrolled; omitted when every entry was skipped before it (an undiallable number, an unknown lead, the do-not-call list).
company_id
string<uuid>
{"docsConfig":{"$schema":"https://mintlify.com/docs.json","theme":"mint","name":"Yappr","colors":{"primary":"#6366f1","light":"#818cf8","dark":"#4f46e5"},"favicon":"https://mintcdn.com/yappr/E1AQ46GZ-5iPcyPp/favicon.svg?fit=max\u0026auto=format\u0026n=E1AQ46GZ-5iPcyPp\u0026q=85\u0026s=a8c28fe51e78b8e4701c773698ba2378","logo":{"light":"https://mintcdn.com/yappr/E1AQ46GZ-5iPcyPp/logo/light.svg?fit=max\u0026auto=format\u0026n=E1AQ46GZ-5iPcyPp\u0026q=85\u0026s=a117ff3aa08c2017e8d58b0da5be882f","dark":"https://mintcdn.com/yappr/E1AQ46GZ-5iPcyPp/logo/dark.svg?fit=max\u0026auto=format\u0026n=E1AQ46GZ-5iPcyPp\u0026q=85\u0026s=613f48501928d9122f97fb91bfcf9b87"},"api":{"openapi":"openapi.yaml"},"footer":{"socials":{"website":"https://goyappr.com"}},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"yappr","hasAudioNarration":false,"actualSubdomain":"yappr","customDomains":["docs.goyappr.com"],"gitSource":{"type":"github","owner":"simon-isf","repo":"hebrew-voice-ai","deployBranch":"main","contentDirectory":"docs","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6b097bda241cbb20e7401d81","clientVersion":"0.0.4340","searchFilterCounts":[{"language":"default","tag":"API Reference","count":210},{"language":"default","tag":"Tools \u0026 integrations","count":35},{"language":"default","tag":"Agent Eval","count":24},{"language":"default","tag":"Agents","count":20},{"language":"default","tag":"Tools","count":19},{"language":"default","tag":"Connected accounts","count":16},{"language":"default","tag":"Campaigns","count":15},{"language":"default","tag":"Carrier accounts","count":14},{"language":"default","tag":"Workflows","count":12},{"language":"default","tag":"Billing","count":11}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"api-reference/campaigns/enroll","slug":"/api-reference/campaigns/enroll","pageMetadata":{"title":"Enroll contacts","openapi":"POST /campaigns/{id}/leads","description":"Enroll existing leads by `lead_ids`, raw numbers via `phone_numbers`, or both in\none request. Raw numbers are normalized to E.164 and matched against your existing\nleads; a lead is created only when there is no match. Required scope\n`campaigns:manage`. A key limited to some agents enrolls into its own campaigns\nthe same way: leads belong to the whole workspace, so this is the one way such a\nkey creates or reuses one.\n\nEnrollment is per-row and idempotent: unparseable numbers, numbers on the\ndo-not-call list, numbers another live campaign is calling, and unknown lead IDs\nare reported in the response instead of failing the batch, and re-enrolling an\nexisting contact is a no-op. At most 1,000\ncontacts per request — send several requests for larger lists.\n\nYou can enroll into a `running` campaign; new contacts join the pacing queue. A\n`completed`, `stopped` or `archived` campaign rejects enrollment.\n","href":"/api-reference/campaigns/enroll"},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsxs(_components.p, {\n children: [\"Enroll existing leads by \", _jsx(_components.code, {\n children: \"lead_ids\"\n }), \", raw numbers via \", _jsx(_components.code, {\n children: \"phone_numbers\"\n }), \", or both in\\none request. Raw numbers are normalized to E.164 and matched against your existing\\nleads; a lead is created only when there is no match. Required scope\\n\", _jsx(_components.code, {\n children: \"campaigns:manage\"\n }), \". A key limited to some agents enrolls into its own campaigns\\nthe same way: leads belong to the whole workspace, so this is the one way such a\\nkey creates or reuses one.\"]\n }), \"\\n\", _jsx(_components.p, {\n children: \"Enrollment is per-row and idempotent: unparseable numbers, numbers on the\\ndo-not-call list, numbers another live campaign is calling, and unknown lead IDs\\nare reported in the response instead of failing the batch, and re-enrolling an\\nexisting contact is a no-op. At most 1,000\\ncontacts per request — send several requests for larger lists.\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"You can enroll into a \", _jsx(_components.code, {\n children: \"running\"\n }), \" campaign; new contacts join the pacing queue. A\\n\", _jsx(_components.code, {\n children: \"completed\"\n }), \", \", _jsx(_components.code, {\n children: \"stopped\"\n }), \" or \", _jsx(_components.code, {\n children: \"archived\"\n }), \" campaign rejects enrollment.\"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,em:`em`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Adds contacts to a campaign. Enroll leads you already have with `,_jsx(_components.code,{children:`lead_ids`}),`, raw phone numbers with `,_jsx(_components.code,{children:`phone_numbers`}),`, or both in one request. Numbers are matched to existing leads where possible and created as new leads otherwise.`]}),`\n`,_jsxs(_components.p,{children:[`A key `,_jsx(_components.a,{href:`/api-reference/introduction#limiting-a-key-to-some-agents`,children:`limited to some agents`}),` can enroll into its own campaigns the same way. Leads belong to the whole workspace, so a number it sends is matched to the workspace’s lead for that number, or becomes a new workspace lead — this is the one way such a key writes leads.`]}),`\n`,_jsxs(_components.p,{children:[`The response is a `,_jsx(_components.strong,{children:`report, not a failure`}),`: bad rows are described rather than aborting the batch, so a list with three unparseable numbers and two people on the do-not-call list still enrolls everybody else and tells you exactly who was skipped and why.`]}),`\n`,_jsxs(_components.p,{children:[`Enrollment works on a `,_jsx(_components.code,{children:`draft`}),` campaign and on a live one — adding contacts to a `,_jsx(_components.code,{children:`running`}),` campaign is supported and they join the queue at the normal pace.`]}),`\n`,_jsxs(_components.p,{children:[`Required scope: `,_jsx(_components.code,{children:`campaigns:manage`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`path-parameters`,children:`Path parameters`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Parameter`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Notes`})]})}),_jsx(_components.tbody,{children:_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`id`})}),_jsx(_components.td,{children:`uuid`}),_jsx(_components.td,{children:`Campaign ID. Must belong to the API key’s workspace.`})]})})]}),`\n`,_jsx(Heading,{level:`2`,id:`body`,children:`Body`}),`\n`,_jsxs(_components.p,{children:[`At least one of `,_jsx(_components.code,{children:`lead_ids`}),` / `,_jsx(_components.code,{children:`phone_numbers`}),` must be present and non-empty. Their combined length may not exceed `,_jsx(_components.strong,{children:`1000 per request`}),` — send several requests for a longer list.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Notes`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`lead_ids`})}),_jsx(_components.td,{children:`uuid[]`}),_jsxs(_components.td,{children:[`IDs of existing leads (`,_jsx(_components.code,{children:`GET /leads`}),`). IDs that do not exist in your workspace, or are deleted, come back in `,_jsx(_components.code,{children:`not_found`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`phone_numbers`})}),_jsx(_components.td,{children:`array`}),_jsx(_components.td,{children:`Each entry is either a bare phone string, or an object (below).`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`phone_numbers[].phone`})}),_jsx(_components.td,{children:`string`}),_jsxs(_components.td,{children:[_jsx(_components.strong,{children:`Required`}),` in object form. Any common format — `,_jsx(_components.code,{children:`+972501234567`}),`, `,_jsx(_components.code,{children:`972501234567`}),`, `,_jsx(_components.code,{children:`0501234567`}),` — normalized to E.164 before anything is written.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`phone_numbers[].name`})}),_jsx(_components.td,{children:`string`}),_jsxs(_components.td,{children:[`Optional. Used when a new lead is created. A campaign call’s `,_jsx(_components.code,{children:`{{FirstName}}`}),` is its first word and `,_jsx(_components.code,{children:`{{FullName}}`}),` the whole of it, so write it the way it should be said. A first word that is not a name said alone — a household, a title or half of a given name — keeps the whole name under `,_jsx(_components.code,{children:`{{FirstName}}`}),` too (“משפחת כהן” greets as “משפחת כהן”).`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`phone_numbers[].email`})}),_jsx(_components.td,{children:`string`}),_jsxs(_components.td,{children:[`Optional. Used when a new lead is created. Must be an email address (`,_jsx(_components.code,{children:`name@example.com`}),`); one that is not is dropped — the contact is still enrolled without it — and reported in `,_jsx(_components.code,{children:`invalid_email`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`phone_numbers[].notes`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Optional, truncated to 2000 characters. Becomes the lead’s long-term context, which the agent can draw on during the call.`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`No other field is read, at the top level or in an entry. A field that is not one of these — a misspelt `,_jsx(_components.code,{children:`emial`}),`, a `,_jsx(_components.code,{children:`lead_id`}),` for `,_jsx(_components.code,{children:`lead_ids`}),` — refuses the whole request with `,_jsx(_components.code,{children:`400 CAMPAIGN_REQUEST_INVALID`}),` and nothing is enrolled, rather than being dropped (a misspelt `,_jsx(_components.code,{children:`email`}),` used to enrol the contact with no email and no word). Every such field is named at once in `,_jsx(_components.code,{children:`issues[]`}),`, each with `,_jsx(_components.code,{children:`code: \"field_unknown\"`}),`, its `,_jsx(_components.code,{children:`path`}),`, and, when a field it reads is close, the one it was likely meant to be:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`11`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`11`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"phone_numbers[0] has a field it does not read: emial. Did you mean email? An entry reads phone, name, email and notes; nothing was enrolled.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"CAMPAIGN_REQUEST_INVALID\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"issues\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"field_unknown\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"path\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"/phone_numbers/0/emial\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"phone_numbers[0] has a field it does not read: emial. Did you mean email? An entry reads phone, name, email and notes; nothing was enrolled.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Numbers are canonicalized `,_jsx(_components.strong,{children:`before`}),` any lookup or insert, so the same person supplied as `,_jsx(_components.code,{children:`0501234567`}),` in one row and `,_jsx(_components.code,{children:`+972501234567`}),` in another resolves to one lead and one enrollment rather than two.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`name`}),`, `,_jsx(_components.code,{children:`email`}),` and `,_jsx(_components.code,{children:`notes`}),` apply to `,_jsx(_components.strong,{children:`newly created`}),` leads. When a number matches a lead you already have, the existing lead is enrolled as-is and its details are left untouched — update it through `,_jsx(_components.code,{children:`PATCH /leads/{id}`}),` if you need to change them.`]}),`\n`,_jsx(Heading,{level:`2`,id:`what-gets-skipped`,children:`What gets skipped`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Reason`}),_jsx(_components.th,{children:`Reported as`}),_jsx(_components.th,{children:`Behaviour`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`A number nobody can dial`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`invalid_phone`})}),_jsxs(_components.td,{children:[`Skipped, and no lead is created for it. The same rule as `,_jsx(_components.code,{children:`POST /leads`}),`: letters are refused rather than stripped, and an Israeli number of an impossible length or prefix (`,_jsx(_components.code,{children:`12345`}),`, `,_jsx(_components.code,{children:`+97250910730`}),`) is refused instead of being stored as `,_jsx(_components.code,{children:`+97212345`}),`. Each entry names the row: `,_jsx(_components.code,{children:`row`}),` (its position in the `,_jsx(_components.code,{children:`phone_numbers`}),` or `,_jsx(_components.code,{children:`lead_ids`}),` array you sent, from 1), `,_jsx(_components.code,{children:`phone`}),` as sent, `,_jsx(_components.code,{children:`name`}),` when the entry carried one, `,_jsx(_components.code,{children:`lead_id`}),` when it came from an existing lead, and `,_jsx(_components.code,{children:`reason`}),` — `,_jsx(_components.code,{children:`missing_phone`}),` (empty), `,_jsx(_components.code,{children:`not_a_number`}),` (letters or symbols, such as `,_jsx(_components.code,{children:`054-71A-4034`}),`), `,_jsx(_components.code,{children:`impossible_number`}),` (digits nobody can dial, such as `,_jsx(_components.code,{children:`05012`}),`), `,_jsx(_components.code,{children:`country_not_allowed`}),` (a number outside Israel, such as `,_jsx(_components.code,{children:`+14155550123`}),`: calls can only be placed to Israeli numbers (`,_jsx(_components.code,{children:`+972`}),`), and `,_jsx(_components.code,{children:`error`}),` says so) or `,_jsx(_components.code,{children:`lead_not_created`}),` (with `,_jsx(_components.code,{children:`error`}),`).`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`An email that is not an address`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`invalid_email`})}),_jsxs(_components.td,{children:[_jsx(_components.strong,{children:`Only the email`}),` is dropped — the rule `,_jsx(_components.a,{href:`/api-reference/leads/create`,children:_jsx(_components.code,{children:`POST /leads`})}),` applies, so it is never stored — and the contact is still enrolled (it is in `,_jsx(_components.code,{children:`results`}),` too): a new lead is created without an email, a lead you already have is left as it was. Each entry names the row: `,_jsx(_components.code,{children:`row`}),` (its position in `,_jsx(_components.code,{children:`phone_numbers`}),`, from 1), `,_jsx(_components.code,{children:`phone`}),` and `,_jsx(_components.code,{children:`email`}),` as sent, `,_jsx(_components.code,{children:`name`}),` when the entry carried one, and `,_jsx(_components.code,{children:`reason`}),` `,_jsx(_components.code,{children:`invalid_email`}),`. To add the address, correct it and set it with `,_jsx(_components.a,{href:`/api-reference/leads/update`,children:_jsx(_components.code,{children:`PATCH /leads/{id}`})}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Lead ID not in this workspace`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`not_found`})}),_jsx(_components.td,{children:`Skipped.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Number on the do-not-call list`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`on_do_not_call`})}),_jsxs(_components.td,{children:[`Skipped, and reported up front rather than surfacing later as blocked calls. A number in `,_jsx(_components.code,{children:`phone_numbers`}),` that matches no lead is screened `,_jsx(_components.strong,{children:`before`}),` a lead is made for it, so a skipped number never becomes a new contact. Scope-limited entries are honoured against this campaign’s agent.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Already enrolled in this campaign`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`already_enrolled`})}),_jsx(_components.td,{children:`No duplicate row, no error. Re-sending the same list is safe.`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[`Already live in a `,_jsx(_components.strong,{children:`different`}),` campaign`]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`in_another_campaign`})}),_jsxs(_components.td,{children:[`Skipped, with the campaign that holds it. A number can only be dialed by one campaign at a time — otherwise the same person receives two campaigns’ worth of attempts. Everyone else in the request is still enrolled. To move the person here, exclude them from that campaign (`,_jsx(_components.code,{children:`DELETE /campaigns/{campaign_id}/leads/{lead_id}`}),`) or let it finish, then send the number again.`]})]})]})]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`A draft holds no number.`}),` A campaign that has never been launched dials nobody, so a\nnumber sitting on a draft can be enrolled anywhere else. When a draft is launched, any\ncontact whose number another campaign is calling by then is retired as `,_jsx(_components.code,{children:`excluded`}),` with\n`,_jsx(_components.code,{children:`stop_reason: \"in_another_campaign\"`}),` — visible in `,_jsx(_components.code,{children:`GET /campaigns/{id}/leads`}),`.`]}),`\n`,_jsx(_components.p,{children:`A verbal opt-out during a call (“stop calling me”) adds that number to the do-not-call list automatically, workspace-wide, so it will be skipped by every future enrollment as well.`}),`\n`,_jsx(Heading,{level:`2`,id:`response-fields`,children:`Response fields`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`campaign_id`})}),_jsx(_components.td,{children:`uuid`}),_jsx(_components.td,{children:`Echo of the path parameter.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`enrolled`})}),_jsx(_components.td,{children:`integer`}),_jsx(_components.td,{children:`Contacts newly added to this campaign.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`already_enrolled`})}),_jsx(_components.td,{children:`integer`}),_jsx(_components.td,{children:`Contacts that were already on this campaign.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`leads_created`})}),_jsx(_components.td,{children:`integer`}),_jsxs(_components.td,{children:[`New leads created from `,_jsx(_components.code,{children:`phone_numbers`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`leads_matched`})}),_jsx(_components.td,{children:`integer`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`phone_numbers`}),` entries that matched a lead you already had. A number an earlier entry of the same request carried is counted in `,_jsx(_components.code,{children:`duplicates_in_request`}),` instead.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`duplicates_in_request`})}),_jsx(_components.td,{children:`integer`}),_jsxs(_components.td,{children:[`Entries whose number (or lead) an earlier entry of this request already carried. Each is one contact with the first, reported in `,_jsx(_components.code,{children:`results`}),` as `,_jsx(_components.code,{children:`already_enrolled`}),` at its own `,_jsx(_components.code,{children:`row`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`invalid_phone`})}),_jsx(_components.td,{children:`array`}),_jsxs(_components.td,{children:[`Rows whose number nobody can dial — see `,_jsx(_components.em,{children:`What gets skipped`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`invalid_email`})}),_jsx(_components.td,{children:`array`}),_jsxs(_components.td,{children:[`Rows whose email is not an address — see `,_jsx(_components.em,{children:`What gets skipped`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`on_do_not_call`})}),_jsx(_components.td,{children:`string[]`}),_jsx(_components.td,{children:`E.164 numbers skipped because they are suppressed.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`not_found`})}),_jsx(_components.td,{children:`string[]`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`lead_ids`}),` that do not resolve in this workspace.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`in_another_campaign`})}),_jsx(_components.td,{children:`array`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`{ phone, lead_id, campaign_id, campaign_name }`}),` for each number another live campaign is calling.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`results`})}),_jsx(_components.td,{children:`array`}),_jsxs(_components.td,{children:[`One entry per number that got past parsing and the do-not-call screen, in the order you sent them (`,_jsx(_components.code,{children:`lead_ids`}),` first, then `,_jsx(_components.code,{children:`phone_numbers`}),`): `,_jsx(_components.code,{children:`{ row, phone, lead_id, result }`}),` where `,_jsx(_components.code,{children:`row`}),` is the entry’s position in the array it came from, from 1 (the count `,_jsx(_components.code,{children:`invalid_phone`}),` and `,_jsx(_components.code,{children:`invalid_email`}),` use), and `,_jsx(_components.code,{children:`result`}),` is `,_jsx(_components.code,{children:`enrolled`}),`, `,_jsx(_components.code,{children:`already_enrolled`}),` (already on this campaign, or the same number twice in this request) or `,_jsx(_components.code,{children:`in_another_campaign`}),` (plus `,_jsx(_components.code,{children:`campaign_id`}),` and `,_jsx(_components.code,{children:`campaign_name`}),`).`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`total_leads`})}),_jsx(_components.td,{children:`integer`}),_jsx(_components.td,{children:`Total contacts on the campaign after this request. Present whenever a number reached the enrolment step — also when every one was already enrolled; omitted when every entry was skipped before it (an undiallable number, an unknown lead, the do-not-call list).`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`company_id`})}),_jsx(_components.td,{children:`uuid`}),_jsx(_components.td,{children:`Workspace this response belongs to.`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`example-request`,children:`Example request`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`14`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`14`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.goyappr.com/campaigns/CAMPAIGN_ID/leads\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$YAPPR_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"lead_ids\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"a1c3e5f7-0000-4b21-9c30-000000000021\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"a1c3e5f7-0000-4b21-9c30-000000000022\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"phone_numbers\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` { \"phone\": \"0501234567\", \"name\": \"Dana Levi\", \"email\": \"dana@example.com\", \"notes\": \"Renewal due in August. Prefers mornings.\" },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` { \"phone\": \"+972521112222\", \"name\": \"Yossi Mor\" },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"0539998888\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`example-response`,children:`Example response`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`35`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`35`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"campaign_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"b3f1c0d2-5a44-4f0e-9c11-7a2e8d3f0001\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"enrolled\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"already_enrolled\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"leads_created\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"leads_matched\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"duplicates_in_request\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"invalid_phone\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"invalid_email\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"on_do_not_call\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"+972539998888\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"not_found\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"in_another_campaign\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"phone\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"+972521112222\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"lead_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"a1c3e5f7-0000-4b21-9c30-000000000031\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"campaign_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"7d20b6a1-0000-4c55-8e10-000000000077\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"campaign_name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"September recall\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"results\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"row\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"phone\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"+972501111111\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"lead_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"a1c3e5f7-0000-4b21-9c30-000000000021\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"result\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"enrolled\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"row\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"phone\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"+972502222222\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"lead_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"a1c3e5f7-0000-4b21-9c30-000000000022\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"result\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"already_enrolled\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"row\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"phone\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"+972501234567\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"lead_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"a1c3e5f7-0000-4b21-9c30-000000000030\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"result\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"enrolled\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"row\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"phone\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"+972521112222\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"lead_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"a1c3e5f7-0000-4b21-9c30-000000000031\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"result\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"in_another_campaign\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"campaign_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"7d20b6a1-0000-4c55-8e10-000000000077\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"campaign_name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"September recall\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"total_leads\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`412`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"company_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"00000000-0000-4000-8000-0000000000c1\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`A request where every entry was skipped before the enrolment step still returns 200 with the report, and without `,_jsx(_components.code,{children:`total_leads`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`15`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`15`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"campaign_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"b3f1c0d2-5a44-4f0e-9c11-7a2e8d3f0001\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"enrolled\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"already_enrolled\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"leads_created\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"leads_matched\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"duplicates_in_request\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"invalid_phone\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [{ `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"row\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"phone\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"not-a-number\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"reason\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"not_a_number\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"invalid_email\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"on_do_not_call\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"not_found\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"a1c3e5f7-0000-4b21-9c30-0000000000ff\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"in_another_campaign\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"results\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"company_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"00000000-0000-4000-8000-0000000000c1\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Always inspect the report rather than assuming 200 means everything landed.`}),`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Errors`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`HTTP`}),_jsx(_components.th,{children:`Code`}),_jsx(_components.th,{children:`When`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`CAMPAIGN_REQUEST_INVALID`})}),_jsxs(_components.td,{children:[`A field the request or one of its entries does not read. `,_jsx(_components.code,{children:`issues[]`}),` names each one (`,_jsx(_components.code,{children:`code: \"field_unknown\"`}),`, `,_jsx(_components.code,{children:`path`}),`, and the field it was likely meant to be). Nothing was enrolled.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`BAD_REQUEST`})}),_jsxs(_components.td,{children:[`Neither `,_jsx(_components.code,{children:`lead_ids`}),` nor `,_jsx(_components.code,{children:`phone_numbers`}),` supplied (or both empty).`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`BAD_REQUEST`})}),_jsx(_components.td,{children:`More than 1000 contacts in one request.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`BAD_REQUEST`})}),_jsxs(_components.td,{children:[`Campaign is `,_jsx(_components.code,{children:`completed`}),` or `,_jsx(_components.code,{children:`stopped`}),` — those cannot take new contacts.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`BAD_REQUEST`})}),_jsx(_components.td,{children:`Request body is not valid JSON, or not a JSON object.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`403`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`INSUFFICIENT_SCOPE`})}),_jsxs(_components.td,{children:[`API key lacks `,_jsx(_components.code,{children:`campaigns:manage`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`404`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`NOT_FOUND`})}),_jsx(_components.td,{children:`No campaign with that ID in this workspace.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`404`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`CAMPAIGN_ARCHIVED`})}),_jsxs(_components.td,{children:[`The campaign is archived. The message names `,_jsx(_components.a,{href:`/api-reference/campaigns/restore`,children:_jsx(_components.code,{children:`POST /campaigns/{id}/restore`})}),`, which brings it back; `,_jsx(_components.a,{href:`/api-reference/campaigns/list`,children:_jsx(_components.code,{children:`GET /campaigns?status=archived`})}),` lists it as it is.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`404`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`RESOURCE_ID_INVALID`})}),_jsxs(_components.td,{children:[`The id in the path is not an id at all. Use an `,_jsx(_components.code,{children:`id`}),` exactly as `,_jsx(_components.a,{href:`/api-reference/campaigns/list`,children:_jsx(_components.code,{children:`GET /campaigns`})}),` returned it.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`500`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`INTERNAL_ERROR`})}),_jsx(_components.td,{children:`The check for numbers already on a campaign, or the write, failed. Safe to retry: enrolment is idempotent.`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`A number another campaign is calling is `,_jsx(_components.strong,{children:`not`}),` an error: it is reported under\n`,_jsx(_components.code,{children:`in_another_campaign`}),` and everyone else is enrolled. Earlier versions refused the whole\nrequest with `,_jsx(_components.code,{children:`409 ALREADY_IN_ACTIVE_CAMPAIGN`}),`; that response is no longer returned.`]}),`\n`,_jsxs(_components.p,{children:[`The code arrives in `,_jsx(_components.code,{children:`code`}),`, and is repeated in `,_jsx(_components.code,{children:`error`}),` for callers written against the older shape. Branch on `,_jsx(_components.code,{children:`code`}),`.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Enroll contacts","openapi":"POST /campaigns/{id}/leads","description":"Enroll existing leads by `lead_ids`, raw numbers via `phone_numbers`, or both in\none request. Raw numbers are normalized to E.164 and matched against your existing\nleads; a lead is created only when there is no match. Required scope\n`campaigns:manage`. A key limited to some agents enrolls into its own campaigns\nthe same way: leads belong to the whole workspace, so this is the one way such a\nkey creates or reuses one.\n\nEnrollment is per-row and idempotent: unparseable numbers, numbers on the\ndo-not-call list, numbers another live campaign is calling, and unknown lead IDs\nare reported in the response instead of failing the batch, and re-enrolling an\nexisting contact is a no-op. At most 1,000\ncontacts per request — send several requests for larger lists.\n\nYou can enroll into a `running` campaign; new contacts join the pacing queue. A\n`completed`, `stopped` or `archived` campaign rejects enrollment.\n","href":"/api-reference/campaigns/enroll"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Path parameters","slug":"path-parameters","depth":2,"children":[]},{"title":"Body","slug":"body","depth":2,"children":[]},{"title":"What gets skipped","slug":"what-gets-skipped","depth":2,"children":[]},{"title":"Response fields","slug":"response-fields","depth":2,"children":[]},{"title":"Example request","slug":"example-request","depth":2,"children":[]},{"title":"Example response","slug":"example-response","depth":2,"children":[]},{"title":"Errors","slug":"errors","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"summary":"Enroll contacts","description":"Enroll existing leads by `lead_ids`, raw numbers via `phone_numbers`, or both in\none request. Raw numbers are normalized to E.164 and matched against your existing\nleads; a lead is created only when there is no match. Required scope\n`campaigns:manage`. A key limited to some agents enrolls into its own campaigns\nthe same way: leads belong to the whole workspace, so this is the one way such a\nkey creates or reuses one.\n\nEnrollment is per-row and idempotent: unparseable numbers, numbers on the\ndo-not-call list, numbers another live campaign is calling, and unknown lead IDs\nare reported in the response instead of failing the batch, and re-enrolling an\nexisting contact is a no-op. At most 1,000\ncontacts per request — send several requests for larger lists.\n\nYou can enroll into a `running` campaign; new contacts join the pacing queue. A\n`completed`, `stopped` or `archived` campaign rejects enrollment.\n","operationId":"enrollCampaignContacts","tags":["Campaigns"],"requestBody":"344d2052-df85-43c6-808c-e2834aaf64bb","responses":{"200":"822526c8-0383-4fee-8de5-ab2905d69d82","400":"d0008c67-5c8f-40d7-b0f5-011c9d81838d","404":"1eb0cdcd-e2a1-4bd6-8abb-29b5bea43cd1","500":"e70676ad-d8aa-45b0-9758-3e64b0032d4f"},"method":"post","type":"path","servers":["dc0c5f7d-c0c3-40b9-9c53-ce2239f5b67d"],"security":["2767439e-f0c6-4cd4-a450-ba11a6ab8311"],"path":"/campaigns/{id}/leads","baseUrlOptions":["https://api.goyappr.com"],"title":"Enroll contacts","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"862aa498-9e0a-4c23-8850-c2125f9110ce":{"in":"path","name":"id","required":true,"schema":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"","typeLabel":"string\u003cuuid>"}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"Supply `lead_ids`, `phone_numbers`, or both — at least one must be non-empty.","properties":{"lead_ids":{"type":"array","description":"IDs of leads that already exist in this workspace.","items":{"type":"string","format":"uuid","uniqueKey":"lead_ids.items.[INDEX]","typeLabel":"string\u003cuuid>"},"uniqueKey":"lead_ids","typeLabel":"string\u003cuuid>[]"},"phone_numbers":{"type":"array","description":"Numbers to enroll. Each entry is either a bare phone string or an object. Any format is accepted and normalized to E.164.\n","items":{"oneOf":[{"type":"string","example":"+972501234567","uniqueKey":"phone_numbers.items.[INDEX].oneOf.0","typeLabel":"string"},{"type":"object","required":["phone"],"properties":{"phone":{"type":"string","example":"0501234567","isRequired":true,"uniqueKey":"phone_numbers.items.[INDEX].oneOf.1.phone","typeLabel":"string"},"name":{"oneOf":[{"type":"string","uniqueKey":"phone_numbers.items.[INDEX].oneOf.1.name.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"phone_numbers.items.[INDEX].oneOf.1.name.oneOf.1","typeLabel":"null"}],"uniqueKey":"phone_numbers.items.[INDEX].oneOf.1.name","typeLabel":"string | null"},"email":{"oneOf":[{"type":"string","format":"email","uniqueKey":"phone_numbers.items.[INDEX].oneOf.1.email.oneOf.0","typeLabel":"string\u003cemail>"},{"type":"null","format":"email","uniqueKey":"phone_numbers.items.[INDEX].oneOf.1.email.oneOf.1","typeLabel":"null"}],"uniqueKey":"phone_numbers.items.[INDEX].oneOf.1.email","typeLabel":"string\u003cemail> | null"},"notes":{"oneOf":[{"type":"string","description":"Becomes the lead's AI memory (`long_term_context`), capped at 2,000 characters.","uniqueKey":"phone_numbers.items.[INDEX].oneOf.1.notes.oneOf.0","typeLabel":"string"},{"type":"null","description":"Becomes the lead's AI memory (`long_term_context`), capped at 2,000 characters.","uniqueKey":"phone_numbers.items.[INDEX].oneOf.1.notes.oneOf.1","typeLabel":"null"}],"uniqueKey":"phone_numbers.items.[INDEX].oneOf.1.notes","typeLabel":"string | null"}},"uniqueKey":"phone_numbers.items.[INDEX].oneOf.1","typeLabel":"object"}],"uniqueKey":"phone_numbers.items.[INDEX]","typeLabel":"string | object"},"uniqueKey":"phone_numbers","typeLabel":"(string | object)[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"lead_ids":["3c90c3cc-0d44-4b50-8888-8dd25736052a"],"phone_numbers":["+972501234567"]}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"822526c8-0383-4fee-8de5-ab2905d69d82":{"description":"Enrollment report. Returned even when nothing was enrolled — read the counters and the rejection arrays to see why.\n","content":{"application/json":{"schema":{"type":"object","description":"Result of `POST /campaigns/{id}/leads`. Enrollment is per-row and\nbest-effort: a bad phone number or a number on the do-not-call list is\nreported here rather than failing the whole batch, and re-enrolling an\nexisting contact is idempotent.\n\nNumbers are canonicalized to E.164 before anything is written, so the same\nperson cannot be enrolled twice under two formats.\n","properties":{"campaign_id":{"type":"string","format":"uuid","uniqueKey":"campaign_id","typeLabel":"string\u003cuuid>"},"enrolled":{"type":"integer","description":"Contacts newly enrolled by this request.","uniqueKey":"enrolled","typeLabel":"integer"},"already_enrolled":{"type":"integer","description":"Contacts that were already enrolled — no-ops, not errors.","uniqueKey":"already_enrolled","typeLabel":"integer"},"leads_created":{"type":"integer","description":"New leads created from `phone_numbers` entries with no existing match.","uniqueKey":"leads_created","typeLabel":"integer"},"leads_matched":{"type":"integer","description":"`phone_numbers` entries matched to a lead you already had. A number an earlier entry of the same request carried is not counted here; see `duplicates_in_request`.","uniqueKey":"leads_matched","typeLabel":"integer"},"duplicates_in_request":{"type":"integer","description":"Entries whose number (or lead) an earlier entry of this same request already carried. Each is one contact with the first: reported in `results` as `already_enrolled` at its own `row`, and never counted as a lead you already had.","uniqueKey":"duplicates_in_request","typeLabel":"integer"},"invalid_phone":{"type":"array","description":"Rows rejected before enrollment because nobody can dial the number (the `POST /leads` rule: letters, or an Israeli number of an impossible length or prefix such as `12345`), because the number is outside Israel (calls can only be placed to Israeli numbers, +972), or because the lead could not be created. No lead is created for these.","items":{"type":"object","properties":{"row":{"type":"integer","description":"The entry's position in the `phone_numbers` or `lead_ids` array sent, from 1.","uniqueKey":"invalid_phone.items.[INDEX].row","typeLabel":"integer"},"lead_id":{"type":"string","format":"uuid","description":"Present when the row came from `lead_ids`.","uniqueKey":"invalid_phone.items.[INDEX].lead_id","typeLabel":"string\u003cuuid>"},"phone":{"type":"string","description":"As sent.","uniqueKey":"invalid_phone.items.[INDEX].phone","typeLabel":"string"},"name":{"type":"string","description":"Present when the `phone_numbers` entry carried one.","uniqueKey":"invalid_phone.items.[INDEX].name","typeLabel":"string"},"reason":{"type":"string","enum":["missing_phone","not_a_number","impossible_number","country_not_allowed","lead_not_created"],"description":"Why: empty, letters or symbols (`054-71A-4034`), digits nobody can dial (`05012`), a number outside Israel (`+14155550123`; calls can only be placed to Israeli numbers), or the lead could not be created (see `error`).\n","uniqueKey":"invalid_phone.items.[INDEX].reason","typeLabel":"enum\u003cstring>"},"error":{"type":"string","description":"Present when lead creation itself failed, and for `country_not_allowed`, with the sentence that says why.","uniqueKey":"invalid_phone.items.[INDEX].error","typeLabel":"string"}},"uniqueKey":"invalid_phone.items.[INDEX]","typeLabel":"object"},"uniqueKey":"invalid_phone","typeLabel":"object[]"},"invalid_email":{"type":"array","description":"`phone_numbers` entries whose `email` is not an address (the `POST /leads` rule). The email is never stored; the contact is still enrolled without it (a new lead is created with no email, a matched lead is left as it was), so each entry here also appears in `results`.","items":{"type":"object","properties":{"row":{"type":"integer","description":"The entry's position in the `phone_numbers` array sent, from 1.","uniqueKey":"invalid_email.items.[INDEX].row","typeLabel":"integer"},"phone":{"type":"string","description":"As sent.","uniqueKey":"invalid_email.items.[INDEX].phone","typeLabel":"string"},"name":{"type":"string","description":"Present when the entry carried one.","uniqueKey":"invalid_email.items.[INDEX].name","typeLabel":"string"},"email":{"type":"string","description":"As sent, trimmed.","uniqueKey":"invalid_email.items.[INDEX].email","typeLabel":"string"},"reason":{"type":"string","enum":["invalid_email"],"uniqueKey":"invalid_email.items.[INDEX].reason","typeLabel":"enum\u003cstring>"}},"uniqueKey":"invalid_email.items.[INDEX]","typeLabel":"object"},"uniqueKey":"invalid_email","typeLabel":"object[]"},"on_do_not_call":{"type":"array","description":"Numbers excluded because they are on the workspace do-not-call list. A `phone_numbers` entry that matches no lead is screened before a lead is made for it, so a number reported here never becomes a new lead. A verbal opt-out on a call adds the number to that list automatically, workspace-wide, so previously-contacted people can appear here.\n","items":{"type":"string","example":"+972501234567","uniqueKey":"on_do_not_call.items.[INDEX]","typeLabel":"string"},"uniqueKey":"on_do_not_call","typeLabel":"string[]"},"not_found":{"type":"array","description":"IDs from `lead_ids` that are not leads in this workspace.","items":{"type":"string","format":"uuid","uniqueKey":"not_found.items.[INDEX]","typeLabel":"string\u003cuuid>"},"uniqueKey":"not_found","typeLabel":"string\u003cuuid>[]"},"in_another_campaign":{"type":"array","description":"Numbers another live campaign is already calling, each with that campaign. Not enrolled here: a number is dialed by one campaign at a time. A `draft` holds no number, so a number parked on a draft never appears here.\n","items":{"type":"object","properties":{"phone":{"type":"string","example":"+972501234567","uniqueKey":"in_another_campaign.items.[INDEX].phone","typeLabel":"string"},"lead_id":{"type":"string","format":"uuid","uniqueKey":"in_another_campaign.items.[INDEX].lead_id","typeLabel":"string\u003cuuid>"},"campaign_id":{"type":"string","format":"uuid","uniqueKey":"in_another_campaign.items.[INDEX].campaign_id","typeLabel":"string\u003cuuid>"},"campaign_name":{"oneOf":[{"type":"string","uniqueKey":"in_another_campaign.items.[INDEX].campaign_name.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"in_another_campaign.items.[INDEX].campaign_name.oneOf.1","typeLabel":"null"}],"uniqueKey":"in_another_campaign.items.[INDEX].campaign_name","typeLabel":"string | null"}},"uniqueKey":"in_another_campaign.items.[INDEX]","typeLabel":"object"},"uniqueKey":"in_another_campaign","typeLabel":"object[]"},"results":{"type":"array","description":"One entry per number that got past parsing and the do-not-call screen, in the order supplied (`lead_ids` first, then `phone_numbers`), each with its `row`: `enrolled`, `already_enrolled` (already on this campaign, or the same number twice in this request) or `in_another_campaign` (with `campaign_id` and `campaign_name`).\n","items":{"type":"object","properties":{"row":{"type":"integer","description":"The entry's position in the `lead_ids` or `phone_numbers` array sent, from 1 — the same count `invalid_phone` and `invalid_email` use.","uniqueKey":"results.items.[INDEX].row","typeLabel":"integer"},"phone":{"type":"string","example":"+972501234567","uniqueKey":"results.items.[INDEX].phone","typeLabel":"string"},"lead_id":{"type":"string","format":"uuid","uniqueKey":"results.items.[INDEX].lead_id","typeLabel":"string\u003cuuid>"},"result":{"type":"string","enum":["enrolled","already_enrolled","in_another_campaign"],"uniqueKey":"results.items.[INDEX].result","typeLabel":"enum\u003cstring>"},"campaign_id":{"type":"string","format":"uuid","description":"Only for `in_another_campaign`.","uniqueKey":"results.items.[INDEX].campaign_id","typeLabel":"string\u003cuuid>"},"campaign_name":{"oneOf":[{"type":"string","description":"Only for `in_another_campaign`.","uniqueKey":"results.items.[INDEX].campaign_name.oneOf.0","typeLabel":"string"},{"type":"null","description":"Only for `in_another_campaign`.","uniqueKey":"results.items.[INDEX].campaign_name.oneOf.1","typeLabel":"null"}],"uniqueKey":"results.items.[INDEX].campaign_name","typeLabel":"string | null"}},"uniqueKey":"results.items.[INDEX]","typeLabel":"object"},"uniqueKey":"results","typeLabel":"object[]"},"total_leads":{"type":"integer","description":"Total contacts enrolled in the campaign after this request. Present whenever a number reached the enrolment step — including when every one was already enrolled; omitted when every entry was skipped before it (an undiallable number, an unknown lead, the do-not-call list).","uniqueKey":"total_leads","typeLabel":"integer"},"company_id":{"type":"string","format":"uuid","uniqueKey":"company_id","typeLabel":"string\u003cuuid>"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"campaign_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","enrolled":123,"already_enrolled":123,"leads_created":123,"leads_matched":123,"duplicates_in_request":123,"invalid_phone":[{"row":123,"lead_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","phone":"\u003cstring>","name":"\u003cstring>","reason":"missing_phone","error":"\u003cstring>"}],"invalid_email":[{"row":123,"phone":"\u003cstring>","name":"\u003cstring>","email":"\u003cstring>","reason":"invalid_email"}],"on_do_not_call":["+972501234567"],"not_found":["3c90c3cc-0d44-4b50-8888-8dd25736052a"],"in_another_campaign":[{"phone":"+972501234567","lead_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","campaign_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","campaign_name":"\u003cstring>"}],"results":[{"row":123,"phone":"+972501234567","lead_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","result":"enrolled","campaign_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","campaign_name":"\u003cstring>"}],"total_leads":123,"company_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a"}}},"exampleType":"generated"}},"exampleType":"generated"},"d0008c67-5c8f-40d7-b0f5-011c9d81838d":{"description":"`CAMPAIGN_REQUEST_INVALID` with `issues[]`: a field the request or an entry does not read — each one named at once with `code: field_unknown`, its `path` (`/phone_numbers/0/emial`) and, when one is close, the field it was likely meant to be (\"Did you mean email?\"). Nothing is enrolled. `BAD_REQUEST`: a body that is not a JSON object, neither `lead_ids` nor `phone_numbers` supplied, more than 1,000 contacts in one request, or the campaign is `completed` / `stopped`.\n","content":{"application/json":{"schema":{"type":"object","required":["error","code"],"description":"Every error response - the secret-key API and the browser data plane alike - carries a\nhuman-readable `error` and a stable machine `code`, and a refusal that names what is\nwrong with the request carries `issues[]` too. Branch on `code`, never on the `error`\ntext. A refusal that names nothing more specific carries the code its status means:\n`BAD_REQUEST` (400), `UNAUTHORIZED` (401, the browser data plane; the secret-key API\nanswers `MISSING_KEY`, `INVALID_KEY` or `EXPIRED_KEY`), `BILLING_ERROR` (402),\n`FORBIDDEN` (403), `NOT_FOUND` (404), `METHOD_NOT_ALLOWED` (405), `CONFLICT` (409),\n`GONE` (410), `PAYLOAD_TOO_LARGE` (413), `UNSUPPORTED_MEDIA_TYPE` (415),\n`UNPROCESSABLE_REQUEST` (422), `RATE_LIMIT` (429), `INTERNAL_ERROR` (500),\n`UPSTREAM_ERROR` (502), `SERVICE_UNAVAILABLE` (503), `UPSTREAM_TIMEOUT` (504). Some\nrefusals add members of their own beside these (a call request's `status`, a workflow's\n`current_version`); the operation says which.\n","properties":{"error":{"type":"string","description":"The refusal, in one sentence for a person. Its wording may change.","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"code":{"type":"string","description":"The stable code to branch on.","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"issues":{"type":"array","description":"Each thing at fault, on a 400 or 422 that names them: every query parameter or body field, not just the first. `path` is the parameter's name or the field's location.\n","items":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"query_param_unknown, query_param_repeated, query_param_blank, query_param_invalid, field_unknown, field_required, field_invalid, or the route's own word.","isRequired":true,"uniqueKey":"issues.items.[INDEX].code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"issues.items.[INDEX].message","typeLabel":"string"},"path":{"type":"string","uniqueKey":"issues.items.[INDEX].path","typeLabel":"string"}},"uniqueKey":"issues.items.[INDEX]","typeLabel":"object"},"uniqueKey":"issues","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"\u003cstring>","code":"\u003cstring>","issues":[{"code":"\u003cstring>","message":"\u003cstring>","path":"\u003cstring>"}]}}},"exampleType":"generated"}},"exampleType":"generated"},"1eb0cdcd-e2a1-4bd6-8abb-29b5bea43cd1":{"description":"`NOT_FOUND`: no campaign with that id in this workspace. `CAMPAIGN_ARCHIVED`: it is archived; the message names `POST /campaigns/{id}/restore`, which brings it back. `RESOURCE_ID_INVALID`: the id in the path is not an id.\n","content":{"application/json":{"schema":{"type":"object","required":["error","code"],"description":"Every error response - the secret-key API and the browser data plane alike - carries a\nhuman-readable `error` and a stable machine `code`, and a refusal that names what is\nwrong with the request carries `issues[]` too. Branch on `code`, never on the `error`\ntext. A refusal that names nothing more specific carries the code its status means:\n`BAD_REQUEST` (400), `UNAUTHORIZED` (401, the browser data plane; the secret-key API\nanswers `MISSING_KEY`, `INVALID_KEY` or `EXPIRED_KEY`), `BILLING_ERROR` (402),\n`FORBIDDEN` (403), `NOT_FOUND` (404), `METHOD_NOT_ALLOWED` (405), `CONFLICT` (409),\n`GONE` (410), `PAYLOAD_TOO_LARGE` (413), `UNSUPPORTED_MEDIA_TYPE` (415),\n`UNPROCESSABLE_REQUEST` (422), `RATE_LIMIT` (429), `INTERNAL_ERROR` (500),\n`UPSTREAM_ERROR` (502), `SERVICE_UNAVAILABLE` (503), `UPSTREAM_TIMEOUT` (504). Some\nrefusals add members of their own beside these (a call request's `status`, a workflow's\n`current_version`); the operation says which.\n","properties":{"error":{"type":"string","description":"The refusal, in one sentence for a person. Its wording may change.","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"code":{"type":"string","description":"The stable code to branch on.","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"issues":{"type":"array","description":"Each thing at fault, on a 400 or 422 that names them: every query parameter or body field, not just the first. `path` is the parameter's name or the field's location.\n","items":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"query_param_unknown, query_param_repeated, query_param_blank, query_param_invalid, field_unknown, field_required, field_invalid, or the route's own word.","isRequired":true,"uniqueKey":"issues.items.[INDEX].code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"issues.items.[INDEX].message","typeLabel":"string"},"path":{"type":"string","uniqueKey":"issues.items.[INDEX].path","typeLabel":"string"}},"uniqueKey":"issues.items.[INDEX]","typeLabel":"object"},"uniqueKey":"issues","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"\u003cstring>","code":"\u003cstring>","issues":[{"code":"\u003cstring>","message":"\u003cstring>","path":"\u003cstring>"}]}}},"exampleType":"generated"}},"exampleType":"generated"},"e70676ad-d8aa-45b0-9758-3e64b0032d4f":{"description":"The check for numbers already on a campaign, or the write, failed. Safe to retry — enrolment is idempotent.","content":{"application/json":{"schema":{"type":"object","required":["error","code"],"description":"Every error response - the secret-key API and the browser data plane alike - carries a\nhuman-readable `error` and a stable machine `code`, and a refusal that names what is\nwrong with the request carries `issues[]` too. Branch on `code`, never on the `error`\ntext. A refusal that names nothing more specific carries the code its status means:\n`BAD_REQUEST` (400), `UNAUTHORIZED` (401, the browser data plane; the secret-key API\nanswers `MISSING_KEY`, `INVALID_KEY` or `EXPIRED_KEY`), `BILLING_ERROR` (402),\n`FORBIDDEN` (403), `NOT_FOUND` (404), `METHOD_NOT_ALLOWED` (405), `CONFLICT` (409),\n`GONE` (410), `PAYLOAD_TOO_LARGE` (413), `UNSUPPORTED_MEDIA_TYPE` (415),\n`UNPROCESSABLE_REQUEST` (422), `RATE_LIMIT` (429), `INTERNAL_ERROR` (500),\n`UPSTREAM_ERROR` (502), `SERVICE_UNAVAILABLE` (503), `UPSTREAM_TIMEOUT` (504). Some\nrefusals add members of their own beside these (a call request's `status`, a workflow's\n`current_version`); the operation says which.\n","properties":{"error":{"type":"string","description":"The refusal, in one sentence for a person. Its wording may change.","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"code":{"type":"string","description":"The stable code to branch on.","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"issues":{"type":"array","description":"Each thing at fault, on a 400 or 422 that names them: every query parameter or body field, not just the first. `path` is the parameter's name or the field's location.\n","items":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"query_param_unknown, query_param_repeated, query_param_blank, query_param_invalid, field_unknown, field_required, field_invalid, or the route's own word.","isRequired":true,"uniqueKey":"issues.items.[INDEX].code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"issues.items.[INDEX].message","typeLabel":"string"},"path":{"type":"string","uniqueKey":"issues.items.[INDEX].path","typeLabel":"string"}},"uniqueKey":"issues.items.[INDEX]","typeLabel":"object"},"uniqueKey":"issues","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"\u003cstring>","code":"\u003cstring>","issues":[{"code":"\u003cstring>","message":"\u003cstring>","path":"\u003cstring>"}]}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"2767439e-f0c6-4cd4-a450-ba11a6ab8311":{"apiKey":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"Your Yappr API key (e.g. `ypr_live_...`). Generate one in the dashboard under **Settings → API Keys**. No key is `401 MISSING_KEY`; a key that is not one of ours, or is revoked, is `401 INVALID_KEY`; an expired one is `401 EXPIRED_KEY`. A valid key without the scope an operation needs is `403 INSUFFICIENT_SCOPE` on every operation, and the message names the scope. Every response, a 401 included, carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset: the budget is 60 requests a minute per API key. Every 429, whatever its code, carries Retry-After (whole seconds, never zero): the per-key budget's `RATE_LIMIT` asks for what is left of the minute, a route's daily cap (`RATE_LIMITED`) for the time until that cap resets. All four headers are listed in Access-Control-Expose-Headers, so a browser can read them. A path the API does not serve (an unknown sub-path, an id left empty) is `404 ROUTE_NOT_FOUND`, and a method a served path does not take is `405 METHOD_NOT_ALLOWED` with an `Allow` header; both are answered before any scope check, and nothing is read or changed. A trailing slash is ignored where it cannot be an id left empty (`POST /calls/` is `POST /calls`) and refused where it can (`GET /calls/`). A doubled slash inside a path is merged into one before the request reaches the API (`GET //calls` is `GET /calls`).","scopes":[],"schemeName":"apiKey"}}},"servers":{"dc0c5f7d-c0c3-40b9-9c53-ce2239f5b67d":{"url":"https://api.goyappr.com","description":"Production"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"Your Yappr API key (e.g. `ypr_live_...`). Generate one in the dashboard under **Settings → API Keys**. No key is `401 MISSING_KEY`; a key that is not one of ours, or is revoked, is `401 INVALID_KEY`; an expired one is `401 EXPIRED_KEY`. A valid key without the scope an operation needs is `403 INSUFFICIENT_SCOPE` on every operation, and the message names the scope. Every response, a 401 included, carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset: the budget is 60 requests a minute per API key. Every 429, whatever its code, carries Retry-After (whole seconds, never zero): the per-key budget's `RATE_LIMIT` asks for what is left of the minute, a route's daily cap (`RATE_LIMITED`) for the time until that cap resets. All four headers are listed in Access-Control-Expose-Headers, so a browser can read them. A path the API does not serve (an unknown sub-path, an id left empty) is `404 ROUTE_NOT_FOUND`, and a method a served path does not take is `405 METHOD_NOT_ALLOWED` with an `Allow` header; both are answered before any scope check, and nothing is read or changed. A trailing slash is ignored where it cannot be an id left empty (`POST /calls/` is `POST /calls`) and refused where it can (`GET /calls/`). A doubled slash inside a path is merged into one before the request reaches the API (`GET //calls` is `GET /calls`).","scopes":[],"schemeName":"apiKey"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Your Yappr API key (e.g. `ypr_live_...`). Generate one in the dashboard under **Settings → API Keys**. No key is `401 MISSING_KEY`; a key that is not one of ours, or is revoked, is `401 INVALID_KEY`; an expired one is `401 EXPIRED_KEY`. A valid key without the scope an operation needs is `403 INSUFFICIENT_SCOPE` on every operation, and the message names the scope. Every response, a 401 included, carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset: the budget is 60 requests a minute per API key. Every 429, whatever its code, carries Retry-After (whole seconds, never zero): the per-key budget's `RATE_LIMIT` asks for what is left of the minute, a route's daily cap (`RATE_LIMITED`) for the time until that cap resets. All four headers are listed in Access-Control-Expose-Headers, so a browser can read them. A path the API does not serve (an unknown sub-path, an id left empty) is `404 ROUTE_NOT_FOUND`, and a method a served path does not take is `405 METHOD_NOT_ALLOWED` with an `Allow` header; both are answered before any scope check, and nothing is read or changed. A trailing slash is ignored where it cannot be an id left empty (`POST /calls/` is `POST /calls`) and refused where it can (`GET /calls/`). A doubled slash inside a path is merged into one before the request reaches the API (`GET //calls` is `GET /calls`).","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"apiKey","name":"Authorization"}],"title":"apiKey"}]},"originalFileLocation":"openapi.yaml"},"subdomain":"yappr","siteName":"Yappr","title":"Enroll contacts - Yappr","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-12T15:44:23.107Z","originalFileLocation":"api-reference/campaigns/enroll.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Enroll existing leads by lead_ids, raw numbers via phone_numbers, or both in one request. Raw numbers are normalized to E.164 and matched against your existing leads; a lead is created only when there is no match. Required scope campaigns:manage. A key limited to some agents enrolls into its own campaigns the same way: leads belong to the whole workspace, so this is the one way such a key creates or reuses one. Enrollment is per-row and idempotent: unparseable numbers, numbers on the do-not-call list, numbers another live campaign is calling, and unknown lead IDs are reported in the response instead of failing the batch, and re-enrolling an existing contact is a no-op. At most 1,000 contacts per request — send several requests for larger lists. You can enroll into a running campaign; new contacts join the pacing queue. A completed, stopped or archived campaign rejects enrollment.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Yappr\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/yappr/-dhyiEDTEuUg9xPr/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/yappr/-dhyiEDTEuUg9xPr/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/yappr/-dhyiEDTEuUg9xPr/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/yappr/-dhyiEDTEuUg9xPr/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/yappr/-dhyiEDTEuUg9xPr/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/yappr/-dhyiEDTEuUg9xPr/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/yappr/-dhyiEDTEuUg9xPr/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/yappr/-dhyiEDTEuUg9xPr/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/yappr/-dhyiEDTEuUg9xPr/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Enroll contacts - Yappr\">\u003cmeta data-mint-head property=\"og:description\" content=\"Enroll existing leads by lead_ids, raw numbers via phone_numbers, or both in one request. Raw numbers are normalized to E.164 and matched against your existing leads; a lead is created only when there is no match. Required scope campaigns:manage. A key limited to some agents enrolls into its own campaigns the same way: leads belong to the whole workspace, so this is the one way such a key creates or reuses one. Enrollment is per-row and idempotent: unparseable numbers, numbers on the do-not-call list, numbers another live campaign is calling, and unknown lead IDs are reported in the response instead of failing the batch, and re-enrolling an existing contact is a no-op. At most 1,000 contacts per request — send several requests for larger lists. You can enroll into a running campaign; new contacts join the pacing queue. A completed, stopped or archived campaign rejects enrollment.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Yappr\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.goyappr.com/api-reference/campaigns/enroll\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://yappr.mintlify.site/_mintlify/api/og/v2?division=Contacts\u0026amp;title=Enroll+contacts\u0026amp;description=Enroll+existing+leads+by+%60lead_ids%60%2C+raw+numbers+via+%60phone_numbers%60%2C+or+both+in%0Aone+request.+Raw+numbers+are+normalized+to+E.164+and+matched+against+your+exist\u0026amp;theme=1423bf5e3b005ceb227321bc\u0026amp;signature=42ddb85a85ce54aa6438929fbecb99c3eb73ba7a2eeff3b42687f8bb8cbcd6f2\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Enroll contacts - Yappr\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Enroll existing leads by lead_ids, raw numbers via phone_numbers, or both in one request. Raw numbers are normalized to E.164 and matched against your existing leads; a lead is created only when there is no match. Required scope campaigns:manage. A key limited to some agents enrolls into its own campaigns the same way: leads belong to the whole workspace, so this is the one way such a key creates or reuses one. Enrollment is per-row and idempotent: unparseable numbers, numbers on the do-not-call list, numbers another live campaign is calling, and unknown lead IDs are reported in the response instead of failing the batch, and re-enrolling an existing contact is a no-op. At most 1,000 contacts per request — send several requests for larger lists. You can enroll into a running campaign; new contacts join the pacing queue. A completed, stopped or archived campaign rejects enrollment.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://yappr.mintlify.site/_mintlify/api/og/v2?division=Contacts\u0026amp;title=Enroll+contacts\u0026amp;description=Enroll+existing+leads+by+%60lead_ids%60%2C+raw+numbers+via+%60phone_numbers%60%2C+or+both+in%0Aone+request.+Raw+numbers+are+normalized+to+E.164+and+matched+against+your+exist\u0026amp;theme=1423bf5e3b005ceb227321bc\u0026amp;signature=42ddb85a85ce54aa6438929fbecb99c3eb73ba7a2eeff3b42687f8bb8cbcd6f2\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/yappr/-dhyiEDTEuUg9xPr/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Yappr\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#6366f1\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.goyappr.com/api-reference/campaigns/enroll\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/campaigns/enroll.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.goyappr.com/#organization\",\"name\":\"Yappr\",\"url\":\"https://docs.goyappr.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/yappr/E1AQ46GZ-5iPcyPp/logo/light.svg?fit=max\u0026auto=format\u0026n=E1AQ46GZ-5iPcyPp\u0026q=85\u0026s=a117ff3aa08c2017e8d58b0da5be882f\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.goyappr.com#website\",\"name\":\"Yappr\",\"url\":\"https://docs.goyappr.com\",\"publisher\":{\"@id\":\"https://docs.goyappr.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.goyappr.com/api-reference/campaigns/enroll#webpage\",\"url\":\"https://docs.goyappr.com/api-reference/campaigns/enroll\",\"name\":\"Enroll contacts\",\"description\":\"Enroll existing leads by lead_ids, raw numbers via phone_numbers, or both in one request. Raw numbers are normalized to E.164 and matched against your existing leads; a lead is created only when there is no match. Required scope campaigns:manage. A key limited to some agents enrolls into its own campaigns the same way: leads belong to the whole workspace, so this is the one way such a key creates or reuses one. Enrollment is per-row and idempotent: unparseable numbers, numbers on the do-not-call list, numbers another live campaign is calling, and unknown lead IDs are reported in the response instead of failing the batch, and re-enrolling an existing contact is a no-op. At most 1,000 contacts per request — send several requests for larger lists. You can enroll into a running campaign; new contacts join the pacing queue. A completed, stopped or archived campaign rejects enrollment.\",\"dateModified\":\"2026-11-12T15:44:23.107Z\",\"isPartOf\":{\"@id\":\"https://docs.goyappr.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.goyappr.com/api-reference/campaigns/enroll#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.goyappr.com/api-reference/campaigns/enroll#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Campaigns\",\"item\":\"https://docs.goyappr.com/api-reference/campaigns/list\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Enroll contacts\",\"item\":\"https://docs.goyappr.com/api-reference/campaigns/enroll\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.goyappr.com/api-reference/campaigns/enroll#apireference\",\"headline\":\"Enroll contacts\",\"name\":\"Enroll contacts\",\"description\":\"Enroll existing leads by lead_ids, raw numbers via phone_numbers, or both in one request. Raw numbers are normalized to E.164 and matched against your existing leads; a lead is created only when there is no match. Required scope campaigns:manage. A key limited to some agents enrolls into its own campaigns the same way: leads belong to the whole workspace, so this is the one way such a key creates or reuses one. Enrollment is per-row and idempotent: unparseable numbers, numbers on the do-not-call list, numbers another live campaign is calling, and unknown lead IDs are reported in the response instead of failing the batch, and re-enrolling an existing contact is a no-op. At most 1,000 contacts per request — send several requests for larger lists. You can enroll into a running campaign; new contacts join the pacing queue. A completed, stopped or archived campaign rejects enrollment.\",\"url\":\"https://docs.goyappr.com/api-reference/campaigns/enroll\",\"mainEntityOfPage\":{\"@id\":\"https://docs.goyappr.com/api-reference/campaigns/enroll#webpage\"},\"dateModified\":\"2026-11-12T15:44:23.107Z\",\"publisher\":{\"@id\":\"https://docs.goyappr.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.goyappr.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Yappr\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Yappr\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/campaigns/enroll.md","siteName":"Yappr","nav":{"global":null,"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/introduction"}]},{"tab":"API Reference","groups":[{"group":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/introduction"},{"title":"Connect through MCP","href":"/api-reference/mcp/connect"},{"title":"Error Codes","href":"/api-reference/errors"},{"title":"Report an issue","openapi":"POST /report-issue","href":"/api-reference/report-issue"}]},{"group":"Billing","pages":[{"title":"Get Billing Status","openapi":"GET /billing","href":"/api-reference/billing/get-status"},{"title":"Get Billing Rates","openapi":"GET /billing/rates","href":"/api-reference/billing/rates"},{"title":"Set Spending Limit","openapi":"PATCH /billing","href":"/api-reference/billing/spending-limit"},{"title":"Setup Payment Method","openapi":"POST /billing/setup","href":"/api-reference/billing/setup-payment"},{"title":"Top Up Credits","openapi":"POST /billing/topup","href":"/api-reference/billing/topup"},{"title":"Billing Consumption","openapi":"GET /billing/consumption","href":"/api-reference/billing/consumption"},{"title":"Billing Transactions","openapi":"GET /billing/transactions","href":"/api-reference/billing/transactions"},{"title":"Get Billing Transaction","openapi":"GET /billing/transactions/{id}","href":"/api-reference/billing/transaction"},{"title":"Get Billing Details","openapi":"GET /billing/details","href":"/api-reference/billing/details"},{"title":"Update Billing Details","openapi":"PATCH /billing/details","href":"/api-reference/billing/update-details"},{"title":"List Invoices","openapi":"GET /billing/invoices","href":"/api-reference/billing/invoices"}]},{"group":"Agents","pages":[{"title":"List Agents","openapi":"GET /agents","href":"/api-reference/agents/list"},{"title":"Create Agent","openapi":"POST /agents","href":"/api-reference/agents/create"},{"title":"Duplicate Agent","openapi":"POST /agents/{id}/duplicate","href":"/api-reference/agents/duplicate"},{"title":"Test an Agent by Phone","openapi":"POST /agents/{id}/test-call","href":"/api-reference/agents/test-call"},{"title":"Which Line Rings a Test Call","openapi":"GET /agents/{id}/test-call","href":"/api-reference/agents/test-call-caller"},{"title":"Get Agent","openapi":"GET /agents/{id}","href":"/api-reference/agents/get"},{"title":"Update Agent","openapi":"PATCH /agents/{id}","href":"/api-reference/agents/update"},{"title":"Read workflow agent settings","openapi":"GET /agents/{id}/settings","href":"/api-reference/agents/settings"},{"title":"Idle reminders","href":"/api-reference/agents/idle-reminders"},{"title":"List an agent's tools \u0026 integrations","openapi":"GET /agents/{id}/tools-and-integrations","href":"/api-reference/agents/tools-and-integrations"},{"title":"List an agent's integrations","openapi":"GET /agents/{id}/integrations","href":"/api-reference/agents/integrations-list"},{"title":"Give an agent a connected app","openapi":"POST /agents/{id}/integrations","href":"/api-reference/agents/integrations-add"},{"title":"Change an integration's actions","openapi":"PATCH /agents/{id}/integrations/{integration_id}","href":"/api-reference/agents/integrations-update"},{"title":"Stop an agent using an app","openapi":"DELETE /agents/{id}/integrations/{integration_id}","href":"/api-reference/agents/integrations-remove"},{"title":"Dry-run Extraction","openapi":"POST /agents/{id}/extraction/dry-run","href":"/api-reference/agents/extraction-dry-run"},{"title":"Remove Agent","openapi":"DELETE /agents/{id}","href":"/api-reference/agents/delete"},{"title":"Models","href":"/api-reference/agents/models"},{"title":"Languages","href":"/api-reference/agents/languages"},{"title":"Voices","href":"/api-reference/agents/voices"},{"title":"Flow Config Schema","href":"/api-reference/agents/flow-config-schema"}]},{"group":"Flow Agents","pages":[{"title":"List Flow Versions","openapi":"GET /agents/{id}/flow/versions","href":"/api-reference/flows/list-versions"},{"title":"Restore Flow Version","openapi":"POST /agents/{id}/flow/restore","href":"/api-reference/flows/restore-version"},{"title":"Test a Flow","openapi":"POST /agents/{id}/flow/test","href":"/api-reference/flows/test"}]},{"group":"Workflows","pages":[{"title":"Read workflow","openapi":"GET /agents/{id}/workflow","href":"/api-reference/workflows/get"},{"title":"Save workflow draft","openapi":"PUT /agents/{id}/workflow","href":"/api-reference/workflows/save"},{"title":"Point bindings at other tools","openapi":"POST /agents/{id}/workflow/rebind","href":"/api-reference/workflows/rebind"},{"title":"Check workflow","openapi":"POST /agents/{id}/workflow/validate","href":"/api-reference/workflows/validate"},{"title":"Publish workflow","openapi":"POST /agents/{id}/workflow/publish","href":"/api-reference/workflows/publish"},{"title":"List workflow versions","openapi":"GET /agents/{id}/workflow/versions","href":"/api-reference/workflows/versions"},{"title":"Get workflow version","openapi":"GET /agents/{id}/workflow/versions/{version_id}","href":"/api-reference/workflows/version"},{"title":"Restore workflow version","openapi":"POST /agents/{id}/workflow/restore","href":"/api-reference/workflows/restore"},{"title":"Teach an agent from a test call","openapi":"POST /agents/{id}/workflow/train","href":"/api-reference/workflows/train"},{"title":"Read workflow tool catalog","openapi":"GET /tools/workflow-catalog","href":"/api-reference/workflows/catalog"},{"title":"Trigger events","href":"/api-reference/workflows/events"},{"title":"Opening line from a Before step","href":"/api-reference/workflows/greeting-from-before"}]},{"group":"Webhooks","pages":[{"title":"Webhooks","href":"/api-reference/webhooks"},{"title":"List Deliveries","openapi":"GET /deliveries","href":"/api-reference/deliveries/list"},{"title":"Get Delivery","openapi":"GET /deliveries/{id}","href":"/api-reference/deliveries/get"},{"title":"Retry Delivery","openapi":"POST /deliveries/{id}/retry","href":"/api-reference/deliveries/retry"}]},{"group":"Tools \u0026 integrations","pages":[{"group":"Connected accounts","pages":[{"title":"List account connection options","openapi":"GET /tool-apps/connection-options","href":"/api-reference/tool-connections/apps"},{"title":"List connected accounts","openapi":"GET /tool-connections","href":"/api-reference/tool-connections/list"},{"title":"Get connection readiness","openapi":"GET /tool-connections/{id}","href":"/api-reference/tool-connections/get"},{"title":"Connect a workspace account","openapi":"POST /tool-connections","href":"/api-reference/tool-connections/connect"},{"title":"Read authorization status","openapi":"GET /tool-connection-auth-attempts/{id}","href":"/api-reference/tool-connections/auth-attempt"},{"title":"Cancel an authorization attempt","openapi":"POST /tool-connections/attempts/{id}/cancel","href":"/api-reference/tool-connections/cancel-attempt"},{"title":"Connect a replacement account","openapi":"POST /tool-connections/{id}/reconnect","href":"/api-reference/tool-connections/reconnect"},{"title":"Disconnect an account","openapi":"DELETE /tool-connections/{id}","href":"/api-reference/tool-connections/disconnect"},{"title":"Rename an account","openapi":"PATCH /tool-connections/{id}","href":"/api-reference/tool-connections/rename"},{"title":"What a connected app can do","openapi":"GET /tool-connections/{id}/actions","href":"/api-reference/tool-connections/actions"},{"title":"Make an app's actions ready","openapi":"POST /tool-connections/{id}/actions/prepare","href":"/api-reference/tool-connections/prepare-actions"},{"title":"List an account's choices for an input","openapi":"GET /tool-connections/{id}/options/{resource}","href":"/api-reference/tool-connections/options"},{"title":"Check that an account works","openapi":"POST /tool-connections/{id}/check","href":"/api-reference/tool-connections/check"},{"title":"The agents using an app","openapi":"GET /tool-connections/{id}/agents","href":"/api-reference/tool-connections/agents"},{"title":"Take an account off the list","openapi":"POST /tool-connections/{id}/remove","href":"/api-reference/tool-connections/remove"},{"title":"Clear the attempts nobody finished","openapi":"POST /tool-connections/cleanup","href":"/api-reference/tool-connections/cleanup"}]},{"group":"Tools","pages":[{"title":"List Tools","openapi":"GET /tools","href":"/api-reference/tools/list"},{"title":"Create Tool","openapi":"POST /tools","href":"/api-reference/tools/create"},{"title":"Discover Apps","openapi":"GET /tool-apps","href":"/api-reference/tools/apps"},{"title":"Get App Versions","openapi":"GET /tool-apps/{slug}","href":"/api-reference/tools/app"},{"title":"Discover Versioned Actions","openapi":"GET /tool-apps/{slug}/actions","href":"/api-reference/tools/actions"},{"title":"Get Full Action Schemas","openapi":"GET /tool-apps/{slug}/actions/{action}","href":"/api-reference/tools/action"},{"title":"Get Tool","openapi":"GET /tools/{id}","href":"/api-reference/tools/get"},{"title":"Get Current Tool Schemas","openapi":"GET /tools/{id}/schema","href":"/api-reference/tools/schema"},{"title":"List Tool Bindings","openapi":"GET /tools/{id}/bindings","href":"/api-reference/tools/bindings"},{"title":"List Tool Contract Revisions","openapi":"GET /tools/{id}/workflow-revisions","href":"/api-reference/tools/revisions"},{"title":"Add a Tool Contract Revision","openapi":"POST /tools/{id}/workflow-revisions","href":"/api-reference/tools/create-revision"},{"title":"Update Tool","openapi":"PATCH /tools/{id}","href":"/api-reference/tools/update"},{"title":"Archive Tool","openapi":"DELETE /tools/{id}","href":"/api-reference/tools/delete"},{"title":"Restore Tool","openapi":"POST /tools/{id}/restore","href":"/api-reference/tools/restore"},{"title":"Attach Tool to Agent","openapi":"POST /tools/attach","href":"/api-reference/tools/attach"},{"title":"Detach Tool from Agent","openapi":"POST /tools/detach","href":"/api-reference/tools/detach"},{"title":"Test Saved Tool","openapi":"POST /tools/{id}/test","href":"/api-reference/tools/test"},{"title":"Get Saved Tool Test","openapi":"GET /tools/{id}/tests/{test_id}","href":"/api-reference/tools/test-get"},{"title":"Cancel Tool Test","openapi":"POST /tools/{id}/tests/{test_id}/cancel","href":"/api-reference/tools/test-cancel"}]}]},{"group":"Phone Numbers","pages":[{"title":"List Owned Numbers","openapi":"GET /phone-numbers","href":"/api-reference/phone-numbers/list"},{"title":"Search Available Numbers","openapi":"POST /phone-numbers/search","href":"/api-reference/phone-numbers/search"},{"title":"Purchase Number","openapi":"POST /phone-numbers/purchase","href":"/api-reference/phone-numbers/purchase"},{"title":"Update Number","openapi":"PATCH /phone-numbers/{id}","href":"/api-reference/phone-numbers/update"},{"title":"Configure Number","openapi":"POST /phone-numbers/configure","href":"/api-reference/phone-numbers/configure"},{"title":"Release Number","openapi":"POST /phone-numbers/{id}/release","href":"/api-reference/phone-numbers/release"},{"title":"Keep Number","openapi":"POST /phone-numbers/{id}/keep","href":"/api-reference/phone-numbers/keep"}]},{"group":"SIP Endpoints","pages":[{"title":"SIP Endpoints Status","openapi":"GET /sip-endpoints/status","href":"/api-reference/sip-endpoints/status"},{"title":"List SIP Endpoints","openapi":"GET /sip-endpoints","href":"/api-reference/sip-endpoints/list"},{"title":"Create SIP Endpoint","openapi":"POST /sip-endpoints","href":"/api-reference/sip-endpoints/create"},{"title":"Get SIP Endpoint","openapi":"GET /sip-endpoints/{id}","href":"/api-reference/sip-endpoints/get"},{"title":"Update SIP Endpoint","openapi":"PATCH /sip-endpoints/{id}","href":"/api-reference/sip-endpoints/update"},{"title":"Delete SIP Endpoint","openapi":"DELETE /sip-endpoints/{id}","href":"/api-reference/sip-endpoints/delete"},{"title":"Rotate SIP Endpoint Password","openapi":"POST /sip-endpoints/{id}/rotate-password","href":"/api-reference/sip-endpoints/rotate-password"}]},{"group":"Carrier accounts","pages":[{"title":"Carrier Accounts Status","openapi":"GET /carrier-accounts/status","href":"/api-reference/carrier-accounts/status"},{"title":"List Carrier Accounts","openapi":"GET /carrier-accounts","href":"/api-reference/carrier-accounts/list"},{"title":"Connect a Telnyx Account","openapi":"POST /carrier-accounts","href":"/api-reference/carrier-accounts/create"},{"title":"Get Carrier Account","openapi":"GET /carrier-accounts/{id}","href":"/api-reference/carrier-accounts/get"},{"title":"Update Carrier Account","openapi":"PATCH /carrier-accounts/{id}","href":"/api-reference/carrier-accounts/update"},{"title":"Disconnect Carrier Account","openapi":"DELETE /carrier-accounts/{id}","href":"/api-reference/carrier-accounts/delete"},{"title":"Choose the Call Control App","openapi":"POST /carrier-accounts/{id}/connection","href":"/api-reference/carrier-accounts/connection"},{"title":"Test Carrier Account","openapi":"POST /carrier-accounts/{id}/test","href":"/api-reference/carrier-accounts/test"},{"title":"Turn a Paused Account Back On","openapi":"POST /carrier-accounts/{id}/reactivate","href":"/api-reference/carrier-accounts/reactivate"},{"title":"Sync Numbers","openapi":"POST /carrier-accounts/{id}/sync","href":"/api-reference/carrier-accounts/sync"},{"title":"Add Number to Carrier Account","openapi":"POST /carrier-accounts/{id}/numbers","href":"/api-reference/carrier-accounts/add-number"},{"title":"Answer a Number's Calls in Yappr","openapi":"POST /carrier-accounts/{id}/numbers/{phone_number_id}/configure","href":"/api-reference/carrier-accounts/configure-number"},{"title":"Stop Answering a Number's Calls in Yappr","openapi":"DELETE /carrier-accounts/{id}/numbers/{phone_number_id}/configure","href":"/api-reference/carrier-accounts/restore-number"},{"title":"Remove Number from This Workspace","openapi":"DELETE /carrier-accounts/{id}/numbers/{phone_number_id}","href":"/api-reference/carrier-accounts/remove-number"}]},{"group":"Calls","pages":[{"title":"Create Outbound Call","openapi":"POST /calls","href":"/api-reference/calls/create"},{"title":"List Calls","openapi":"GET /calls","href":"/api-reference/calls/list"},{"title":"Export Calls","openapi":"GET /calls/export","href":"/api-reference/calls/export"},{"title":"Get Call","openapi":"GET /calls/{id}","href":"/api-reference/calls/get"},{"title":"End an Unopened Browser Session","openapi":"POST /calls/{id}/end","href":"/api-reference/calls/end"},{"title":"Get Call Recording","openapi":"GET /calls/{id}/recording","href":"/api-reference/calls/recording"},{"title":"Revoke Recording Links","openapi":"POST /calls/{id}/recording/revoke","href":"/api-reference/calls/recording-revoke"},{"title":"Create Web Call Request","openapi":"POST /call-requests","href":"/api-reference/calls/request-create"},{"title":"Get Call Request","openapi":"GET /call-requests/{id}","href":"/api-reference/calls/request-get"},{"title":"Start Web Call Request","openapi":"POST /call-requests/{id}/start","href":"/api-reference/calls/request-start"},{"title":"Cancel Call Request","openapi":"POST /call-requests/{id}/cancel","href":"/api-reference/calls/request-cancel"}]},{"group":"Browser calls","pages":[{"title":"TURN Credentials","openapi":"POST /turn-credentials","href":"/api-reference/web-call/turn-credentials"},{"title":"Connect a Browser Call","openapi":"POST /web-call","href":"/api-reference/web-call/offer"},{"title":"Cancel a Browser Session","openapi":"POST /web-call/cancel","href":"/api-reference/web-call/cancel"},{"title":"Create Browser Call Request","openapi":"POST /web-call/call-requests","href":"/api-reference/web-call/request-create"},{"title":"Poll Browser Call Request","openapi":"GET /web-call/call-requests/{id}","href":"/api-reference/web-call/request-get"},{"title":"Start Browser Call Request","openapi":"POST /web-call/call-requests/{id}/start","href":"/api-reference/web-call/request-start"},{"title":"Cancel Browser Call Request","openapi":"POST /web-call/call-requests/{id}/cancel","href":"/api-reference/web-call/request-cancel"}]},{"group":"Do Not Call","pages":[{"title":"List DNC entries","openapi":"GET /do-not-call","href":"/api-reference/do-not-call/list"},{"title":"Add to DNC list","openapi":"POST /do-not-call","href":"/api-reference/do-not-call/add"},{"title":"Get DNC entry","openapi":"GET /do-not-call/{id}","href":"/api-reference/do-not-call/get"},{"title":"Update DNC entry","openapi":"PATCH /do-not-call/{id}","href":"/api-reference/do-not-call/update"},{"title":"Remove from DNC list","openapi":"DELETE /do-not-call/{id}","href":"/api-reference/do-not-call/delete"}]},{"group":"API Keys","pages":[{"title":"List API keys","openapi":"GET /api-keys","href":"/api-reference/api-keys/list"},{"title":"Issue an API key","openapi":"POST /api-keys","href":"/api-reference/api-keys/create"},{"title":"Get an API key","openapi":"GET /api-keys/{id}","href":"/api-reference/api-keys/get"},{"title":"Revoke an API key","openapi":"DELETE /api-keys/{id}","href":"/api-reference/api-keys/delete"}]},{"group":"Call Windows","pages":[{"title":"Get call time windows","openapi":"GET /call-windows","href":"/api-reference/call-windows/get"},{"title":"Update call time windows","openapi":"PUT /call-windows","href":"/api-reference/call-windows/update"}]},{"group":"Dispositions","pages":[{"title":"List Dispositions","openapi":"GET /dispositions","href":"/api-reference/dispositions/list"},{"title":"Create Disposition","openapi":"POST /dispositions","href":"/api-reference/dispositions/create"},{"title":"Get Disposition","openapi":"GET /dispositions/{id}","href":"/api-reference/dispositions/get"},{"title":"Update Disposition","openapi":"PATCH /dispositions/{id}","href":"/api-reference/dispositions/update"},{"title":"Delete Disposition","openapi":"DELETE /dispositions/{id}","href":"/api-reference/dispositions/delete"}]},{"group":"Leads","pages":[{"title":"List Leads","openapi":"GET /leads","href":"/api-reference/leads/list"},{"title":"Create Lead","openapi":"POST /leads","href":"/api-reference/leads/create"},{"title":"Get Lead","openapi":"GET /leads/{id}","href":"/api-reference/leads/get"},{"title":"Update Lead","openapi":"PATCH /leads/{id}","href":"/api-reference/leads/update"},{"title":"Delete Lead","openapi":"DELETE /leads/{id}","href":"/api-reference/leads/delete"}]},{"group":"Lead Tags","pages":[{"title":"List Lead Tags","openapi":"GET /lead-tags","href":"/api-reference/lead-tags/list"},{"title":"Create Lead Tag","openapi":"POST /lead-tags","href":"/api-reference/lead-tags/create"},{"title":"Get Lead Tag","openapi":"GET /lead-tags/{id}","href":"/api-reference/lead-tags/get"},{"title":"Update Lead Tag","openapi":"PATCH /lead-tags/{id}","href":"/api-reference/lead-tags/update"},{"title":"Delete Lead Tag","openapi":"DELETE /lead-tags/{id}","href":"/api-reference/lead-tags/delete"}]},{"group":"Campaigns","pages":[{"title":"List campaigns","openapi":"GET /campaigns","href":"/api-reference/campaigns/list"},{"title":"Suggested campaign settings","openapi":"GET /campaigns/defaults","href":"/api-reference/campaigns/defaults"},{"title":"Create a campaign","openapi":"POST /campaigns","href":"/api-reference/campaigns/create"},{"title":"Get a campaign","openapi":"GET /campaigns/{id}","href":"/api-reference/campaigns/get"},{"title":"Update a campaign","openapi":"PATCH /campaigns/{id}","href":"/api-reference/campaigns/update"},{"title":"Archive a campaign","openapi":"DELETE /campaigns/{id}","href":"/api-reference/campaigns/archive"},{"title":"Restore a campaign","openapi":"POST /campaigns/{id}/restore","href":"/api-reference/campaigns/restore"},{"title":"Launch a campaign","openapi":"POST /campaigns/{id}/launch","href":"/api-reference/campaigns/launch"},{"title":"Pause a campaign","openapi":"POST /campaigns/{id}/pause","href":"/api-reference/campaigns/pause"},{"title":"Resume a campaign","openapi":"POST /campaigns/{id}/resume","href":"/api-reference/campaigns/resume"},{"title":"Stop a campaign","openapi":"POST /campaigns/{id}/stop","href":"/api-reference/campaigns/stop"},{"title":"Campaign stats","openapi":"GET /campaigns/{id}/stats","description":"Progress counters plus `last_tick_result` — the engine's own account of what it\nlast did with this campaign, and the field to read when a `running` campaign looks\nidle. Required scope `campaigns:read`.\n","href":"/api-reference/campaigns/stats"},{"group":"Contacts","pages":[{"title":"Enroll contacts","openapi":"POST /campaigns/{id}/leads","href":"/api-reference/campaigns/enroll"},{"title":"List enrolled contacts","openapi":"GET /campaigns/{id}/leads","description":"Enrolled contacts and their per-contact state, oldest enrollment first. Required\nscope `campaigns:read`. Each contact's `lead` is the full Lead only for a key that\nalso holds `leads:read`; without it `lead` is `{id}`, as on `GET /calls`.\n","href":"/api-reference/campaigns/list-leads"},{"title":"Exclude a contact","openapi":"DELETE /campaigns/{id}/leads/{lead_id}","href":"/api-reference/campaigns/exclude"}]}]},{"group":"Shared Links","pages":[{"title":"List Shared Links","openapi":"GET /shared-links","href":"/api-reference/shared-links/list"},{"title":"Create Shared Link","openapi":"POST /shared-links","href":"/api-reference/shared-links/create"},{"title":"Get Shared Link","openapi":"GET /shared-links/{id}","href":"/api-reference/shared-links/get"},{"title":"Revoke Shared Link","openapi":"PATCH /shared-links/{id}","href":"/api-reference/shared-links/update"}]},{"group":"Affiliates","pages":[{"title":"Affiliate stats","openapi":"GET /affiliates/stats","href":"/api-reference/affiliates/stats"},{"title":"List sub-affiliates","openapi":"GET /affiliates/downline","href":"/api-reference/affiliates/downline"}]},{"group":"Agent Eval","pages":[{"group":"Personas","pages":[{"title":"List Personas","openapi":"GET /agent-eval/personas","href":"/api-reference/agent-eval/personas/list"},{"title":"Create Persona","openapi":"POST /agent-eval/personas","href":"/api-reference/agent-eval/personas/create"},{"title":"Get Persona","openapi":"GET /agent-eval/personas/{id}","href":"/api-reference/agent-eval/personas/get"},{"title":"Update Persona","openapi":"PATCH /agent-eval/personas/{id}","href":"/api-reference/agent-eval/personas/update"},{"title":"Delete Persona","openapi":"DELETE /agent-eval/personas/{id}","href":"/api-reference/agent-eval/personas/delete"}]},{"group":"Cases","pages":[{"title":"List Cases","openapi":"GET /agent-eval/cases","href":"/api-reference/agent-eval/cases/list"},{"title":"Create Case","openapi":"POST /agent-eval/cases","href":"/api-reference/agent-eval/cases/create"},{"title":"Get Case","openapi":"GET /agent-eval/cases/{id}","href":"/api-reference/agent-eval/cases/get"},{"title":"Update Case","openapi":"PATCH /agent-eval/cases/{id}","href":"/api-reference/agent-eval/cases/update"},{"title":"Delete Case","openapi":"DELETE /agent-eval/cases/{id}","href":"/api-reference/agent-eval/cases/delete"},{"title":"Run a Case","openapi":"POST /agent-eval/cases/{case_id}/run","href":"/api-reference/agent-eval/cases/run"}]},{"group":"Suites","pages":[{"title":"List Suites","openapi":"GET /agent-eval/suites","href":"/api-reference/agent-eval/suites/list"},{"title":"Create Suite","openapi":"POST /agent-eval/suites","href":"/api-reference/agent-eval/suites/create"},{"title":"Get Suite","openapi":"GET /agent-eval/suites/{id}","href":"/api-reference/agent-eval/suites/get"},{"title":"Update Suite","openapi":"PATCH /agent-eval/suites/{id}","href":"/api-reference/agent-eval/suites/update"},{"title":"Delete Suite","openapi":"DELETE /agent-eval/suites/{id}","href":"/api-reference/agent-eval/suites/delete"},{"title":"Run a Suite","openapi":"POST /agent-eval/suites/{id}/run","href":"/api-reference/agent-eval/suites/run"},{"title":"List Suite Executions","openapi":"GET /agent-eval/suites/{id}/runs","href":"/api-reference/agent-eval/suites/runs/list"},{"title":"Get Suite Execution","openapi":"GET /agent-eval/suites/{id}/runs/{suite_run_id}","href":"/api-reference/agent-eval/suites/runs/get"}]},{"group":"Runs","pages":[{"title":"List Runs","openapi":"GET /agent-eval/runs","href":"/api-reference/agent-eval/runs/list"},{"title":"Get Run","openapi":"GET /agent-eval/runs/{id}","href":"/api-reference/agent-eval/runs/get"},{"title":"Get Run Turns","openapi":"GET /agent-eval/runs/{id}/turns","href":"/api-reference/agent-eval/runs/turns"},{"title":"Get Run Evaluation","openapi":"GET /agent-eval/runs/{id}/evaluation","href":"/api-reference/agent-eval/runs/evaluation"},{"title":"Cancel a Run","openapi":"POST /agent-eval/runs/{id}/cancel","href":"/api-reference/agent-eval/runs/cancel"}]}]}]}]},"basePath":"","title":"Enroll contacts - Yappr","deploymentId":"dpl_EtLmMeZHkKGqAjV1DiX4ZXCriDj3","buildId":"dpl_EtLmMeZHkKGqAjV1DiX4ZXCriDj3","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CWRF67qg.js","snippetPresets-BR8BoZAC.js","utils-D5WEoDBM.js","style-to-object-BY3JEAdk.js","utils-B79vXYXV.js","v4-DIgz8zy6.js","addUniqueKeysToSchema-C59iNs-S.js","conditional-requirements-CFM0id0Q.js","cloneDeep-455jK_K_.js","_Uint8Array-BEecbuUl.js","isObject-FP1Yky1u.js","ApiExamples-CFRHL52q.js","usePlaygroundInputsStore-Caip2xMX.js","shallow-BS-qcxmX.js","isEqual-CEpbaqh9.js","CodeSnippets-B-R0FAqw.js","CodeSnippet-Bkkti1IB.js","use-playground-group-access-BLvLSz8w.js","Page-UFatEFaf.js","api-description-markdown-Cny85OC3.js","DynamicMarkdown-Czhs88Hc.js","SectionHeading-B08KBUKT.js","MethodPill-D8OvWg5y.js","getPastedJson-tB5m0_yh.js","Check2Icon-CeP__a4S.js","axios-CsQoIw0U.js","Markdown-LI7DSqeK.js","AssistantPageLink-bYxdsqKl.js","dist-DXTH2WLA.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}