What changes for every call
Check
data for success and error.code for failure. In v2 a response with success: true always has data.
Endpoint mapping
Not in v2, keep using v1:
/tokens, /analysis-schemas, /retry-analysis, /track, /shopify/confirmation-calls.
Field mapping
Create call (POST /calls)
Request: the fields are the same (phone, name, agentId, dynamicVariables, retryConfig, deferIfUnavailable, scheduledAt). v2 also accepts phoneNumber for phone and agent for agentId.
A call placed now returns
201. A scheduled or deferred call returns 202, as in v1.
Call (list and get)
List filters:
campaignUID is now campaignId, contactUID is now callId, agentID is now agentId, page and pageSize are now cursor and limit. The old names are still accepted as aliases. A call that only exists in the queue is returned by GET /calls/{id} with the same shape.
Bulk calls (POST /calls/bulk)
The request is { calls: [...], deferIfUnavailable?, scheduledAt? }. Item-level deferIfUnavailable and scheduledAt override the request-level values. The response is always 200; look at each item:
Call queue
sortBy=scheduledFor is accepted and treated as notBefore.
Events
An event hasid, type, version, timestamp, source and data in both versions. The data object is the same payload your webhooks receive. GET /events/{id} in v2 also returns a deliveries array.
Webhook endpoints
The secret is returned once, when you create the endpoint or regenerate the secret. Regenerate returns
{ id, secret } in data (v1: webhookId and secret next to success). Credentials inside auth are never returned; v2 shows { type, headerName, sendIn, hasCredentials }.
Test delivery returns delivered (boolean), status, body, latencyMs, error and samplePayload in data. v1 returned success, result and samplePayload, with success set to the delivery outcome.
Webhook delivery logs
The detail endpoint adds
requestHeaders, requestBody and responseBody.
Agents
v1 returns the stored field names and the full list without paging. v2 returns camelCase names withmeta: { page, limit, total }.
Leads
contactNameandfullNameare accepted forname.opportunityAmountis accepted foropportunityValue,leadTemperaturefortemperature, andindustryDataorfieldsforcustomFields.- v2 accepts a fixed set of fields:
name,phone,email,status,temperature,opportunityValue,customFields,source,visitorId. Unknown top-level keys are dropped. In v1 they were stored as custom fields; in v2 put them undercustomFields. - v2 does not create an opportunity automatically and does not record the caller’s IP address or user agent.
- Response:
201with the created lead, or200withmeta.merged: truewhen the lead was merged into an existing one. The DTO hasid,callId,name,phone,email,status,temperature,opportunityValue,source,customFields,createdAt,updatedAt.
Tickets
bodyis accepted fordescription.- Request fields:
subject,description,phone,email,name,externalId. - Response:
{ id, status, channel, leadId }.201for a new ticket,200withmeta: { created: false, duplicate: true }for a duplicate.
Errors
errorInfo is the v1 spelling of the v2 error object, so moving a client from v1 to v2 only changes the property name and the validation detail shape. Codes are listed in Errors.
Behaviour differences to check
- Cancelling a call is one atomic update in v2. It returns
409 CALL_NOT_CANCELLABLEwhen the call is already being dialed or finished. - Webhook endpoint deletion is a soft delete, as in v1: the endpoint stops receiving events and no longer appears in lists.
- v2 additionally supports
Idempotency-KeyonPOST /webhooks/endpoints. See Idempotency. - v2 body limits: 100 KB, and 1 MB for
POST /calls/bulk. v1 allows 1 MB, and 10 MB for bulk calls, leads and tracking. Requests above the limit return413. - v2 sets a
Retry-Afterheader on429and some503responses.
Suggested order
- Add
X-Request-IDand log it. AddIdempotency-Keyto yourPOSTrequests on v1 first; this needs no other change. - Move read endpoints (calls, queue, events) and switch to cursor pagination.
- Move writes and webhook management.
- Switch your error handling to
error.code.