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:
metaonly holds keys that the route’spaginationobject has. A response withoutpaginationhas nometa. Delivery logs mirrorpage,total,limitandtotalPages.- Arrays, files, streams, redirects and the
track.jsscript are never wrapped or changed. errorInfois the v1 spelling of the v2errorobject. See Errors.- The webhook test delivery returns
200withsuccess: falsewhen your receiver fails. It getsrequestIdandtimestampbut noerrorInfo.
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/crmoperations. Response schemas for calls, the queue, events, webhooks, delivery logs, agents, analysis schemas, leads, tickets and tokens describe the real fields plusrequestId,timestamp,meta,errorInfoandcode. Frozen fields are markedx-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
dataobject. - 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.
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
- 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.
- 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.
- From the announcement on, deprecated routes also return
DeprecationandSunsetresponse headers. The backend can send them, but no route uses them today. - Frozen fields are removed, if ever, only together with such an announcement and only in a new major version.