Overview
This API implements idempotency for specific endpoints to prevent duplicate request processing. Idempotency ensures that making the same request multiple times has the same effect as making it once, which is crucial for operations like creating entities or sending invitations.How It Works
A replay answers with the status code of the first response:
201 for a create, 200 for an update.
Only a successful response is stored. A request that fails, with any 4xx or 5xx, is not, so a retry with the same key runs again.
What a key is scoped to
A cached response is keyed on your organization, the HTTP method, the full path and your key. The path includes the version segment and any ids in it. The query string is not part of the path. What that means in practice:- The same UUID sent to two different endpoints does not collide. Reusing a key across operations is still bad practice, but it will not replay the wrong response body.
- A key is private to your organization. Two customers sending the same UUID never see each other’s response.
- The ids in the path count. The same UUID sent to
/v2/upstream/policies/{a}/transactionsand then to/v2/upstream/policies/{b}/transactionsis two separate requests, and both are processed. Use a fresh key per operation anyway. - Retry with exactly the same path. A trailing slash or a change in letter case makes it a different path, and the retry is processed as a new request.
What counts as the same request
The first response is stored with a fingerprint of the request that produced it: the body, the query string and any uploaded files. A retry with the same key to the same path has to send the same request. If anything in it differs, the API answers400 Bad Request and processes nothing, rather than replaying the first response for a request you did not send.
Formatting doesn’t count. JSON keys and query parameters can come in any order, the JSON can be indented or not, and a request with no body matches whether or not it carries Content-Type: application/json.
Supported Endpoints
Every endpoint that accepts a key advertises anidempotency-key parameter on its reference page. The current set:
Agency (/v2/downstream/*) — every write:
POST /v2/downstream/entitiesPOST /v2/downstream/producersPOST /v2/downstream/producers/{producerId}/entitiesPOST /v2/downstream/contactsPOST /v2/downstream/compliance-configsPOST /v2/downstream/corporate-registration-filingsPOST /v2/downstream/documentsPOST /v2/downstream/surplus-lines-filingsPUT /v2/downstream/surplus-lines-filings/{filingId}/policy-documentPOST /v2/downstream/surplus-lines-filings/{filingId}/checklist-item/file-documentsPOST /v2/downstream/surplus-lines-filings/{filingId}/escalation/messages
/v1/* and /v2/upstream/*):
POST /v1/downstream-entity-associations/addandPOST /v2/upstream/downstream-entity-associations/addPOST /v1/downstream-entity-associations/inviteandPOST /v2/upstream/downstream-entity-associations/invitePOST /v1/policiesandPOST /v2/upstream/policiesPOST /v1/policies/uploadandPOST /v2/upstream/policies/uploadPOST /v1/policies/{policyId}/transactionsandPOST /v2/upstream/policies/{policyId}/transactionsPOST /v2/upstream/file-documents(v2 only; the v1 upload does not accept a key)POST /v2/upstream/surplus-lines-filings(v2 only, no v1 route)PUT /v2/upstream/surplus-lines-filings/{filingId}/policy-document(v2 only, no v1 route)POST /v2/upstream/surplus-lines-filings/{filingId}/checklist-item/file-documents(v2 only, no v1 route)POST /v2/upstream/surplus-lines-filings/{filingId}/escalation/messages(v2 only, no v1 route)POST /v2/upstream/diligent-effort-requests(v2 only, no v1 route)POST /v2/upstream/appointment-requests(v2 only, no v1 route)POST /v2/upstream/appointment-requests/{appointmentRequestId}/cancel(v2 only, no v1 route)POST /v2/upstream/termination-requests(v2 only, no v1 route)POST /v2/upstream/termination-requests/{terminationRequestId}/cancel(v2 only, no v1 route)POST /v2/upstream/contacts(v2 only, no v1 route)PATCH /v2/upstream/downstream-entity-associations/{downstreamEntityAssociationId}(v2 only, no v1 route)POST /v2/upstream/downstream-entity-associations/{downstreamEntityAssociationId}/executed-producer-agreement(v2 only, no v1 route)
No other carrier write on
v2 supports idempotency keys. On v1 the two deprecated dangerously- association endpoints also accept one; both are absent from v2. Sending one to an endpoint that does not accept it is harmless — the header is ignored — but the request is not protected against a retry.Headers
Include one of these headers in your requests to enable idempotency:Usage Guidelines
When to Use Idempotency Keys
Creating new entities or resources
Sending invitations or notifications
Any operation that should not be duplicated
Network retry scenarios
User interface double-click prevention
Behavior
Error Handling
Example Usage
Request with Idempotency Key
Generating UUIDs
Use any UUID v4 generator:Best Practices
Generate Unique Keys
Use a fresh UUID for each logical operation
Client-Side Generation
Generate UUIDs on the client side before making requests
Retry Logic
Use the same idempotency key when retrying failed requests
Key Management
Don’t reuse keys across different operations
Testing
Include both scenarios in your tests:- Requests with idempotency keys
- Requests without idempotency keys
Postman Variables
You can use Postman’s built-in variable for testing:This implementation ensures reliable API operations and prevents duplicate processing in distributed systems and unreliable network conditions.