2xx range succeeded; 4xx means the request needs fixing on your side; 5xx means something failed on Retainful’s side.
Status codes
Validation failures return
400, not 422. There is no 403 — an API key either authenticates or it doesn’t.Error response shape
Every error carries the same five fields:401 example
code, title, and detail. message and detail carry the same text:
400 example
code when it’s present. Note that 401, 404, and 429 responses have no code field — check for its presence before reading it.
Error codes
Retry guidance
- Retry:
429(after theRetry-After-*window) and5xx(with exponential backoff and a retry cap). - Don’t retry unchanged:
400,401,404— the same request fails the same way. - Retries are safe by design. Contact creation upserts, so repeating it is harmless. Events are deduplicated on
uniqueIdentifier— a retried event updates the stored record instead of triggering the automation twice. Reuse the same identifier when retrying, and only change it for a genuinely new occurrence.