Skip to main content
v1 keeps working. Migrate one resource at a time. Both versions use the same API token, so you only change URLs and the way you read responses. See Versioning and compatibility for scope.

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 has id, 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 with meta: { page, limit, total }.

Leads

  • contactName and fullName are accepted for name. opportunityAmount is accepted for opportunityValue, leadTemperature for temperature, and industryData or fields for customFields.
  • 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 under customFields.
  • v2 does not create an opportunity automatically and does not record the caller’s IP address or user agent.
  • Response: 201 with the created lead, or 200 with meta.merged: true when the lead was merged into an existing one. The DTO has id, callId, name, phone, email, status, temperature, opportunityValue, source, customFields, createdAt, updatedAt.

Tickets

  • body is accepted for description.
  • Request fields: subject, description, phone, email, name, externalId.
  • Response: { id, status, channel, leadId }. 201 for a new ticket, 200 with meta: { 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_CANCELLABLE when 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-Key on POST /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 return 413.
  • v2 sets a Retry-After header on 429 and some 503 responses.

Suggested order

  1. Add X-Request-ID and log it. Add Idempotency-Key to your POST requests on v1 first; this needs no other change.
  2. Move read endpoints (calls, queue, events) and switch to cursor pagination.
  3. Move writes and webhook management.
  4. Switch your error handling to error.code.