Requests
Send JSON with Content-Type: application/json on any request that has a body. Path parameters are UUIDs.
Responses
Successful responses wrap the payload in a data key:
```
{ "data": { "object": "campaign", "id": "…", "name": "Q4 outbound" } }
```
Collections return an array in data plus a pagination object.
Idempotency
Write endpoints that create or trigger something accept an x-idempotency-key header. Send a unique value (a UUID) per logical operation and retry with the same value: the second call returns the first call's result instead of doing the work twice.
If a retry arrives while the first call is still running you get 409 idempotency_in_progress; wait and retry. If the same key is reused with a different body you get 409 idempotency_conflict.
Important notes
- Payloads above the size limit return
413 payload_too_large. - A non-JSON content type on a body request returns
415 unsupported_media_type. - Unknown methods on a valid path return
405 method_not_allowed.
Was this article helpful?
