api_version envelope, while others return the error fields at the top level.
Error response formats
Envelope format
Some responses includeapi_version and an error object.
Flat format
Other responses returncode and message at the top level.
Check the API reference for the exact error shape per endpoint.
Common status codes
Handling errors safely
- Use
request_idfor idempotent create calls and reuse it only when retrying the same payload. - Log
code,message, and the HTTP status for support escalations. - Prefer webhooks as the source of truth for asynchronous workflows.