Idempotency-Key header and you can retry it without doing the work twice.
Every POST, PATCH and DELETE accepts the header. GET requests ignore it, because they change nothing.
400 idempotency_key_invalid. Keys are scoped to your company.
Replays
When a request succeeds, Alex stores its status and body against the key. Send the same request with the same key again and you get the stored response back, with this header:Request-Id.
“The same request” means the same method, path, query parameters and JSON body. The order of JSON keys and query parameters doesn’t matter.
Conflicts
Which outcomes are stored
Only successful responses are stored and replayed. Every error releases the key, so you can fix the problem and retry with the same key:
A released key works as if it were never used.
Retention
A stored response is kept for 24 hours from the first request. After that, the key is forgotten and a request with it runs as new. Retry within 24 hours.Endpoints that are safe to retry anyway
Some endpoints are idempotent without a key, because a repeat finds the existing record:POST /candidatesreturns the existing candidate with the sameexternal_idor email.POST /invitationsreturns the candidate’s live application on the job.POST /partner-applicationsreturns the sameapplication_idwithcreated: false.POST /handoffs/{id}/cancelreturns200for a handoff that is already cancelled.
201, rather than a 200.
Deletes
DELETE /jobs/{id}, DELETE /candidates/{id} and DELETE /webhook-endpoints/{id} return 204 when they delete the object and 404 resource_missing when there is nothing to delete, including when it was already deleted. A retry without a key can therefore get a 404 for a delete that worked. Send an Idempotency-Key and a retry gets the first 204 back.
Responses that carry a secret
POST /webhook-endpoints and POST /webhook-endpoints/{id}/rotate-secret return the endpoint’s signing secret once. A replay of either has secret: null, because the secret is never stored where it can be shown again. If you lose it, rotate the secret.