{"openapi":"3.1.0","info":{"title":"DialerDay API","version":"1.0.0","description":"Everything your team does in the app, from your own code: contacts, texts, calls, campaigns, tasks, team, workflows and more.\n\n**Authentication.** Create a key under Settings → API keys and send it as `Authorization: Bearer dlr_…` (or `X-API-Key`). Each key has permissions (scopes); a key without the one an endpoint needs gets 403 `insufficient_scope`.\n\n**Conventions.** JSON in and out, snake_case names, ISO 8601 times. Lists return `items` (and `total` where known); page with `limit` and `offset`. Errors are `{ \"error\": code, \"message\": text }`.\n\n**Same rules as the app.** The do-not-call list, opt-outs, do-not-disturb, quiet hours, calling windows and your plan apply to the API too.\n\n**Retries.** Send an `Idempotency-Key` header on a POST to retry it safely: the first response is replayed for 24 hours.\n\n**Rate limits.** Per company, by plan (requests per minute). Over it you get 429 with `Retry-After`; `X-RateLimit-Remaining` shows what is left."},"servers":[{"url":"https://api.dialerday.com"}],"tags":[{"name":"Account","description":"The key and its company"},{"name":"Contacts","description":"Leads and customers: fields, custom fields, owner, status, do-not-disturb, tags, other numbers, consent"},{"name":"Tags, statuses & fields","description":"The lists contacts are organised by"},{"name":"Do-not-call list","description":"Numbers never to call or text"},{"name":"Texts","description":"SMS conversations; send texts as a team member or a named sender (e.g. your AI), shown only inside the app"},{"name":"Calls","description":"Call history, recordings, transcripts, AI and outcomes"},{"name":"Campaigns","description":"Dialing campaigns and the leads in them"},{"name":"Tasks & callbacks","description":"Follow-ups, callbacks in the lead’s time zone, appointments"},{"name":"Team","description":"Members and teams"},{"name":"Workflows","description":"Automations: enroll contacts, send events"},{"name":"Voicemail","description":"Voicemails received and ringless voicemail"},{"name":"Phone numbers","description":"Your numbers"},{"name":"Analytics","description":"Reports"},{"name":"Payments","description":"DialerPay"},{"name":"Webhooks","description":"Subscribe a URL to events (REST hooks)"},{"name":"Call tracking","description":"Pay per call: tracked calls (where each went, conversions, revenue, returns), targets and their caps, buyers, tracking numbers and the caller block list. Webhook events `tracking.call_completed`, `tracking.call_converted` and `tracking.call_returned` fire when a tracked call ends, converts or is returned. Publishers’ payouts are reported to Affiliatetrackingo (`POST /track/call` there). Below the API-key endpoints: the bid endpoint other networks call, the website number-swap script, and buyers’ report links."}],"security":[{"bearer":[]},{"apiKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Authorization: Bearer dlr_…"},"apiKey":{"type":"apiKey","in":"header","name":"X-API-Key"},"sellerKey":{"type":"http","scheme":"bearer","description":"A seller key (rtbs_…) from Call tracking → Bidding"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}},"required":["error","message"]}},"responses":{"E400":{"description":"Invalid request (validation_error, bad_request)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E402":{"description":"Your plan does not include this (plan_required, plan_limit, subscription_inactive)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E403":{"description":"The key lacks the permission (insufficient_scope)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E409":{"description":"Not possible right now (e.g. the number is on the do-not-call list, quiet hours, opted out)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E429":{"description":"Rate limited: see the Retry-After header","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/v1/me":{"get":{"tags":["Account"],"summary":"The key, its company and permissions","description":"Make’s and Zapier’s connection test.\n\nAny valid key","operationId":"getMe","responses":{"200":{"description":"OK","content":{"application/json":{"example":{"company":{"id":1,"name":"Acme"},"key":{"name":"My CRM sync","scopes":["contacts:write","messages:write"]}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/contacts":{"get":{"tags":["Contacts"],"summary":"List or search contacts","description":"Permission: `contacts:read`","operationId":"getContacts","x-scope":"contacts:read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":200},"description":"Up to 200"},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}},{"name":"search","in":"query","required":false,"schema":{"type":"string","maxLength":100},"description":"Name, phone, email or company"},{"name":"phone","in":"query","required":false,"schema":{"type":"string","maxLength":30},"description":"Exact number (any format): the contact with it as main or other number"},{"name":"status","in":"query","required":false,"schema":{"type":"string","maxLength":40},"description":"Lead status key"},{"name":"owner_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","const":"none"},{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}]},"description":"A team member id, or \"none\" for unassigned"},{"name":"tag_id","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},{"name":"not_called","in":"query","required":false,"schema":{"type":"string","enum":["ever","7d","30d"]}},{"name":"field","in":"query","required":false,"schema":{"type":"string","maxLength":40},"description":"Custom field key: contacts with it set"},{"name":"field_value","in":"query","required":false,"schema":{"type":"string","maxLength":200},"description":"…set to this value"}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"items":[{"id":42,"first_name":"Jane","last_name":"Doe","phone":"+15551234567","email":"jane@example.com","company":"Acme","status_key":"interested","owner_id":7,"owner_name":"Sam Rep","dnd_call":false,"dnd_sms":false,"lead_timezone":"America/New_York","custom":{"budget":5000},"tags":[{"id":3,"name":"Hot","color":"danger"}],"created_at":"2026-10-07T15:30:00Z","updated_at":"2026-10-07T15:30:00Z"}],"total":1}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}},"post":{"tags":["Contacts"],"summary":"Create a contact","description":"Fails with 409 when a contact already has this number; use POST /v1/contacts/upsert to create or update.\n\nPermission: `contacts:write`","operationId":"postContacts","x-scope":"contacts:write","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Retry safely: the first response is replayed for 24 hours"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"first_name":{"type":"string","maxLength":100},"last_name":{"type":"string","maxLength":100},"phone":{"type":"string","minLength":3,"maxLength":30,"description":"Any format; stored as E.164"},"email":{"anyOf":[{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"company":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"timezone":{"description":"IANA zone, e.g. America/Chicago","anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"extension":{"anyOf":[{"type":"string","pattern":"^[0-9*#wW]{0,24}$"},{"type":"null"}]},"lead_source":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"lead_website":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"crm_reference":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"street":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"city":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"state":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"postal_code":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"country":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"language":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"custom":{"type":"object","propertyNames":{"type":"string","maxLength":60},"additionalProperties":{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"description":"Custom field values by field key (or label); null or \"\" clears one"},"status_key":{"description":"A lead status key (GET /v1/lead-statuses); null clears it","anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"owner_id":{"description":"Team member who owns the lead; null unassigns","anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"dnd":{"description":"Do-not-disturb per channel","type":"object","properties":{"call":{"type":"boolean"},"sms":{"type":"boolean"}}},"tag_ids":{"description":"Tags to add","maxItems":50,"type":"array","items":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"tag_names":{"description":"Tags to add by name; missing ones are created","maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}}},"required":["phone"]},"example":{"first_name":"Jane","last_name":"Doe","phone":"+15551234567","email":"jane@example.com","custom":{"budget":5000},"tag_names":["Hot"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"example":{"id":42,"first_name":"Jane","last_name":"Doe","phone":"+15551234567","email":"jane@example.com","company":"Acme","status_key":"interested","owner_id":7,"owner_name":"Sam Rep","dnd_call":false,"dnd_sms":false,"lead_timezone":"America/New_York","custom":{"budget":5000},"tags":[{"id":3,"name":"Hot","color":"danger"}],"created_at":"2026-10-07T15:30:00Z","updated_at":"2026-10-07T15:30:00Z"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/contacts/{id}":{"get":{"tags":["Contacts"],"summary":"Get a contact","description":"Permission: `contacts:read`","operationId":"getContactsById","x-scope":"contacts:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":42,"first_name":"Jane","last_name":"Doe","phone":"+15551234567","email":"jane@example.com","company":"Acme","status_key":"interested","owner_id":7,"owner_name":"Sam Rep","dnd_call":false,"dnd_sms":false,"lead_timezone":"America/New_York","custom":{"budget":5000},"tags":[{"id":3,"name":"Hot","color":"danger"}],"created_at":"2026-10-07T15:30:00Z","updated_at":"2026-10-07T15:30:00Z"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}},"patch":{"tags":["Contacts"],"summary":"Update a contact","description":"Only the fields sent change. `tag_ids` / `tag_names` add tags; remove one with DELETE /v1/contacts/{id}/tags/{tag_id}.\n\nPermission: `contacts:write`","operationId":"patchContactsById","x-scope":"contacts:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"first_name":{"type":"string","maxLength":100},"last_name":{"type":"string","maxLength":100},"phone":{"type":"string","minLength":3,"maxLength":30,"description":"Any format; stored as E.164"},"email":{"anyOf":[{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"company":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"timezone":{"description":"IANA zone, e.g. America/Chicago","anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"extension":{"anyOf":[{"type":"string","pattern":"^[0-9*#wW]{0,24}$"},{"type":"null"}]},"lead_source":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"lead_website":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"crm_reference":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"street":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"city":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"state":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"postal_code":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"country":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"language":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"custom":{"type":"object","propertyNames":{"type":"string","maxLength":60},"additionalProperties":{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"description":"Custom field values by field key (or label); null or \"\" clears one"},"status_key":{"description":"A lead status key (GET /v1/lead-statuses); null clears it","anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"owner_id":{"description":"Team member who owns the lead; null unassigns","anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"dnd":{"description":"Do-not-disturb per channel","type":"object","properties":{"call":{"type":"boolean"},"sms":{"type":"boolean"}}},"tag_ids":{"description":"Tags to add","maxItems":50,"type":"array","items":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"tag_names":{"description":"Tags to add by name; missing ones are created","maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}}}},"example":{"status_key":"interested","dnd":{"sms":true},"custom":{"budget":7500}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":42,"first_name":"Jane","last_name":"Doe","phone":"+15551234567","email":"jane@example.com","company":"Acme","status_key":"interested","owner_id":7,"owner_name":"Sam Rep","dnd_call":false,"dnd_sms":false,"lead_timezone":"America/New_York","custom":{"budget":5000},"tags":[{"id":3,"name":"Hot","color":"danger"}],"created_at":"2026-10-07T15:30:00Z","updated_at":"2026-10-07T15:30:00Z"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}},"delete":{"tags":["Contacts"],"summary":"Delete a contact","description":"Also takes it out of its campaigns and deletes its tags, tasks, other numbers, consent records and workflow runs. Its calls, texts, payments and appointments stay in your history, no longer linked to a contact.\n\nPermission: `contacts:write`","operationId":"deleteContactsById","x-scope":"contacts:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"responses":{"204":{"description":"Done"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/contacts/upsert":{"post":{"tags":["Contacts"],"summary":"Create or update a contact by phone number","description":"Finds the contact by `phone` (main or other number) and updates the fields sent, or creates it. Returns `created`.\n\nPermission: `contacts:write`","operationId":"postContactsUpsert","x-scope":"contacts:write","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Retry safely: the first response is replayed for 24 hours"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"first_name":{"type":"string","maxLength":100},"last_name":{"type":"string","maxLength":100},"phone":{"type":"string","minLength":3,"maxLength":30,"description":"Any format; stored as E.164"},"email":{"anyOf":[{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"company":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"timezone":{"description":"IANA zone, e.g. America/Chicago","anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"extension":{"anyOf":[{"type":"string","pattern":"^[0-9*#wW]{0,24}$"},{"type":"null"}]},"lead_source":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"lead_website":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"crm_reference":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"street":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"city":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"state":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"postal_code":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"country":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"language":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"custom":{"type":"object","propertyNames":{"type":"string","maxLength":60},"additionalProperties":{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"description":"Custom field values by field key (or label); null or \"\" clears one"},"status_key":{"description":"A lead status key (GET /v1/lead-statuses); null clears it","anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"owner_id":{"description":"Team member who owns the lead; null unassigns","anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"dnd":{"description":"Do-not-disturb per channel","type":"object","properties":{"call":{"type":"boolean"},"sms":{"type":"boolean"}}},"tag_ids":{"description":"Tags to add","maxItems":50,"type":"array","items":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"tag_names":{"description":"Tags to add by name; missing ones are created","maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}}},"required":["phone"]},"example":{"phone":"+15551234567","first_name":"Jane","status_key":"interested","owner_id":7}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"created":false,"contact":{"id":42,"first_name":"Jane","last_name":"Doe","phone":"+15551234567","email":"jane@example.com","company":"Acme","status_key":"interested","owner_id":7,"owner_name":"Sam Rep","dnd_call":false,"dnd_sms":false,"lead_timezone":"America/New_York","custom":{"budget":5000},"tags":[{"id":3,"name":"Hot","color":"danger"}],"created_at":"2026-10-07T15:30:00Z","updated_at":"2026-10-07T15:30:00Z"}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/contacts/{id}/notes":{"post":{"tags":["Contacts"],"summary":"Add a note","description":"Appended to the contact’s notes with today’s date and the name of the API key’s owner.\n\nPermission: `contacts:write`","operationId":"postContactsByIdNotes","x-scope":"contacts:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Retry safely: the first response is replayed for 24 hours"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":5000}},"required":["text"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":42,"first_name":"Jane","last_name":"Doe","phone":"+15551234567","email":"jane@example.com","company":"Acme","status_key":"interested","owner_id":7,"owner_name":"Sam Rep","dnd_call":false,"dnd_sms":false,"lead_timezone":"America/New_York","custom":{"budget":5000},"tags":[{"id":3,"name":"Hot","color":"danger"}],"created_at":"2026-10-07T15:30:00Z","updated_at":"2026-10-07T15:30:00Z"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/contacts/{id}/tags":{"post":{"tags":["Contacts"],"summary":"Add tags to a contact","description":"Permission: `contacts:write`","operationId":"postContactsByIdTags","x-scope":"contacts:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Retry safely: the first response is replayed for 24 hours"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tag_ids":{"description":"Tags to add","maxItems":50,"type":"array","items":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"tag_names":{"description":"Tags to add by name; missing ones are created","maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":42,"first_name":"Jane","last_name":"Doe","phone":"+15551234567","email":"jane@example.com","company":"Acme","status_key":"interested","owner_id":7,"owner_name":"Sam Rep","dnd_call":false,"dnd_sms":false,"lead_timezone":"America/New_York","custom":{"budget":5000},"tags":[{"id":3,"name":"Hot","color":"danger"}],"created_at":"2026-10-07T15:30:00Z","updated_at":"2026-10-07T15:30:00Z"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/contacts/{id}/tags/{tagId}":{"delete":{"tags":["Contacts"],"summary":"Remove a tag from a contact","description":"Permission: `contacts:write`","operationId":"deleteContactsByIdTagsByTagId","x-scope":"contacts:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}},{"name":"tagId","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"responses":{"204":{"description":"Done"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/contacts/{id}/phones":{"get":{"tags":["Contacts"],"summary":"A contact’s other numbers","description":"Mobile, home, work…: tried in order by vertical dialing.\n\nPermission: `contacts:read`","operationId":"getContactsByIdPhones","x-scope":"contacts:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}},"put":{"tags":["Contacts"],"summary":"Replace a contact’s other numbers","description":"Permission: `contacts:write`","operationId":"putContactsByIdPhones","x-scope":"contacts:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"phones":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"phone":{"type":"string","minLength":3,"maxLength":40},"label":{"default":"other","type":"string","enum":["mobile","home","work","other"]}},"required":["phone"]}}},"required":["phones"]}}}},"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/contacts/{id}/consents":{"get":{"tags":["Contacts"],"summary":"A contact’s consent records (TCPA)","description":"Permission: `contacts:read`","operationId":"getContactsByIdConsents","x-scope":"contacts:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}},"post":{"tags":["Contacts"],"summary":"Record consent to be called","description":"Permission: `contacts:write`","operationId":"postContactsByIdConsents","x-scope":"contacts:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Retry safely: the first response is replayed for 24 hours"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["pewc","pec","ebr"],"description":"pewc: prior express written consent; pec: prior express consent; ebr: established business relationship"},"source":{"default":"api","type":"string","enum":["manual","import","api","webhook","webform","verbal","ghl","crm","workflow"]},"phone":{"description":"The number the consent covers (default: the main number)","anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"captured_at":{"anyOf":[{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}]},{"type":"null"}]},"expires_at":{"anyOf":[{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}]},{"type":"null"}]},"evidence_url":{"description":"e.g. a TrustedForm certificate URL","anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"lead_id_token":{"description":"Jornaya LeadiD","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"ip_address":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"disclosure":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}},"required":["kind"]}}}},"responses":{"201":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/contacts/{id}/consents/{consentId}/revoke":{"post":{"tags":["Contacts"],"summary":"Revoke a consent record","description":"Permission: `contacts:write`","operationId":"postContactsByIdConsentsByConsentIdRevoke","x-scope":"contacts:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}},{"name":"consentId","in":"path","required":true,"schema":{"type":"integer","minimum":1}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Retry safely: the first response is replayed for 24 hours"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}}}}}},"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/tags":{"get":{"tags":["Tags, statuses & fields"],"summary":"List tags","description":"Permission: `contacts:read`","operationId":"getTags","x-scope":"contacts:read","responses":{"200":{"description":"OK","content":{"application/json":{"example":{"items":[{"id":3,"name":"Hot","color":"danger","contacts":120}]}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}},"post":{"tags":["Tags, statuses & fields"],"summary":"Create a tag","description":"Permission: `contacts:write`","operationId":"postTags","x-scope":"contacts:write","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Retry safely: the first response is replayed for 24 hours"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60},"color":{"default":"neutral","type":"string","enum":["neutral","brand","success","warning","danger","violet"]}},"required":["name"]}}}},"responses":{"201":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/tags/{id}":{"patch":{"tags":["Tags, statuses & fields"],"summary":"Rename or recolor a tag","description":"Permission: `contacts:write`","operationId":"patchTagsById","x-scope":"contacts:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60},"color":{"default":"neutral","type":"string","enum":["neutral","brand","success","warning","danger","violet"]}}}}}},"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}},"delete":{"tags":["Tags, statuses & fields"],"summary":"Delete a tag","description":"Permission: `contacts:write`","operationId":"deleteTagsById","x-scope":"contacts:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"responses":{"204":{"description":"Done"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/tags/{id}/contacts":{"post":{"tags":["Tags, statuses & fields"],"summary":"Tag (or untag) many contacts","description":"Permission: `contacts:write`","operationId":"postTagsByIdContacts","x-scope":"contacts:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Retry safely: the first response is replayed for 24 hours"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contact_ids":{"minItems":1,"maxItems":10000,"type":"array","items":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"remove":{"default":false,"type":"boolean"}},"required":["contact_ids"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"changed":25}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/lead-statuses":{"get":{"tags":["Tags, statuses & fields"],"summary":"List lead statuses","description":"Permission: `contacts:read`","operationId":"getLeadStatuses","x-scope":"contacts:read","responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}},"post":{"tags":["Tags, statuses & fields"],"summary":"Create a lead status","description":"Permission: `contacts:write`","operationId":"postLeadStatuses","x-scope":"contacts:write","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Retry safely: the first response is replayed for 24 hours"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":60},"tone":{"default":"neutral","type":"string","enum":["neutral","brand","success","warning","danger","violet"]},"is_closed":{"default":false,"type":"boolean"},"sort":{"default":500,"type":"integer","minimum":0,"maximum":10000}},"required":["label"]}}}},"responses":{"201":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/lead-statuses/{id}":{"patch":{"tags":["Tags, statuses & fields"],"summary":"Update a lead status","description":"Permission: `contacts:write`","operationId":"patchLeadStatusesById","x-scope":"contacts:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":60},"tone":{"default":"neutral","type":"string","enum":["neutral","brand","success","warning","danger","violet"]},"is_closed":{"default":false,"type":"boolean"},"sort":{"default":500,"type":"integer","minimum":0,"maximum":10000},"archived":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/contact-fields":{"get":{"tags":["Tags, statuses & fields"],"summary":"List custom contact fields","description":"Permission: `contacts:read`","operationId":"getContactFields","x-scope":"contacts:read","responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}},"post":{"tags":["Tags, statuses & fields"],"summary":"Create a custom contact field","description":"Permission: `contacts:write`","operationId":"postContactFields","x-scope":"contacts:write","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Retry safely: the first response is replayed for 24 hours"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":60},"type":{"type":"string","enum":["text","number","date","select","boolean"]},"options":{"default":[],"description":"For select fields","maxItems":100,"type":"array","items":{"type":"string","maxLength":100}},"sort":{"default":500,"type":"integer","minimum":0,"maximum":10000}},"required":["label","type"]}}}},"responses":{"201":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/contact-fields/{id}":{"patch":{"tags":["Tags, statuses & fields"],"summary":"Update a custom contact field","description":"Permission: `contacts:write`","operationId":"patchContactFieldsById","x-scope":"contacts:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":60},"options":{"default":[],"description":"For select fields","maxItems":100,"type":"array","items":{"type":"string","maxLength":100}},"sort":{"default":500,"type":"integer","minimum":0,"maximum":10000},"archived":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/dnc":{"get":{"tags":["Do-not-call list"],"summary":"List numbers on the do-not-call list","description":"Permission: `dnc:read`","operationId":"getDnc","x-scope":"dnc:read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":200},"description":"Up to 200"},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}},{"name":"search","in":"query","required":false,"schema":{"type":"string","maxLength":100}}],"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}},"post":{"tags":["Do-not-call list"],"summary":"Add a number to the do-not-call list","description":"Permission: `dnc:write`","operationId":"postDnc","x-scope":"dnc:write","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Retry safely: the first response is replayed for 24 hours"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"phone":{"type":"string","minLength":3,"maxLength":30},"reason":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]}},"required":["phone"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"example":{"ok":true}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/dnc/check":{"get":{"tags":["Do-not-call list"],"summary":"Check whether a number may be called and texted","description":"Permission: `dnc:read`","operationId":"getDncCheck","x-scope":"dnc:read","parameters":[{"name":"phone","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":30}}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"phone":"+15551234567","on_dnc":false,"dnd":{"call":false,"sms":true}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/dnc/{phone}":{"delete":{"tags":["Do-not-call list"],"summary":"Take a number off the do-not-call list","description":"Permission: `dnc:write`","operationId":"deleteDncByPhone","x-scope":"dnc:write","parameters":[{"name":"phone","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Done"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/messages":{"post":{"tags":["Texts"],"summary":"Send a text","description":"Sends an SMS through your Twilio numbers with the same rules as the app: numbers that replied STOP, the do-not-call list, SMS do-not-disturb and quiet hours are refused with 409 (`quiet_hours` for the last).\n\n`sent_as` decides who the text shows as sent by in your inbox: a team member, or a name like \"AI Assistant\". It is internal: the person texted only sees your number.\n\nNeeds **Texting & shared inbox** in your plan.\n\nPermission: `messages:write`","operationId":"postMessages","x-scope":"messages:write","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Retry safely: the first response is replayed for 24 hours"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"description":"The number to text (any format). Or give conversation_id / contact_id.","type":"string","maxLength":30},"contact_id":{"description":"Text this contact’s main number","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"conversation_id":{"description":"Reply in this conversation (from its own number)","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"from":{"description":"One of your numbers with texting on (GET /v1/messages/senders). Default: the number last used with this contact, else your default","type":"string","maxLength":30},"body":{"type":"string","minLength":1,"maxLength":1600},"sent_as":{"description":"Who the text is shown as sent by, inside the app only. The person texted only sees your number. Default: the API key’s name.","type":"object","properties":{"agent_id":{"description":"Show the text as sent by this team member","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"name":{"description":"…or by this name, e.g. \"AI Assistant\"","type":"string","minLength":1,"maxLength":60}}}},"required":["body"]},"example":{"to":"+15551234567","body":"Hi Jane, thanks for your time today!","sent_as":{"name":"AI Assistant"}}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"example":{"conversation_id":9,"message":{"id":56,"conversation_id":9,"direction":"outbound","body":"Thanks Jane, talk tomorrow!","media":[],"status":"queued","error_code":null,"agent_id":null,"sender_label":"AI Assistant","api_key_id":4,"created_at":"2026-10-07T15:30:00Z"}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/messages/senders":{"get":{"tags":["Texts"],"summary":"Numbers you can text from","description":"Needs **Texting & shared inbox** in your plan.\n\nPermission: `messages:read`","operationId":"getMessagesSenders","x-scope":"messages:read","responses":{"200":{"description":"OK","content":{"application/json":{"example":{"items":["+14155550100"]}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/conversations":{"get":{"tags":["Texts"],"summary":"List conversations","description":"Newest first. One conversation per contact number and your number.\n\nNeeds **Texting & shared inbox** in your plan.\n\nPermission: `messages:read`","operationId":"getConversations","x-scope":"messages:read","parameters":[{"name":"filter","in":"query","required":false,"schema":{"default":"open","type":"string","enum":["open","unread","archived"]}},{"name":"search","in":"query","required":false,"schema":{"type":"string","maxLength":100},"description":"Name, number or message text"},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"items":[{"id":9,"contact_phone":"+15551234567","our_number":"+14155550100","contact_id":42,"contact_name":"Jane Doe","last_message_at":"2026-10-07T15:30:00Z","last_preview":"Thanks Jane, talk tomorrow!","last_direction":"outbound","unread_count":0,"opted_out_at":null,"archived_at":null}],"total":1}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/conversations/{id}":{"get":{"tags":["Texts"],"summary":"A conversation and its messages","description":"The newest 50 messages, oldest first. Page back with `before` = the oldest message id you have.\n\nNeeds **Texting & shared inbox** in your plan.\n\nPermission: `messages:read`","operationId":"getConversationsById","x-scope":"messages:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}},{"name":"before","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"conversation":{"id":9,"contact_phone":"+15551234567","our_number":"+14155550100","contact_id":42,"contact_name":"Jane Doe","last_message_at":"2026-10-07T15:30:00Z","last_preview":"Thanks Jane, talk tomorrow!","last_direction":"outbound","unread_count":0,"opted_out_at":null,"archived_at":null},"messages":[{"id":56,"conversation_id":9,"direction":"outbound","body":"Thanks Jane, talk tomorrow!","media":[],"status":"queued","error_code":null,"agent_id":null,"sender_label":"AI Assistant","api_key_id":4,"created_at":"2026-10-07T15:30:00Z"}]}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/conversations/{id}/read":{"post":{"tags":["Texts"],"summary":"Mark a conversation read","description":"Needs **Texting & shared inbox** in your plan.\n\nPermission: `messages:write`","operationId":"postConversationsByIdRead","x-scope":"messages:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Retry safely: the first response is replayed for 24 hours"}],"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/conversations/{id}/archive":{"post":{"tags":["Texts"],"summary":"Archive or unarchive a conversation","description":"Needs **Texting & shared inbox** in your plan.\n\nPermission: `messages:write`","operationId":"postConversationsByIdArchive","x-scope":"messages:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Retry safely: the first response is replayed for 24 hours"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"archived":{"default":true,"type":"boolean"}}}}}},"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/contacts/{id}/messages":{"get":{"tags":["Texts"],"summary":"Every text with a contact","description":"Across all your numbers, newest 50, oldest first. Page back with `before`.\n\nNeeds **Texting & shared inbox** in your plan.\n\nPermission: `messages:read`","operationId":"getContactsByIdMessages","x-scope":"messages:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}},{"name":"before","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"items":[{"id":56,"conversation_id":9,"direction":"outbound","body":"Thanks Jane, talk tomorrow!","media":[],"status":"queued","error_code":null,"agent_id":null,"sender_label":"AI Assistant","api_key_id":4,"created_at":"2026-10-07T15:30:00Z"}]}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/messages/{id}/media/{n}":{"get":{"tags":["Texts"],"summary":"Download an MMS attachment","description":"`n` is the attachment’s position in the message’s `media` list, from 0.\n\nNeeds **Texting & shared inbox** in your plan.\n\nPermission: `messages:read`","operationId":"getMessagesByIdMediaByN","x-scope":"messages:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}},{"name":"n","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/sms-templates":{"get":{"tags":["Texts"],"summary":"List saved replies","description":"Needs **Texting & shared inbox** in your plan.\n\nPermission: `messages:read`","operationId":"getSmsTemplates","x-scope":"messages:read","responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}},"post":{"tags":["Texts"],"summary":"Create a saved reply","description":"Needs **Texting & shared inbox** in your plan.\n\nPermission: `messages:write`","operationId":"postSmsTemplates","x-scope":"messages:write","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Retry safely: the first response is replayed for 24 hours"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"body":{"type":"string","minLength":1,"maxLength":1600}},"required":["name","body"]}}}},"responses":{"201":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/sms-templates/{id}":{"put":{"tags":["Texts"],"summary":"Update a saved reply","description":"Needs **Texting & shared inbox** in your plan.\n\nPermission: `messages:write`","operationId":"putSmsTemplatesById","x-scope":"messages:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"body":{"type":"string","minLength":1,"maxLength":1600}},"required":["name","body"]}}}},"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}},"delete":{"tags":["Texts"],"summary":"Delete a saved reply","description":"Needs **Texting & shared inbox** in your plan.\n\nPermission: `messages:write`","operationId":"deleteSmsTemplatesById","x-scope":"messages:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"responses":{"204":{"description":"Done"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/calls":{"get":{"tags":["Calls"],"summary":"Call history","description":"Newest first. Lists may be repeated or comma separated (`outcomes=booked,interested`). Times are ISO 8601 with an offset.\n\nPermission: `calls:read`","operationId":"getCalls","x-scope":"calls:read","parameters":[{"name":"contact_id","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},{"name":"agent_id","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},{"name":"agent_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"name":"unassigned","in":"query","required":false,"schema":{"type":"string","enum":["0","1","true","false"]}},{"name":"team_id","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"outcomes","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"name":"no_outcome","in":"query","required":false,"schema":{"type":"string","enum":["0","1","true","false"]}},{"name":"direction","in":"query","required":false,"schema":{"type":"string","enum":["inbound","outbound"]}},{"name":"answered","in":"query","required":false,"schema":{"type":"string","enum":["answered","missed"]}},{"name":"campaign_id","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},{"name":"min_seconds","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":86400}},{"name":"max_seconds","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":86400}},{"name":"has_recording","in":"query","required":false,"schema":{"type":"string","enum":["0","1","true","false"]}},{"name":"has_transcript","in":"query","required":false,"schema":{"type":"string","enum":["0","1","true","false"]}},{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":100}},{"name":"score_min","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":100}},{"name":"score_max","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":100}},{"name":"sentiment","in":"query","required":false,"schema":{"type":"string","enum":["positive","neutral","negative"]}},{"name":"topic","in":"query","required":false,"schema":{"type":"string","maxLength":80,"pattern":"^(objection|competitor|question|lost_reason|product_interest):.{1,60}$"}},{"name":"caller_id","in":"query","required":false,"schema":{"type":"string","pattern":"^\\+[1-9][0-9]{6,14}$"}},{"name":"limit","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":200}},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"items":[{"id":1234,"call_sid":"CA0123456789abcdef0123456789abcdef","direction":"outbound","from_number":"+14155550100","to_number":"+15551234567","status":"completed","answered_by":"human","started_at":"2026-10-07T15:30:00Z","answered_at":"2026-10-07T15:30:12Z","ended_at":"2026-10-07T15:33:04Z","duration_seconds":184,"recording_seconds":172,"disposition":"booked","notes":"Demo Tuesday 3pm","agent_id":7,"agent_name":"Sam Rep","contact_id":42,"contact_name":"Jane Doe","campaign_id":3,"campaign_name":"Inbound leads","ai_score":82,"ai_sentiment":"positive","has_recording":true,"recording":"https://api.example.com/v1/calls/1234/recording"}]}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/calls/summary":{"get":{"tags":["Calls"],"summary":"Totals for calls matching a filter","description":"Takes the same filters as GET /v1/calls.\n\nPermission: `calls:read`","operationId":"getCallsSummary","x-scope":"calls:read","parameters":[{"name":"contact_id","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},{"name":"agent_id","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},{"name":"agent_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"name":"unassigned","in":"query","required":false,"schema":{"type":"string","enum":["0","1","true","false"]}},{"name":"team_id","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"outcomes","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"name":"no_outcome","in":"query","required":false,"schema":{"type":"string","enum":["0","1","true","false"]}},{"name":"direction","in":"query","required":false,"schema":{"type":"string","enum":["inbound","outbound"]}},{"name":"answered","in":"query","required":false,"schema":{"type":"string","enum":["answered","missed"]}},{"name":"campaign_id","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},{"name":"min_seconds","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":86400}},{"name":"max_seconds","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":86400}},{"name":"has_recording","in":"query","required":false,"schema":{"type":"string","enum":["0","1","true","false"]}},{"name":"has_transcript","in":"query","required":false,"schema":{"type":"string","enum":["0","1","true","false"]}},{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":100}},{"name":"score_min","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":100}},{"name":"score_max","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":100}},{"name":"sentiment","in":"query","required":false,"schema":{"type":"string","enum":["positive","neutral","negative"]}},{"name":"topic","in":"query","required":false,"schema":{"type":"string","maxLength":80,"pattern":"^(objection|competitor|question|lost_reason|product_interest):.{1,60}$"}},{"name":"caller_id","in":"query","required":false,"schema":{"type":"string","pattern":"^\\+[1-9][0-9]{6,14}$"}}],"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/calls/{id}":{"get":{"tags":["Calls"],"summary":"Get a call","description":"Permission: `calls:read`","operationId":"getCallsById","x-scope":"calls:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":1234,"call_sid":"CA0123456789abcdef0123456789abcdef","direction":"outbound","from_number":"+14155550100","to_number":"+15551234567","status":"completed","answered_by":"human","started_at":"2026-10-07T15:30:00Z","answered_at":"2026-10-07T15:30:12Z","ended_at":"2026-10-07T15:33:04Z","duration_seconds":184,"recording_seconds":172,"disposition":"booked","notes":"Demo Tuesday 3pm","agent_id":7,"agent_name":"Sam Rep","contact_id":42,"contact_name":"Jane Doe","campaign_id":3,"campaign_name":"Inbound leads","ai_score":82,"ai_sentiment":"positive","has_recording":true,"recording":"https://api.example.com/v1/calls/1234/recording"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/calls/{id}/recording":{"get":{"tags":["Calls"],"summary":"Download the recording (MP3)","description":"A call recorded in parts (holds, transfers) has `part` 1, 2…; without it you get the first.\n\nPermission: `calls:read`","operationId":"getCallsByIdRecording","x-scope":"calls:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}},{"name":"part","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}}],"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/calls/{id}/transcript":{"get":{"tags":["Calls"],"summary":"The call’s transcript","description":"Permission: `calls:read`","operationId":"getCallsByIdTranscript","x-scope":"calls:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"items":[{"speaker":"agent","text":"Hi Jane, this is Sam from Acme.","start_ms":1200,"end_ms":3400}]}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/calls/{id}/ai":{"get":{"tags":["Calls"],"summary":"AI summary, score and answers for a call","description":"Needs an AI provider set up (Settings → AI).\n\nNeeds **AI call reviews** in your plan.\n\nPermission: `calls:read`","operationId":"getCallsByIdAi","x-scope":"calls:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/calls/{id}/ai/analyze":{"post":{"tags":["Calls"],"summary":"Run the AI analysis now","description":"Needs **AI call reviews** in your plan.\n\nPermission: `calls:write`","operationId":"postCallsByIdAiAnalyze","x-scope":"calls:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Retry safely: the first response is replayed for 24 hours"}],"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/calls/{id}/outcome":{"put":{"tags":["Calls"],"summary":"Set or correct a call’s outcome","description":"For an ended call. The outcome’s effects follow as in the app: the campaign entry, the do-not-call list and appointments.\n\nPermission: `calls:write`","operationId":"putCallsByIdOutcome","x-scope":"calls:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"disposition":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$","description":"An outcome key (GET /v1/dispositions)"},"notes":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]}},"required":["disposition"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":1234,"call_sid":"CA0123456789abcdef0123456789abcdef","direction":"outbound","from_number":"+14155550100","to_number":"+15551234567","status":"completed","answered_by":"human","started_at":"2026-10-07T15:30:00Z","answered_at":"2026-10-07T15:30:12Z","ended_at":"2026-10-07T15:33:04Z","duration_seconds":184,"recording_seconds":172,"disposition":"booked","notes":"Demo Tuesday 3pm","agent_id":7,"agent_name":"Sam Rep","contact_id":42,"contact_name":"Jane Doe","campaign_id":3,"campaign_name":"Inbound leads","ai_score":82,"ai_sentiment":"positive","has_recording":true,"recording":"https://api.example.com/v1/calls/1234/recording"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/dispositions":{"get":{"tags":["Calls"],"summary":"Call outcomes","description":"`final` is kept for older integrations (same as `is_final`).\n\nAny valid key","operationId":"getDispositions","responses":{"200":{"description":"OK","content":{"application/json":{"example":{"items":[{"key":"booked","label":"Booked","final":true,"is_final":true,"books_appointment":true}]}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}},"post":{"tags":["Calls"],"summary":"Create a call outcome","description":"Permission: `calls:write`","operationId":"postDispositions","x-scope":"calls:write","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Retry safely: the first response is replayed for 24 hours"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":60},"is_final":{"default":false,"description":"Ends the lead in its campaign","type":"boolean"},"counts_as_connected":{"default":false,"type":"boolean"},"adds_to_dnc":{"default":false,"type":"boolean"},"books_appointment":{"default":false,"type":"boolean"},"tone":{"default":"neutral","type":"string","enum":["neutral","brand","success","warning","danger","violet"]},"sort":{"default":500,"type":"integer","minimum":0,"maximum":10000}},"required":["label"]}}}},"responses":{"201":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/dispositions/{id}":{"patch":{"tags":["Calls"],"summary":"Update a call outcome","description":"Permission: `calls:write`","operationId":"patchDispositionsById","x-scope":"calls:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":60},"is_final":{"default":false,"description":"Ends the lead in its campaign","type":"boolean"},"counts_as_connected":{"default":false,"type":"boolean"},"adds_to_dnc":{"default":false,"type":"boolean"},"books_appointment":{"default":false,"type":"boolean"},"tone":{"default":"neutral","type":"string","enum":["neutral","brand","success","warning","danger","violet"]},"sort":{"default":500,"type":"integer","minimum":0,"maximum":10000},"archived":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/campaigns":{"get":{"tags":["Campaigns"],"summary":"List campaigns","description":"Needs **Campaigns** in your plan.\n\nPermission: `campaigns:read`","operationId":"getCampaigns","x-scope":"campaigns:read","responses":{"200":{"description":"OK","content":{"application/json":{"example":{"items":[{"id":3,"name":"Inbound leads","status":"active","dial_mode":"power","priority":500,"cadence":"rules","max_attempts":3,"window_start":"09:00:00","window_end":"20:00:00","counts":{"pending":120,"in_progress":2,"completed":340,"failed":55,"skipped":4}}]}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}},"post":{"tags":["Campaigns"],"summary":"Create a campaign","description":"Every setting of the campaign editor is available; omitted ones take your Settings → Calling defaults. `accept_terms: true` confirms the calling-compliance disclaimer, as in the app.\n\nNeeds **Campaigns** in your plan.\n\nPermission: `campaigns:write`","operationId":"postCampaigns","x-scope":"campaigns:write","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Retry safely: the first response is replayed for 24 hours"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"caller_id":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}]},"max_attempts":{"default":3,"type":"integer","minimum":1,"maximum":1000},"retry_delay_minutes":{"default":60,"type":"integer","minimum":0,"maximum":10080},"max_lines":{"type":"integer","minimum":1,"maximum":8},"caller_id_mode":{"type":"string","enum":["fixed","pool"]},"window_start":{"type":"string","maxLength":8},"window_end":{"type":"string","maxLength":8},"default_timezone":{"type":"string","maxLength":64},"abandon_message":{"type":"string","minLength":1,"maxLength":500},"smart_detection":{"type":"boolean"},"amd_mode":{"type":"string","enum":["wait","instant"]},"ivr_digits":{"anyOf":[{"type":"string","pattern":"^[0-9*#wW]{1,24}$"},{"type":"null"}]},"screener_message":{"type":"string","minLength":1,"maxLength":300},"dial_mode":{"type":"string","enum":["power","predictive","adaptive"]},"script_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"state_rules":{"type":"boolean"},"min_calls_per_day":{"anyOf":[{"type":"integer","minimum":1,"maximum":20},{"type":"null"}]},"max_calls_per_day":{"anyOf":[{"type":"integer","minimum":1,"maximum":20},{"type":"null"}]},"min_calls_per_week":{"anyOf":[{"type":"integer","minimum":1,"maximum":100},{"type":"null"}]},"max_calls_per_week":{"anyOf":[{"type":"integer","minimum":1,"maximum":100},{"type":"null"}]},"min_calls_per_month":{"anyOf":[{"type":"integer","minimum":1,"maximum":300},{"type":"null"}]},"max_calls_per_month":{"anyOf":[{"type":"integer","minimum":1,"maximum":300},{"type":"null"}]},"aim_calls":{"anyOf":[{"type":"integer","minimum":1,"maximum":50},{"type":"null"}]},"aim_days":{"anyOf":[{"type":"integer","minimum":1,"maximum":31},{"type":"null"}]},"cap_calls":{"anyOf":[{"type":"integer","minimum":1,"maximum":100},{"type":"null"}]},"cap_days":{"anyOf":[{"type":"integer","minimum":1,"maximum":31},{"type":"null"}]},"min_gap_minutes":{"anyOf":[{"type":"integer","minimum":1,"maximum":10080},{"type":"null"}]},"description":{"type":"string","maxLength":500},"priority":{"type":"integer","minimum":0,"maximum":1000},"team_ids":{"maxItems":100,"type":"array","items":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"operating_days":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":1,"maximum":7}},"preview_seconds":{"anyOf":[{"type":"integer","minimum":5,"maximum":600},{"type":"null"}]},"preview_timeout_action":{"type":"string","enum":["dial","skip"]},"country":{"type":"string","pattern":"^[A-Za-z]{2}$"},"skip_holidays":{"type":"boolean"},"callbacks_when_paused":{"type":"boolean"},"route_by_state":{"type":"boolean"},"route_by_skills":{"type":"boolean"},"required_skill_ids":{"maxItems":20,"type":"array","items":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"lead_owner_mode":{"type":"string","enum":["shared","owner_first","owner_only"]},"owner_hold_minutes":{"anyOf":[{"type":"integer","minimum":1,"maximum":100000},{"type":"null"}]},"auto_assign":{"type":"string","enum":["none","round_robin","balanced"]},"answered_overflow":{"type":"boolean"},"overflow_strategy":{"type":"string","enum":["longest_waiting","round_robin","skills"]},"cadence_mode":{"type":"string","enum":["rules","steps"]},"source_tag_ids":{"maxItems":200,"type":"array","items":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"only_tag_ids":{"maxItems":200,"type":"array","items":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"skip_tag_ids":{"maxItems":200,"type":"array","items":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"skip_booked":{"type":"boolean"},"booked_tag_ids":{"maxItems":200,"type":"array","items":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"budget":{"anyOf":[{"type":"number","exclusiveMinimum":0,"maximum":1000000},{"type":"null"}]},"lead_order":{"type":"string","enum":["default","newest","oldest"]},"score_never_dialed":{"type":["boolean","null"]},"score_best_hours":{"type":["boolean","null"]},"score_rested":{"type":["boolean","null"]},"after_call_seconds":{"anyOf":[{"type":"integer","minimum":5,"maximum":600},{"type":"null"}]},"amd_sensitivity":{"type":"string","enum":["low","moderate","high"]},"amd_timeout_seconds":{"type":"integer","minimum":3,"maximum":59},"machine_action":{"type":"string","enum":["agent_drop","campaign_drop","hangup"]},"voicemail_drop_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"allowed_utc_offsets":{"maxItems":40,"type":"array","items":{"type":"integer","minimum":-720,"maximum":840}},"ring_timeout_seconds":{"anyOf":[{"type":"integer","minimum":15,"maximum":60},{"type":"null"}]},"local_presence_fallback":{"anyOf":[{"type":"string","enum":["pool","default"]},{"type":"null"}]},"caller_id_sticky":{"type":"boolean"},"inbound_route":{"type":"string","enum":["number","agents","ring_group","forward"]},"inbound_agent_ids":{"maxItems":200,"type":"array","items":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"inbound_ring_group_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"inbound_forward_to":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}]},"missed_call_sms_mode":{"type":"string","enum":["company","custom","off"]},"missed_call_sms":{"anyOf":[{"type":"string","maxLength":640},{"type":"null"}]},"bad_number_tag_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"notify_agent_ids":{"maxItems":200,"type":"array","items":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"manager_ids":{"maxItems":200,"type":"array","items":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"callback_expire_minutes":{"anyOf":[{"type":"integer","minimum":15,"maximum":43200},{"type":"null"}]},"speed_to_lead_seconds":{"anyOf":[{"type":"integer","minimum":0,"maximum":300},{"type":"null"}]},"consent_mode":{"type":"string","enum":["off","manual_touch","required"]},"vertical_dialing":{"type":"boolean"},"preset":{"anyOf":[{"type":"string","enum":["speed_to_lead"]},{"type":"null"}]},"steps":{"anyOf":[{"minItems":1,"maxItems":10,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"dial_mode":{"type":"string","enum":["preview","power"]},"attempts":{"type":"integer","minimum":1,"maximum":50},"cooldown_minutes":{"type":"integer","minimum":0,"maximum":10080},"from_day":{"anyOf":[{"type":"integer","minimum":1,"maximum":365},{"type":"null"}]},"to_day":{"anyOf":[{"type":"integer","minimum":1,"maximum":365},{"type":"null"}]},"sort":{"type":"string","enum":["newest","least_contacted"]}},"required":["name","dial_mode","attempts","cooldown_minutes","from_day","to_day","sort"]}},{"type":"null"}]},"accept_terms":{"type":"boolean","const":true}},"required":["name","accept_terms"]},"example":{"name":"Inbound leads","accept_terms":true,"dial_mode":"power","max_attempts":5,"window_start":"09:00","window_end":"19:00"}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"example":{"id":3,"name":"Inbound leads","status":"active","dial_mode":"power","priority":500,"cadence":"rules","max_attempts":3,"window_start":"09:00:00","window_end":"20:00:00","counts":{"pending":120,"in_progress":2,"completed":340,"failed":55,"skipped":4}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/campaigns/{id}":{"get":{"tags":["Campaigns"],"summary":"Get a campaign, with lead counts","description":"Needs **Campaigns** in your plan.\n\nPermission: `campaigns:read`","operationId":"getCampaignsById","x-scope":"campaigns:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":3,"name":"Inbound leads","status":"active","dial_mode":"power","priority":500,"cadence":"rules","max_attempts":3,"window_start":"09:00:00","window_end":"20:00:00","counts":{"pending":120,"in_progress":2,"completed":340,"failed":55,"skipped":4}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}},"patch":{"tags":["Campaigns"],"summary":"Update a campaign, or start / pause it","description":"Only the settings sent change. `status`: draft, active, paused or completed.\n\nNeeds **Campaigns** in your plan.\n\nPermission: `campaigns:write`","operationId":"patchCampaignsById","x-scope":"campaigns:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"caller_id":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}]},"max_attempts":{"type":"integer","minimum":1,"maximum":1000},"retry_delay_minutes":{"type":"integer","minimum":0,"maximum":10080},"max_lines":{"type":"integer","minimum":1,"maximum":8},"caller_id_mode":{"type":"string","enum":["fixed","pool"]},"window_start":{"type":"string","maxLength":8},"window_end":{"type":"string","maxLength":8},"default_timezone":{"type":"string","maxLength":64},"abandon_message":{"type":"string","minLength":1,"maxLength":500},"smart_detection":{"type":"boolean"},"amd_mode":{"type":"string","enum":["wait","instant"]},"ivr_digits":{"anyOf":[{"type":"string","pattern":"^[0-9*#wW]{1,24}$"},{"type":"null"}]},"screener_message":{"type":"string","minLength":1,"maxLength":300},"dial_mode":{"type":"string","enum":["power","predictive","adaptive"]},"script_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"state_rules":{"type":"boolean"},"min_calls_per_day":{"anyOf":[{"type":"integer","minimum":1,"maximum":20},{"type":"null"}]},"max_calls_per_day":{"anyOf":[{"type":"integer","minimum":1,"maximum":20},{"type":"null"}]},"min_calls_per_week":{"anyOf":[{"type":"integer","minimum":1,"maximum":100},{"type":"null"}]},"max_calls_per_week":{"anyOf":[{"type":"integer","minimum":1,"maximum":100},{"type":"null"}]},"min_calls_per_month":{"anyOf":[{"type":"integer","minimum":1,"maximum":300},{"type":"null"}]},"max_calls_per_month":{"anyOf":[{"type":"integer","minimum":1,"maximum":300},{"type":"null"}]},"aim_calls":{"anyOf":[{"type":"integer","minimum":1,"maximum":50},{"type":"null"}]},"aim_days":{"anyOf":[{"type":"integer","minimum":1,"maximum":31},{"type":"null"}]},"cap_calls":{"anyOf":[{"type":"integer","minimum":1,"maximum":100},{"type":"null"}]},"cap_days":{"anyOf":[{"type":"integer","minimum":1,"maximum":31},{"type":"null"}]},"min_gap_minutes":{"anyOf":[{"type":"integer","minimum":1,"maximum":10080},{"type":"null"}]},"description":{"type":"string","maxLength":500},"priority":{"type":"integer","minimum":0,"maximum":1000},"team_ids":{"maxItems":100,"type":"array","items":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"operating_days":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":1,"maximum":7}},"preview_seconds":{"anyOf":[{"type":"integer","minimum":5,"maximum":600},{"type":"null"}]},"preview_timeout_action":{"type":"string","enum":["dial","skip"]},"country":{"type":"string","pattern":"^[A-Za-z]{2}$"},"skip_holidays":{"type":"boolean"},"callbacks_when_paused":{"type":"boolean"},"route_by_state":{"type":"boolean"},"route_by_skills":{"type":"boolean"},"required_skill_ids":{"maxItems":20,"type":"array","items":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"lead_owner_mode":{"type":"string","enum":["shared","owner_first","owner_only"]},"owner_hold_minutes":{"anyOf":[{"type":"integer","minimum":1,"maximum":100000},{"type":"null"}]},"auto_assign":{"type":"string","enum":["none","round_robin","balanced"]},"answered_overflow":{"type":"boolean"},"overflow_strategy":{"type":"string","enum":["longest_waiting","round_robin","skills"]},"cadence_mode":{"type":"string","enum":["rules","steps"]},"source_tag_ids":{"maxItems":200,"type":"array","items":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"only_tag_ids":{"maxItems":200,"type":"array","items":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"skip_tag_ids":{"maxItems":200,"type":"array","items":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"skip_booked":{"type":"boolean"},"booked_tag_ids":{"maxItems":200,"type":"array","items":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"budget":{"anyOf":[{"type":"number","exclusiveMinimum":0,"maximum":1000000},{"type":"null"}]},"lead_order":{"type":"string","enum":["default","newest","oldest"]},"score_never_dialed":{"type":["boolean","null"]},"score_best_hours":{"type":["boolean","null"]},"score_rested":{"type":["boolean","null"]},"after_call_seconds":{"anyOf":[{"type":"integer","minimum":5,"maximum":600},{"type":"null"}]},"amd_sensitivity":{"type":"string","enum":["low","moderate","high"]},"amd_timeout_seconds":{"type":"integer","minimum":3,"maximum":59},"machine_action":{"type":"string","enum":["agent_drop","campaign_drop","hangup"]},"voicemail_drop_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"allowed_utc_offsets":{"maxItems":40,"type":"array","items":{"type":"integer","minimum":-720,"maximum":840}},"ring_timeout_seconds":{"anyOf":[{"type":"integer","minimum":15,"maximum":60},{"type":"null"}]},"local_presence_fallback":{"anyOf":[{"type":"string","enum":["pool","default"]},{"type":"null"}]},"caller_id_sticky":{"type":"boolean"},"inbound_route":{"type":"string","enum":["number","agents","ring_group","forward"]},"inbound_agent_ids":{"maxItems":200,"type":"array","items":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"inbound_ring_group_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"inbound_forward_to":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}]},"missed_call_sms_mode":{"type":"string","enum":["company","custom","off"]},"missed_call_sms":{"anyOf":[{"type":"string","maxLength":640},{"type":"null"}]},"bad_number_tag_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"notify_agent_ids":{"maxItems":200,"type":"array","items":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"manager_ids":{"maxItems":200,"type":"array","items":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"callback_expire_minutes":{"anyOf":[{"type":"integer","minimum":15,"maximum":43200},{"type":"null"}]},"speed_to_lead_seconds":{"anyOf":[{"type":"integer","minimum":0,"maximum":300},{"type":"null"}]},"consent_mode":{"type":"string","enum":["off","manual_touch","required"]},"vertical_dialing":{"type":"boolean"},"status":{"type":"string","enum":["draft","active","paused","completed"]}}},"example":{"status":"paused"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":3,"name":"Inbound leads","status":"active","dial_mode":"power","priority":500,"cadence":"rules","max_attempts":3,"window_start":"09:00:00","window_end":"20:00:00","counts":{"pending":120,"in_progress":2,"completed":340,"failed":55,"skipped":4}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/campaigns/{id}/leads":{"post":{"tags":["Campaigns"],"summary":"Add one lead (creates or updates the contact)","description":"Same body as the campaign’s lead webhook: `phone` (or `number1`) plus any contact fields, `custom_fields` and consent proof.\n\nNeeds **Campaigns** in your plan.\n\nPermission: `campaigns:write`","operationId":"postCampaignsByIdLeads","x-scope":"campaigns:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Retry safely: the first response is replayed for 24 hours"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"number1":{"type":["string","number"]},"phone":{"type":["string","number"]},"first_name":{"type":"string","maxLength":500},"last_name":{"type":"string","maxLength":500},"email":{"type":"string","maxLength":500},"company":{"type":"string","maxLength":500},"notes":{"type":"string","maxLength":5000},"lead_website":{"type":"string","maxLength":500},"lead_source":{"type":"string","maxLength":500},"crm_reference":{"type":["string","number"]},"street":{"type":"string","maxLength":500},"city":{"type":"string","maxLength":500},"state":{"type":"string","maxLength":500},"zip":{"type":["string","number"]},"country":{"type":"string","maxLength":500},"timezone":{"type":"string","maxLength":500},"language":{"type":"string","maxLength":500},"custom_fields":{"type":"object","propertyNames":{"type":"string","maxLength":60},"additionalProperties":{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"},{"type":"null"}]}},"consent":{"type":"string","enum":["pewc","pec","ebr"]},"consent_at":{"type":"string","maxLength":40},"trustedform_cert_url":{"type":"string","maxLength":1000,"format":"uri"},"jornaya_leadid":{"type":"string","maxLength":200},"ip_address":{"type":"string","maxLength":64}}},"example":{"phone":"+15551234567","first_name":"Jane","last_name":"Doe","email":"jane@example.com","custom_fields":{"budget":5000}}}}},"responses":{"201":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/campaigns/{id}/contacts":{"post":{"tags":["Campaigns"],"summary":"Add contacts in bulk","description":"Existing contacts by `contact_ids`, and/or up to 10,000 `rows` (new contacts are created; known numbers are updated). `validation`: skip rows with a bad number, or reject the whole batch.\n\nNeeds **Campaigns** in your plan.\n\nPermission: `campaigns:write`","operationId":"postCampaignsByIdContacts","x-scope":"campaigns:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Retry safely: the first response is replayed for 24 hours"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contact_ids":{"maxItems":10000,"type":"array","items":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"rows":{"maxItems":10000,"type":"array","items":{"type":"object","properties":{"first_name":{"type":"string","maxLength":100},"last_name":{"type":"string","maxLength":100},"phone":{"type":"string","minLength":3,"maxLength":30},"email":{"default":null,"anyOf":[{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"company":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"timezone":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"extension":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"lead_source":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"lead_website":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"crm_reference":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"street":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"city":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"state":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"postal_code":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"language":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"country":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"custom":{"type":"object","propertyNames":{"type":"string","maxLength":60},"additionalProperties":{"type":"string","maxLength":1000}},"other_phones":{"maxItems":9,"type":"array","items":{"type":"object","properties":{"phone":{"type":"string","maxLength":40},"label":{"default":"other","type":"string","enum":["mobile","home","work","other"]}},"required":["phone"]}},"consent":{"type":"object","properties":{"kind":{"type":"string","enum":["pewc","pec","ebr"]},"captured_at":{"default":null,"anyOf":[{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}]},{"type":"null"}]},"evidence_url":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"lead_id_token":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]}},"required":["kind"]}},"required":["phone"]}},"validation":{"default":"skip","type":"string","enum":["skip","reject"]}}},"example":{"contact_ids":[42,43],"rows":[{"first_name":"Jane","phone":"+15551234567","custom":{"budget":"5000"}}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"added":250,"rejected":[]}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}},"get":{"tags":["Campaigns"],"summary":"The leads in a campaign","description":"Keyset-paged: pass `next_cursor` back as `cursor` for the next page.\n\nNeeds **Campaigns** in your plan.\n\nPermission: `campaigns:read`","operationId":"getCampaignsByIdContacts","x-scope":"campaigns:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["pending","in_progress","completed","failed","skipped"]}},{"name":"search","in":"query","required":false,"schema":{"type":"string","maxLength":100}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/campaigns/{id}/contacts/remove":{"post":{"tags":["Campaigns"],"summary":"Take leads out of a campaign by phone number","description":"Their call history is kept.\n\nNeeds **Campaigns** in your plan.\n\nPermission: `campaigns:write`","operationId":"postCampaignsByIdContactsRemove","x-scope":"campaigns:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Retry safely: the first response is replayed for 24 hours"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"phones":{"minItems":1,"maxItems":50000,"type":"array","items":{"type":"string","maxLength":40}},"validation":{"default":"reject","type":"string","enum":["skip","reject"]}},"required":["phones"]}}}},"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/campaigns/{id}/contacts/{contactId}":{"delete":{"tags":["Campaigns"],"summary":"Take one contact out of a campaign","description":"Needs **Campaigns** in your plan.\n\nPermission: `campaigns:write`","operationId":"deleteCampaignsByIdContactsByContactId","x-scope":"campaigns:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}},{"name":"contactId","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"responses":{"204":{"description":"Done"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/campaigns/{id}/contacts/{contactId}/boost":{"post":{"tags":["Campaigns"],"summary":"Call a lead next (top of the queue)","description":"Needs **Campaigns** in your plan.\n\nPermission: `campaigns:write`","operationId":"postCampaignsByIdContactsByContactIdBoost","x-scope":"campaigns:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}},{"name":"contactId","in":"path","required":true,"schema":{"type":"integer","minimum":1}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Retry safely: the first response is replayed for 24 hours"}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"changed":true}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/campaigns/{id}/contacts/{contactId}/requeue":{"post":{"tags":["Campaigns"],"summary":"Put a lead back in the queue","description":"Needs **Campaigns** in your plan.\n\nPermission: `campaigns:write`","operationId":"postCampaignsByIdContactsByContactIdRequeue","x-scope":"campaigns:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}},{"name":"contactId","in":"path","required":true,"schema":{"type":"integer","minimum":1}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Retry safely: the first response is replayed for 24 hours"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reset_attempts":{"default":false,"type":"boolean"},"delay_minutes":{"default":0,"type":"integer","minimum":0,"maximum":43200}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"changed":true}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/contacts/{id}/campaigns":{"get":{"tags":["Campaigns"],"summary":"The campaigns a contact is in","description":"Needs **Campaigns** in your plan.\n\nPermission: `campaigns:read`","operationId":"getContactsByIdCampaigns","x-scope":"campaigns:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/contacts/{id}/move-campaign":{"post":{"tags":["Campaigns"],"summary":"Move a contact to another campaign, history included","description":"A contact being dialed right now cannot move (409 entry_busy).\n\nNeeds **Campaigns** in your plan.\n\nPermission: `campaigns:write`","operationId":"postContactsByIdMoveCampaign","x-scope":"campaigns:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Retry safely: the first response is replayed for 24 hours"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"from_campaign_id":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"to_campaign_id":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"reset_attempts":{"default":false,"type":"boolean"},"delay_minutes":{"default":0,"type":"integer","minimum":0,"maximum":43200}},"required":["from_campaign_id","to_campaign_id"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"result":"moved"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/tasks":{"get":{"tags":["Tasks & callbacks"],"summary":"List tasks","description":"Permission: `tasks:read`","operationId":"getTasks","x-scope":"tasks:read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":200},"description":"Up to 200"},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}},{"name":"assignee_id","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},{"name":"contact_id","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},{"name":"state","in":"query","required":false,"schema":{"default":"open","type":"string","enum":["open","done"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"items":[{"id":77,"type":"todo","title":"Send the proposal","notes":null,"contact_id":42,"assignee_id":7,"due_at":"2026-10-08T15:00:00Z","completed_at":null,"dismissed_at":null,"created_at":"2026-10-07T15:30:00Z"}],"total":1}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}},"post":{"tags":["Tasks & callbacks"],"summary":"Create a task","description":"For a callback the dialer follows (lead’s time zone, campaign queue), use POST /v1/contacts/{id}/callbacks.\n\nPermission: `tasks:write`","operationId":"postTasks","x-scope":"tasks:write","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Retry safely: the first response is replayed for 24 hours"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"type":{"default":"todo","type":"string","enum":["callback","todo"]},"contact_id":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"assignee_id":{"default":null,"description":"Team member; null: unassigned","anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"notes":{"default":null,"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"due_at":{"default":null,"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["title"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"example":{"id":77,"type":"todo","title":"Send the proposal","notes":null,"contact_id":42,"assignee_id":7,"due_at":"2026-10-08T15:00:00Z","completed_at":null,"dismissed_at":null,"created_at":"2026-10-07T15:30:00Z"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/tasks/{id}":{"get":{"tags":["Tasks & callbacks"],"summary":"Get a task","description":"Permission: `tasks:read`","operationId":"getTasksById","x-scope":"tasks:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":77,"type":"todo","title":"Send the proposal","notes":null,"contact_id":42,"assignee_id":7,"due_at":"2026-10-08T15:00:00Z","completed_at":null,"dismissed_at":null,"created_at":"2026-10-07T15:30:00Z"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}},"patch":{"tags":["Tasks & callbacks"],"summary":"Update, complete or dismiss a task","description":"Permission: `tasks:write`","operationId":"patchTasksById","x-scope":"tasks:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"type":{"type":"string","enum":["callback","todo"]},"assignee_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"due_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"completed":{"type":"boolean"},"dismissed":{"type":"boolean","description":"Take a callback off the list without doing it"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":77,"type":"todo","title":"Send the proposal","notes":null,"contact_id":42,"assignee_id":7,"due_at":"2026-10-08T15:00:00Z","completed_at":null,"dismissed_at":null,"created_at":"2026-10-07T15:30:00Z"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}},"delete":{"tags":["Tasks & callbacks"],"summary":"Delete a task","description":"Permission: `tasks:write`","operationId":"deleteTasksById","x-scope":"tasks:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"responses":{"204":{"description":"Done"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/callbacks":{"get":{"tags":["Tasks & callbacks"],"summary":"Callbacks due in a time range","description":"With where each stands (upcoming, due, called, missed, dismissed).\n\nPermission: `tasks:read`","operationId":"getCallbacks","x-scope":"tasks:read","parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"assignee_id","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},{"name":"campaign_id","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}}],"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/contacts/{id}/callbacks":{"post":{"tags":["Tasks & callbacks"],"summary":"Schedule a callback","description":"`at` is wall-clock time in the lead’s time zone (or `timezone`). The dialer brings the lead back to the agent then, past campaign hours and limits, as in the app.\n\nPermission: `tasks:write`","operationId":"postContactsByIdCallbacks","x-scope":"tasks:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Retry safely: the first response is replayed for 24 hours"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"at":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}$"},"timezone":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"agent_id":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Who calls back"},"campaign_id":{"description":"The campaign entry to call back in (default: the contact’s latest)","anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}},"required":["at","agent_id"]}}}},"responses":{"201":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/callbacks/{id}/reschedule":{"post":{"tags":["Tasks & callbacks"],"summary":"Move a callback","description":"Permission: `tasks:write`","operationId":"postCallbacksByIdReschedule","x-scope":"tasks:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Retry safely: the first response is replayed for 24 hours"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"at":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}$"},"timezone":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]}},"required":["at"]}}}},"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/callbacks/{id}/assign":{"post":{"tags":["Tasks & callbacks"],"summary":"Give a callback to someone else","description":"Permission: `tasks:write`","operationId":"postCallbacksByIdAssign","x-scope":"tasks:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Retry safely: the first response is replayed for 24 hours"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["agent_id"]}}}},"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/callbacks/{id}/cancel":{"post":{"tags":["Tasks & callbacks"],"summary":"Call off a callback","description":"Permission: `tasks:write`","operationId":"postCallbacksByIdCancel","x-scope":"tasks:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Retry safely: the first response is replayed for 24 hours"}],"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/appointments":{"get":{"tags":["Tasks & callbacks"],"summary":"Appointments","description":"`kind=set`: booked in the range; `kind=shows`: taking place in the range. Days are in `tz`.\n\nNeeds **Advanced reports** in your plan.\n\nPermission: `tasks:read`","operationId":"getAppointments","x-scope":"tasks:read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":200},"description":"Up to 200"},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}},{"name":"from","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"tz","in":"query","required":false,"schema":{"default":"UTC","type":"string","pattern":"^[A-Za-z0-9_+\\-/]{1,64}$"}},{"name":"kind","in":"query","required":false,"schema":{"default":"set","type":"string","enum":["set","shows"]}},{"name":"agent_id","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["booked","showed","no_show","canceled"]}}],"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/appointments/{id}":{"patch":{"tags":["Tasks & callbacks"],"summary":"Mark an appointment showed, no-show or canceled","description":"Needs **Advanced reports** in your plan.\n\nPermission: `tasks:write`","operationId":"patchAppointmentsById","x-scope":"tasks:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["booked","showed","no_show","canceled"]}},"required":["status"]}}}},"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/team-members":{"get":{"tags":["Team"],"summary":"List team members","description":"Permission: `team:read`","operationId":"getTeamMembers","x-scope":"team:read","responses":{"200":{"description":"OK","content":{"application/json":{"example":{"items":[{"id":7,"name":"Sam Rep","email":"sam@example.com","role":"agent","is_active":true,"blended":false,"created_at":"2026-01-04T10:00:00Z"}]}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}},"post":{"tags":["Team"],"summary":"Add a team member","description":"Counts against your plan’s seats (402 plan_limit when full); seats billed follow the team.\n\nPermission: `team:write`","operationId":"postTeamMembers","x-scope":"team:write","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Retry safely: the first response is replayed for 24 hours"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"name":{"type":"string","minLength":1,"maxLength":100},"password":{"type":"string","minLength":10,"maxLength":200,"description":"Their first password; they can change it"},"role":{"default":"agent","type":"string","enum":["manager","agent"]}},"required":["email","name","password"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"example":{"id":7,"name":"Sam Rep","email":"sam@example.com","role":"agent","is_active":true,"blended":false,"created_at":"2026-01-04T10:00:00Z"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/team-members/{id}":{"patch":{"tags":["Team"],"summary":"Rename, change the role of, deactivate or reactivate a member","description":"Passwords cannot be set through the API: members reset their own from the sign-in page.\n\nPermission: `team:write`","operationId":"patchTeamMembersById","x-scope":"team:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"role":{"type":"string","enum":["manager","agent"]},"is_active":{"description":"false signs them out everywhere and frees the seat","type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":7,"name":"Sam Rep","email":"sam@example.com","role":"agent","is_active":true,"blended":false,"created_at":"2026-01-04T10:00:00Z"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/teams":{"get":{"tags":["Team"],"summary":"List teams","description":"Permission: `team:read`","operationId":"getTeams","x-scope":"team:read","responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}},"post":{"tags":["Team"],"summary":"Create a team","description":"Permission: `team:write`","operationId":"postTeams","x-scope":"team:write","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Retry safely: the first response is replayed for 24 hours"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"member_ids":{"default":[],"maxItems":500,"type":"array","items":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}}},"required":["name"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"example":{"id":2}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/teams/{id}":{"put":{"tags":["Team"],"summary":"Rename a team and set its members","description":"Permission: `team:write`","operationId":"putTeamsById","x-scope":"team:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"member_ids":{"default":[],"maxItems":500,"type":"array","items":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}}},"required":["name"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":2}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}},"delete":{"tags":["Team"],"summary":"Delete a team","description":"Permission: `team:write`","operationId":"deleteTeamsById","x-scope":"team:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"responses":{"204":{"description":"Done"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/workflows":{"get":{"tags":["Workflows"],"summary":"List workflows","description":"Needs **Workflows** in your plan.\n\nPermission: `workflows:read`","operationId":"getWorkflows","x-scope":"workflows:read","responses":{"200":{"description":"OK","content":{"application/json":{"example":{"items":[{"id":5,"name":"New lead follow-up","status":"active","trigger":"contact.created"}]}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/workflows/{id}/enroll":{"post":{"tags":["Workflows"],"summary":"Put contacts into a workflow","description":"Needs **Workflows** in your plan.\n\nPermission: `workflows:write`","operationId":"postWorkflowsByIdEnroll","x-scope":"workflows:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Retry safely: the first response is replayed for 24 hours"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contact_ids":{"maxItems":1000,"type":"array","items":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"phone":{"description":"…or the contact with this number","type":"string","minLength":3,"maxLength":30}}}}}},"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/events":{"post":{"tags":["Workflows"],"summary":"Send an event","description":"Starts the active workflows whose “API event” trigger listens for this `name`, for the contact (by `contact_id` or `phone`). `data` is available to their steps.\n\nNeeds **Workflows** in your plan.\n\nPermission: `workflows:write`","operationId":"postEvents","x-scope":"workflows:write","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Retry safely: the first response is replayed for 24 hours"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60},"contact_id":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"phone":{"type":"string","minLength":3,"maxLength":30},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["name"]}}}},"responses":{"202":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/voicemails":{"get":{"tags":["Voicemail"],"summary":"Voicemails left by callers","description":"The shared voicemail inbox. Each is a call: its recording is at GET /v1/calls/{id}/recording. With voicemail AI on (Settings → AI), ai_summary, ai_urgency (low, normal, high), ai_intent and ai_next_steps say what the caller wants; ai_status is null until it ran.\n\nPermission: `voicemail:read`","operationId":"getVoicemails","x-scope":"voicemail:read","parameters":[{"name":"state","in":"query","required":false,"schema":{"default":"open","type":"string","enum":["open","processed"]}},{"name":"limit","in":"query","required":false,"schema":{"default":200,"type":"integer","minimum":1,"maximum":500}}],"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/voicemails/{id}/processed":{"post":{"tags":["Voicemail"],"summary":"Mark a voicemail handled","description":"Permission: `voicemail:write`","operationId":"postVoicemailsByIdProcessed","x-scope":"voicemail:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Retry safely: the first response is replayed for 24 hours"}],"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/voicemail-drops":{"get":{"tags":["Voicemail"],"summary":"Recorded voicemail drops","description":"Use their ids to send ringless voicemail.\n\nPermission: `voicemail:read`","operationId":"getVoicemailDrops","x-scope":"voicemail:read","responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/rvm/batches":{"get":{"tags":["Voicemail"],"summary":"Ringless voicemail batches and how they went","description":"Needs **Ringless voicemail** in your plan.\n\nPermission: `voicemail:read`","operationId":"getRvmBatches","x-scope":"voicemail:read","responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}},"post":{"tags":["Voicemail"],"summary":"Send ringless voicemail","description":"To a campaign’s leads, everyone with a tag, or listed contacts. The do-not-call list, call do-not-disturb, mobile-only, sending window and per-contact limit apply as in the app. Needs Drop Cowboy connected (Settings → Ringless voicemail).\n\nNeeds **Ringless voicemail** in your plan.\n\nPermission: `voicemail:write`","operationId":"postRvmBatches","x-scope":"voicemail:write","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Retry safely: the first response is replayed for 24 hours"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"voicemail_drop_id":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"campaign_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"tag_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"contact_ids":{"maxItems":10000,"type":"array","items":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"only_pending":{"default":true,"description":"With campaign_id: only leads still waiting","type":"boolean"}},"required":["name","voicemail_drop_id"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"example":{"id":12,"queued":250}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/rvm/batches/{id}/cancel":{"post":{"tags":["Voicemail"],"summary":"Stop a batch","description":"Needs **Ringless voicemail** in your plan.\n\nPermission: `voicemail:write`","operationId":"postRvmBatchesByIdCancel","x-scope":"voicemail:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Retry safely: the first response is replayed for 24 hours"}],"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/contacts/{id}/rvm":{"get":{"tags":["Voicemail"],"summary":"Ringless voicemails sent to a contact","description":"Needs **Ringless voicemail** in your plan.\n\nPermission: `voicemail:read`","operationId":"getContactsByIdRvm","x-scope":"voicemail:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/analytics/overview":{"get":{"tags":["Analytics"],"summary":"Overview: calls, connects, talk time, outcomes and speed to lead","description":"Permission: `analytics:read`","operationId":"getAnalyticsOverview","x-scope":"analytics:read","parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"tz","in":"query","required":false,"schema":{"default":"UTC","type":"string","pattern":"^[A-Za-z0-9_+\\-/]{1,64}$"},"description":"Days are counted in this zone"},{"name":"agent_ids","in":"query","required":false,"schema":{"type":"string"},"description":"Comma separated"},{"name":"team_ids","in":"query","required":false,"schema":{"type":"string"},"description":"Comma separated"},{"name":"campaign_ids","in":"query","required":false,"schema":{"type":"string"},"description":"Comma separated"},{"name":"outcomes","in":"query","required":false,"schema":{"type":"string"},"description":"Outcome keys, comma separated"},{"name":"direction","in":"query","required":false,"schema":{"type":"string","enum":["inbound","outbound"]}}],"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/analytics/agents":{"get":{"tags":["Analytics"],"summary":"Per team member","description":"Needs **Advanced reports** in your plan.\n\nPermission: `analytics:read`","operationId":"getAnalyticsAgents","x-scope":"analytics:read","parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"tz","in":"query","required":false,"schema":{"default":"UTC","type":"string","pattern":"^[A-Za-z0-9_+\\-/]{1,64}$"},"description":"Days are counted in this zone"},{"name":"agent_ids","in":"query","required":false,"schema":{"type":"string"},"description":"Comma separated"},{"name":"team_ids","in":"query","required":false,"schema":{"type":"string"},"description":"Comma separated"},{"name":"campaign_ids","in":"query","required":false,"schema":{"type":"string"},"description":"Comma separated"},{"name":"outcomes","in":"query","required":false,"schema":{"type":"string"},"description":"Outcome keys, comma separated"},{"name":"direction","in":"query","required":false,"schema":{"type":"string","enum":["inbound","outbound"]}}],"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/analytics/campaigns":{"get":{"tags":["Analytics"],"summary":"Per campaign","description":"Needs **Advanced reports** in your plan.\n\nPermission: `analytics:read`","operationId":"getAnalyticsCampaigns","x-scope":"analytics:read","parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"tz","in":"query","required":false,"schema":{"default":"UTC","type":"string","pattern":"^[A-Za-z0-9_+\\-/]{1,64}$"},"description":"Days are counted in this zone"},{"name":"agent_ids","in":"query","required":false,"schema":{"type":"string"},"description":"Comma separated"},{"name":"team_ids","in":"query","required":false,"schema":{"type":"string"},"description":"Comma separated"},{"name":"campaign_ids","in":"query","required":false,"schema":{"type":"string"},"description":"Comma separated"},{"name":"outcomes","in":"query","required":false,"schema":{"type":"string"},"description":"Outcome keys, comma separated"},{"name":"direction","in":"query","required":false,"schema":{"type":"string","enum":["inbound","outbound"]}}],"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/analytics/leads":{"get":{"tags":["Analytics"],"summary":"Lead funnel","description":"Needs **Advanced reports** in your plan.\n\nPermission: `analytics:read`","operationId":"getAnalyticsLeads","x-scope":"analytics:read","parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"tz","in":"query","required":false,"schema":{"default":"UTC","type":"string","pattern":"^[A-Za-z0-9_+\\-/]{1,64}$"},"description":"Days are counted in this zone"},{"name":"agent_ids","in":"query","required":false,"schema":{"type":"string"},"description":"Comma separated"},{"name":"team_ids","in":"query","required":false,"schema":{"type":"string"},"description":"Comma separated"},{"name":"campaign_ids","in":"query","required":false,"schema":{"type":"string"},"description":"Comma separated"},{"name":"outcomes","in":"query","required":false,"schema":{"type":"string"},"description":"Outcome keys, comma separated"},{"name":"direction","in":"query","required":false,"schema":{"type":"string","enum":["inbound","outbound"]}}],"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/analytics/speed-to-lead":{"get":{"tags":["Analytics"],"summary":"Speed to lead","description":"Permission: `analytics:read`","operationId":"getAnalyticsSpeedToLead","x-scope":"analytics:read","parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"tz","in":"query","required":false,"schema":{"default":"UTC","type":"string","pattern":"^[A-Za-z0-9_+\\-/]{1,64}$"},"description":"Days are counted in this zone"},{"name":"agent_ids","in":"query","required":false,"schema":{"type":"string"},"description":"Comma separated"},{"name":"team_ids","in":"query","required":false,"schema":{"type":"string"},"description":"Comma separated"},{"name":"campaign_ids","in":"query","required":false,"schema":{"type":"string"},"description":"Comma separated"},{"name":"outcomes","in":"query","required":false,"schema":{"type":"string"},"description":"Outcome keys, comma separated"},{"name":"direction","in":"query","required":false,"schema":{"type":"string","enum":["inbound","outbound"]}}],"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/numbers":{"get":{"tags":["Phone numbers"],"summary":"Your phone numbers","description":"With label, texting on/off, assigned team member and health.\n\nPermission: `numbers:read`","operationId":"getNumbers","x-scope":"numbers:read","responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/payments":{"get":{"tags":["Payments"],"summary":"Payments taken","description":"Needs **DialerPay** in your plan.\n\nPermission: `payments:read`","operationId":"getPayments","x-scope":"payments:read","parameters":[{"name":"contact_id","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},{"name":"limit","in":"query","required":false,"schema":{"default":100,"type":"integer","minimum":1,"maximum":500}}],"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/payment-links":{"post":{"tags":["Payments"],"summary":"Send a payment link","description":"A hosted card payment page for the contact, texted to them unless `send_sms` is false. Needs DialerPay set up.\n\nNeeds **DialerPay** in your plan.\n\nPermission: `payments:write`","operationId":"postPaymentLinks","x-scope":"payments:write","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Retry safely: the first response is replayed for 24 hours"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contact_id":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"amount":{"anyOf":[{"type":"number","exclusiveMinimum":0},{"type":"string","pattern":"^\\$?\\d+(\\.\\d{1,2})?$"}],"description":"In your currency, e.g. 49.99"},"description":{"type":"string","minLength":1,"maxLength":200},"send_sms":{"default":true,"type":"boolean"},"save_card":{"default":false,"type":"boolean"},"recurring":{"anyOf":[{"type":"string","enum":["week","month"]},{"type":"null"}]}},"required":["contact_id","amount","description"]}}}},"responses":{"201":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/tracking/campaigns":{"get":{"tags":["Call tracking"],"summary":"Tracking campaigns","description":"Needs **Call tracking** in your plan.\n\nPermission: `tracking:read`","operationId":"getTrackingCampaigns","x-scope":"tracking:read","responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":[{"id":2,"name":"Auto insurance","status":"active","convert_seconds":90,"revenue_cents":4500,"payout_cents":2000,"numbers":6,"routes":3}]}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/tracking/calls":{"get":{"tags":["Call tracking"],"summary":"Tracked calls","description":"Newest first; page with `before` (the last `call_id` you got). Days are in the company’s time zone.\n\nNeeds **Call tracking** in your plan.\n\nPermission: `tracking:read`","operationId":"getTrackingCalls","x-scope":"tracking:read","parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"campaign_id","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},{"name":"buyer_id","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},{"name":"publisher","in":"query","required":false,"schema":{"type":"string","maxLength":40},"description":"An Affiliatetrackingo referral code"},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["routing","ivr","ringing","connected","completed","no_answer","no_target","blocked","closed"]}},{"name":"converted","in":"query","required":false,"schema":{"type":"string","enum":["true","false"]}},{"name":"limit","in":"query","required":false,"schema":{"default":100,"type":"integer","minimum":1,"maximum":500}},{"name":"before","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":[{"call_id":1251,"campaign_id":2,"campaign_name":"Auto insurance","number":"+15125550100","source":"Google Ads","caller":"+15551234567","caller_state":"TX","caller_zip":"78701","status":"completed","target_name":"Acme Insurance – main line","buyer_name":"Acme Insurance","bidder_name":null,"winning_bid_cents":null,"aff_ref_code":"jane","utm_source":"google","click_id_type":"gclid","duplicate":false,"blocked_reason":null,"connected_seconds":312,"converted":true,"revenue_cents":4500,"payout_cents":2000,"returned_at":null,"started_at":"2026-10-16T15:30:00Z","ended_at":"2026-10-16T15:35:30Z"}]}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/tracking/calls/{id}":{"get":{"tags":["Call tracking"],"summary":"One tracked call","description":"With its routing trace, gathered tags, attribution (UTM, click ids), bids and postbacks.\n\nNeeds **Call tracking** in your plan.\n\nPermission: `tracking:read`","operationId":"getTrackingCallsById","x-scope":"tracking:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/tracking/calls/{id}/convert":{"post":{"tags":["Call tracking"],"summary":"Mark a tracked call converted","description":"For conversions you learn about later (a sale the buyer confirmed). Postbacks for “converted” are sent.\n\nNeeds **Call tracking** in your plan.\n\nPermission: `tracking:write`","operationId":"postTrackingCallsByIdConvert","x-scope":"tracking:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Retry safely: the first response is replayed for 24 hours"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"revenue_cents":{"description":"Leave out for the target's price","anyOf":[{"type":"integer","minimum":0,"maximum":100000000},{"type":"null"}]}}}}}},"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/tracking/calls/{id}/return":{"post":{"tags":["Call tracking"],"summary":"Return a converted call","description":"No revenue for it, and the publisher’s commission in Affiliatetrackingo is clawed back.\n\nNeeds **Call tracking** in your plan.\n\nPermission: `tracking:write`","operationId":"postTrackingCallsByIdReturn","x-scope":"tracking:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Retry safely: the first response is replayed for 24 hours"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":500}},"required":["reason"]}}}},"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/tracking/reports":{"get":{"tags":["Call tracking"],"summary":"Tracking report","description":"Calls, conversions, revenue, payout, costs and profit grouped by one dimension, with totals.\n\nNeeds **Call tracking** in your plan.\n\nPermission: `tracking:read`","operationId":"getTrackingReports","x-scope":"tracking:read","parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"campaign_id","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},{"name":"buyer_id","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},{"name":"publisher","in":"query","required":false,"schema":{"type":"string","maxLength":40},"description":"An Affiliatetrackingo referral code"},{"name":"group","in":"query","required":false,"schema":{"default":"campaign","type":"string","enum":["campaign","buyer","target","number","source","publisher","state","day","hour","bidder"]}}],"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/tracking/targets":{"get":{"tags":["Call tracking"],"summary":"Targets","description":"Where calls can go (a buyer’s number or SIP address, or your own ring group, IVR flow or team), with caps, filters, hours and price.\n\nNeeds **Call tracking** in your plan.\n\nPermission: `tracking:read`","operationId":"getTrackingTargets","x-scope":"tracking:read","responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":[{"id":4,"buyer_id":1,"buyer_name":"Acme Insurance","name":"Acme – main line","kind":"phone","destination":"+15125550111","timeout_seconds":30,"cap_on":"conversion","concurrency_cap":5,"hourly_cap":null,"daily_cap":40,"monthly_cap":null,"total_cap":null,"states":["TX","FL"],"area_codes":[],"zip_prefixes":[],"require_tags":[],"exclude_tags":[],"revenue_cents":4500,"revenue_mode":"flat","convert_seconds":90,"active":true}]}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/tracking/targets/{id}":{"patch":{"tags":["Call tracking"],"summary":"Change a target","description":"Pause or resume a buyer’s target, change its caps or price. Fields left out keep their value; `null` removes a cap.\n\nNeeds **Call tracking** in your plan.\n\nPermission: `tracking:write`","operationId":"patchTrackingTargetsById","x-scope":"tracking:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"active":{"type":"boolean"},"revenue_cents":{"description":"Price per conversion; null: the campaign's","anyOf":[{"type":"integer","minimum":0,"maximum":100000000},{"type":"null"}]},"revenue_mode":{"type":"string","enum":["flat","per_minute"]},"convert_seconds":{"anyOf":[{"type":"integer","minimum":0,"maximum":7200},{"type":"null"}]},"concurrency_cap":{"anyOf":[{"type":"integer","minimum":1,"maximum":10000},{"type":"null"}]},"hourly_cap":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000},{"type":"null"}]},"daily_cap":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000},{"type":"null"}]},"monthly_cap":{"anyOf":[{"type":"integer","minimum":1,"maximum":10000000},{"type":"null"}]},"total_cap":{"anyOf":[{"type":"integer","minimum":1,"maximum":100000000},{"type":"null"}]},"timeout_seconds":{"type":"integer","minimum":5,"maximum":120}}},"example":{"active":true,"daily_cap":60}}}},"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/tracking/buyers":{"get":{"tags":["Call tracking"],"summary":"Buyers","description":"With their last 30 days of calls and revenue, and their read-only report link.\n\nNeeds **Call tracking** in your plan.\n\nPermission: `tracking:read`","operationId":"getTrackingBuyers","x-scope":"tracking:read","responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/tracking/numbers":{"get":{"tags":["Call tracking"],"summary":"Tracking numbers","description":"Numbers in a tracking campaign, with their source, publisher referral code and pool.\n\nNeeds **Call tracking** in your plan.\n\nPermission: `tracking:read`","operationId":"getTrackingNumbers","x-scope":"tracking:read","responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":[{"number_id":12,"phone":"+15125550100","campaign_id":2,"campaign_name":"Auto insurance","source":"Google Ads","aff_ref_code":"jane","pool_id":null,"calls_30d":84}]}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/tracking/numbers/{id}":{"put":{"tags":["Call tracking"],"summary":"Put a number in a tracking campaign","description":"The id is one of your phone numbers (`GET /v1/numbers`). Its calls then route through the campaign instead of the number’s own settings, and it is no longer used as outbound caller ID. `aff_ref_code` is the publisher’s Affiliatetrackingo referral code.\n\nNeeds **Call tracking** in your plan.\n\nPermission: `tracking:write`","operationId":"putTrackingNumbersById","x-scope":"tracking:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"campaign_id":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"source":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"aff_ref_code":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"pool_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["campaign_id"]},"example":{"campaign_id":2,"source":"Radio spot","aff_ref_code":"jane"}}}},"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}},"delete":{"tags":["Call tracking"],"summary":"Take a number out of call tracking","description":"Its calls go back to the number’s own inbound settings.\n\nNeeds **Call tracking** in your plan.\n\nPermission: `tracking:write`","operationId":"deleteTrackingNumbersById","x-scope":"tracking:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"responses":{"204":{"description":"Done"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/tracking/blocklist":{"get":{"tags":["Call tracking"],"summary":"Blocked callers","description":"Needs **Call tracking** in your plan.\n\nPermission: `tracking:read`","operationId":"getTrackingBlocklist","x-scope":"tracking:read","responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}},"post":{"tags":["Call tracking"],"summary":"Block a caller","description":"A full number, or a prefix ending in `*`.\n\nNeeds **Call tracking** in your plan.\n\nPermission: `tracking:write`","operationId":"postTrackingBlocklist","x-scope":"tracking:write","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Retry safely: the first response is replayed for 24 hours"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"pattern":{"type":"string","pattern":"^\\+[0-9]{1,15}\\*?$"},"reason":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"days":{"description":"Leave out to block until removed","anyOf":[{"type":"integer","minimum":1,"maximum":3650},{"type":"null"}]}},"required":["pattern"]}}}},"responses":{"201":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/tracking/blocklist/{id}":{"delete":{"tags":["Call tracking"],"summary":"Unblock","description":"Needs **Call tracking** in your plan.\n\nPermission: `tracking:write`","operationId":"deleteTrackingBlocklistById","x-scope":"tracking:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"responses":{"204":{"description":"Done"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/hooks/events":{"get":{"tags":["Webhooks"],"summary":"Events you can subscribe to","description":"Any valid key","operationId":"getHooksEvents","responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/hooks/sample/{event}":{"get":{"tags":["Webhooks"],"summary":"A sample delivery of an event","description":"Any valid key","operationId":"getHooksSampleByEvent","parameters":[{"name":"event","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/hooks":{"get":{"tags":["Webhooks"],"summary":"List webhook subscriptions","description":"Permission: `webhooks:read`","operationId":"getHooks","x-scope":"webhooks:read","responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}},"post":{"tags":["Webhooks"],"summary":"Subscribe a URL to events","description":"Each delivery is a JSON POST `{ id, event, created_at, company_id, data }` signed with `X-Webhook-Signature: t=<unix time>,v1=HMAC-SHA256(secret, \"<t>.<body>\")`. The secret is returned once. Failed deliveries are retried with backoff for about 1.5 hours. Subscriptions are removed with their key.\n\nPermission: `webhooks:write`","operationId":"postHooks","x-scope":"webhooks:write","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Retry safely: the first response is replayed for 24 hours"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"A public https:// URL"},"events":{"minItems":1,"maxItems":18,"type":"array","items":{"type":"string","enum":["call.completed","sms.received","sms.sent","sms.delivery","voicemail.received","lead.exhausted","contact.created","contact.updated","contact.tag_added","contact.tag_removed","contact.dnc_added","appointment.booked","appointment.status_changed","task.created","task.completed","tracking.call_completed","tracking.call_converted","tracking.call_returned"]}},"source":{"default":"api","type":"string","enum":["make","zapier","api"]}},"required":["url","events"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"example":{"id":14,"secret":"whsec_…"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/hooks/{id}":{"delete":{"tags":["Webhooks"],"summary":"Unsubscribe","description":"Permission: `webhooks:write`","operationId":"deleteHooksById","x-scope":"webhooks:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"responses":{"204":{"description":"Done"},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/rtb/v1/bid":{"post":{"tags":["Call tracking"],"summary":"Bid on a call (for networks selling calls to you)","description":"Other networks ask whether you buy a call **before** they send it. Authenticate with the **seller key** you created under Call tracking → Bidding (`Authorization: Bearer rtbs_…`), not an API key.\n\nThe campaign’s targets are checked like a live call would be (hours, caps, state and ZIP filters, the block list). When one can take it you get a bid in dollars and a number to send the call to, held for that caller for `expires_in` seconds. Calls that arrive on it are routed by the campaign and credited to the seller’s publisher code.\n\nDeclined bids answer `accepted: false` with a `reason` (campaign paused, daily cap reached, no buyer available, caller blocked).","operationId":"postRtbBid","security":[{"sellerKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"caller":{"type":"string","description":"The caller’s number, E.164 (+15551234567); when given, the number is held for this caller only"},"state":{"type":"string","description":"Two-letter US state, when known"},"zip":{"type":"string","description":"Five-digit ZIP code, when known"},"tags":{"type":"object","additionalProperties":{"type":"string"},"description":"Anything else you know (matched against targets’ tag filters)"}}},"example":{"caller":"+15551234567","state":"TX","zip":"78701","tags":{"insured":"yes"}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"bid_id":"3f0c6b1e-6a2f-4d5e-9b0a-1c2d3e4f5a6b","accepted":true,"bid":22.5,"phone_number":"+15125550188","expires_in":120,"reason":null}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"429":{"$ref":"#/components/responses/E429"}}}},"/tk/dni.js":{"get":{"tags":["Call tracking"],"summary":"Website number swapping script","description":"Paste the script from Call tracking → Numbers & pools before `</body>` on your site: `<script src=\"https://<api>/tk/dni.js?k=dp_…\" data-replace=\"+15125550100\" async></script>`.\n\n`data-replace` is the number printed on your pages; elements with class `dw-number` (or a `data-dw-number` attribute) and `tel:` links to it show each visitor their own pool number while they browse. `data-format` changes how it is shown (default `(xxx) xxx-xxxx`).\n\nThe call is then tied to the visit: landing page, referrer, UTM tags, keyword and ad click id (gclid, gbraid, wbraid, fbclid, msclkid…). With Affiliatetrackingo’s `t.js` on the same page, the caller is credited to the affiliate who sent them.","operationId":"getDniScript","security":[],"parameters":[{"name":"k","in":"query","required":true,"schema":{"type":"string"},"description":"The pool’s public key (dp_…)"}],"responses":{"200":{"description":"The script (application/javascript)"}}}},"/tk/buyer/{id}/{sig}":{"get":{"tags":["Call tracking"],"summary":"A buyer’s report (signed link)","description":"What the buyer report link shows, as JSON: the buyer’s calls in a period with what each cost and whether it can still be returned. The link (from Call tracking → Targets & buyers) is the credential; a new link revokes the old one.","operationId":"getBuyerReport","security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}},{"name":"sig","in":"path","required":true,"schema":{"type":"string"}},{"name":"from","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"OK"},"404":{"$ref":"#/components/responses/E404"}}}}}}