Error response shapes
Standard errors (validation failures, missing resources, state conflicts, server errors) return a flat body with a machine-readablecode and a correlationId you can quote to support. Some codes also include a details object (for example, field-level validation errors):
401, and 403 when the key lacks a scope) use a simpler two-field body with no code:
429) include retryAfter in the body and a Retry-After header:
HTTP status codes
Common error codes
Email error codes (early access)
The/v1/email/* surface is in early access. Every endpoint under it returns
403 EMAIL_EARLY_ACCESS until the product reaches general availability, so that
is the only code an integration will see today. The rest are the codes those
endpoints throw once the surface is open.
DMARC_ROOT_DOMAIN_NOT_MANAGED is never resolved by retrying. Surface it to a
human.
Note that 401 responses and permission-scope 403 responses come from the authentication layer and carry no code field (see the shapes above).
Retrying safely
- All
GETendpoints are safe to retry - they have no side effects. - For
POSTandPATCH, retry only on429,500,502,503, and504responses. Don’t retry on400,401,403, or404- those indicate a problem with your request that won’t be fixed by trying again. - If you need stronger duplicate-write protection, send a unique
Idempotency-Keyheader (16-200 printable ASCII characters; a UUID is recommended) on every write request. Retried calls with the same key within 24 hours return the cached response from the first call, marked with anX-Idempotent-Replayed: trueresponse header. Reusing a key with a different body returns422(IDEMPOTENCY_MISMATCH).
How agents should recover
Unattended integrations and AI agents should encode this recovery matrix rather than treating all failures alike:
Before treating repeated
5xx failures as your bug, check status.politicalcomms.com. A standalone machine-readable version of this playbook is published at politicalcomms.com/errors.md.
Reporting bugs
If you see a500 response or a code that’s not documented here, please email support@politicalcomms.com with:
- Your request method and path
- The full response body, including the
correlationIdfield (we use it to look up server-side logs; it is also sent as theX-Correlation-IDresponse header) - Approximate timestamp (UTC is easiest)
