Skip to main content
The API version is part of the URL path. v2 does not replace v1. Both run side by side, use the same API tokens and the same account permissions, and read and write the same data. A call created through v1 shows up in v2 and the other way round.

What v2 covers

These parts of v1 have no v2 equivalent yet and stay on v1: API token management (/tokens), /analysis-schemas, /retry-analysis, /track, and /shopify/confirmation-calls.

The v1 envelope

Every JSON object response from /api/v1/crm is a superset of the response it had before: A successful call list now looks like this. Fields that existed before are unchanged:
Rules:
  • meta only holds keys that the route’s pagination object has. A response without pagination has no meta. Delivery logs mirror page, total, limit and totalPages.
  • Arrays, files, streams, redirects and the track.js script are never wrapped or changed.
  • errorInfo is the v1 spelling of the v2 error object. See Errors.
  • The webhook test delivery returns 200 with success: false when your receiver fails. It gets requestId and timestamp but no errorInfo.

Frozen legacy fields

These v1 fields are frozen. They stay in the response with the same name, type and value. We will not extend them (no new keys inside them, no new routes using them). We will remove them only in a future major API version, with a Sunset date announced at least 6 months ahead. No Sunset date is set today and no v1 route is marked deprecated. New integrations should read the replacement and ignore the frozen field. The message field of an error duplicates errorInfo.message, and the code field duplicates errorInfo.code. Both are kept.

Machine-readable contract

  • v2: GET https://client-backend.oktivo.com/api/v2/openapi.json (no authentication). The same document is rendered in the API v2 (OpenAPI) tab.
  • v1: rendered in the API v1 (OpenAPI) tab. It lists the existing /api/v1/crm operations. Response schemas for calls, the queue, events, webhooks, delivery logs, agents, analysis schemas, leads, tickets and tokens describe the real fields plus requestId, timestamp, meta, errorInfo and code. Frozen fields are marked x-frozen.

Changes that do not need a new version

We may make these changes to either version at any time. Write clients that tolerate them.
  • Adding a new field to a response body or a new key to a webhook data object.
  • Adding a new optional request field or query parameter.
  • Adding a new endpoint, event type or error code.
  • Adding a new response header.
  • Tightening validation so that a value that was silently ignored now returns a validation error.
Do not rely on the order of fields, and treat unknown enum values defensively where a field is an open list (for example event types).

Changes that would need a new version

Removing or renaming a field, changing a field’s type or meaning, changing a status code for an existing outcome, or removing an endpoint. The removal of a frozen field is one of these.

Deprecation policy

  1. A change that needs a new version ships in a new major version (for example v3) next to the old one. The old version keeps working.
  2. Before we remove anything from a version, we announce a Sunset date at least 6 months ahead. The announcement goes to the account owners and to this documentation. Until then, nothing is removed.
  3. From the announcement on, deprecated routes also return Deprecation and Sunset response headers. The backend can send them, but no route uses them today.
  4. Frozen fields are removed, if ever, only together with such an announcement and only in a new major version.
Today no v1 route and no v1 field is deprecated, and no Sunset date exists.

Choosing a version

Use v1 if your integration works today, or if you need an endpoint listed above as v1-only. Use v2 for new work on the resources it covers. See Migrating from v1 to v2.