API reference
The Optima REST APIs.
Optima has three REST APIs. Each page below lists every operation with its parameters, request and response bodies, and lets you download the OpenAPI document for code generators and API clients.
| API | Use it for | Reference |
|---|---|---|
| CDP API | Profiles, events, identity, segments, privacy, integrations | CDP API |
| Campaign API | Campaigns, journeys, offers, templates, next-best-action | Campaign API |
| Edge API | Tracking, consent, content and forms from websites and apps | Edge API |
Base URL
Your administrator gives you each API's address; the APIs can be served from different
hosts. Every operation path starts with the API's own prefix: /cdp/api/v1 for the CDP
API, /campaign/api/v1 for the Campaign API, and /edge/v1 for the Edge API.
Authentication
CDP and Campaign requests carry an API key in the X-APIKey header. Create keys in the console
under Settings → Access → API keys; a key can do only what its roles allow. Edge
requests from a website or app carry a public site key in the X-Edge-Key header, which
the SDKs send for you. Site keys are created on the Tracking page
(Data → Tracking, SDK keys tab).
Responses and errors
CDP and Campaign responses use one envelope: status, message, and data on success.
An error returns the matching HTTP status with a message that explains it. 429 means
you sent too many requests: wait for the number of seconds in the Retry-After header
before trying again. The Edge API answers with plain acknowledgements rather than this
envelope.
SDKs
For websites and mobile apps, use an SDK instead of calling the Edge API directly.