PARTNERING INSURTECH LIMITED Aggregator: Merchant API
v1.0.0Every endpoint lives under /api/v1. Authenticate with the x-api-key header, sent as <keyId>:<secret>; the key id prefix decides the environment (sk_test_ reads and writes test data, sk_live_ production data), and a live key on a business that is not activated for production is refused with 403 PRODUCTION_NOT_ACTIVATED.
Every response carries X-Request-Id: the value sent on the request when it matches ^[A-Za-z0-9._-]{1,64}$, otherwise a freshly minted req_<uuid>. Every authenticated response also carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset; requests over the per-minute budget are refused with 429 and a Retry-After.
Every failure (including the ones raised by an insurer behind this API) answers the same error envelope, whose correlationId is the request id. When the failure came from an insurer, its own correlation id is preserved as details.providerCorrelationId and its OIIS code and status are passed through unchanged, so codes and statuses beyond the ones listed on an operation are possible.
Text fields are trimmed before they are used and a value that is only whitespace is rejected as empty, while the documented length bounds are measured before trimming.
Request bodies must be JSON and are capped at 1 MiB; a larger body is refused with 413 PAYLOAD_TOO_LARGE and a malformed one with 400 BAD_REQUEST.
Writes are idempotent: send a UUIDv4 Idempotency-Key. Repeating a key with the same body replays the stored result: 200 instead of 201, with Idempotency-Replayed: true. Repeating it with a different body is 409 IDEMPOTENCY_KEY_CONFLICT.
Meta
3 endpoints/healthLiveness and deployed version
Public: this route is mounted before authentication.
Responses
The API is serving.
{
"status": null,
"version": ""
}/api/v1/healthCode samples
curl -X GET '/api/v1/health'/openapi.jsonThis document
Public. servers[0].url is rewritten from the request host so the document points back at the deployment that served it.
Responses
The OpenAPI 3.1 document.
null/api/v1/openapi.jsonCode samples
curl -X GET '/api/v1/openapi.json'/docsRendered reference
Public. An HTML page that renders /api/v1/openapi.json with ReDoc.
Responses
The documentation page.
null/api/v1/docsCode samples
curl -X GET '/api/v1/docs'Catalog
4 endpoints/taxonomyThe active product taxonomy
The classes, categories and product types products are filed under. Only active nodes are served, grouped by level and sorted by parent then sort order.
Requires API key authentication. The API key issued to the business, sent as `<keyId>:<secret>`, for example `sk_test_0123456789abcdef0123456789abcdef:<secret>`. The key id prefix selects the environment: `sk_test_` keys read and write test data, `sk_live_` keys production data.
Responses
The active taxonomy.
null/api/v1/taxonomyCode samples
curl -X GET '/api/v1/taxonomy'/productsList the products this business may sell
Only products available to this business in this key's environment are listed; availability cannot be relaxed from the query string.
Paging is by opaque cursor. Send no cursor for the first page, then send back the nextCursor the previous page returned, unchanged, until nextCursor is null. A page may be shorter than limit and still carry a nextCursor: a short page is not the end of the list, only a null nextCursor is. A cursor this API did not issue is refused with 400.
Text search (q) is single-page: it answers the best matches for the query and always returns nextCursor: null, so pair q with limit rather than paging it.
Requires API key authentication. The API key issued to the business, sent as `<keyId>:<secret>`, for example `sk_test_0123456789abcdef0123456789abcdef:<secret>`. The key id prefix selects the environment: `sk_test_` keys read and write test data, `sk_live_` keys production data.
Parameters
qquerystringdefault: Free-text search across the catalog. Single-page: the response always carries nextCursor: null.categoryquerystringdefault: Provider category code to filter by.productTypequerystringdefault: Platform product type code from /taxonomy.classCodequerystringdefault: Platform class code from /taxonomy.limitqueryintegerdefault: Page size. Defaults to 20.cursorquerystringdefault: Opaque cursor from the previous page's nextCursor. Do not construct or decode it.Responses
One page of products.
{
"items": [],
"nextCursor": null
}/api/v1/productsQuery parameters
qcategoryproductTypeclassCodelimitcursorCode samples
curl -X GET '/api/v1/products'/products/{providerId}/{productId}Read one product
A product this business may not sell, one hidden by its status, and one that does not exist are the same 404. The configuration is best-effort: when the insurer cannot be reached for it the product is still served, with config: null and configStatus: "unavailable".
Requires API key authentication. The API key issued to the business, sent as `<keyId>:<secret>`, for example `sk_test_0123456789abcdef0123456789abcdef:<secret>`. The key id prefix selects the environment: `sk_test_` keys read and write test data, `sk_live_` keys production data.
Responses
The product and its configuration.
null/api/v1/products/{providerId}/{productId}Code samples
curl -X GET '/api/v1/products/{providerId}/{productId}'/commercial-ratesThis business's own commercial rate per available product
The share of each available product's price this business receives, resolved from the platform's commercial configuration. The platform's own share is never included. Scoped to the key's environment, exactly as GET /products is.
Paging is by opaque cursor, exactly as GET /products pages: send no cursor for the first page, then send back the nextCursor the previous page returned, unchanged, until nextCursor is null. A page may be shorter than limit and still carry a nextCursor; only a null nextCursor means the list is exhausted. A cursor this API did not issue is refused with 400.
Requires API key authentication. The API key issued to the business, sent as `<keyId>:<secret>`, for example `sk_test_0123456789abcdef0123456789abcdef:<secret>`. The key id prefix selects the environment: `sk_test_` keys read and write test data, `sk_live_` keys production data.
Parameters
productIdquerystringdefault: Only this product's rate.limitqueryintegerdefault: Page size. Defaults to 20.cursorquerystringdefault: Opaque cursor from the previous page's nextCursor. Do not construct or decode it.Responses
One page of resolved rates.
{
"items": [],
"nextCursor": null
}/api/v1/commercial-ratesQuery parameters
productIdlimitcursorCode samples
curl -X GET '/api/v1/commercial-rates'Forms
3 endpoints/products/{providerId}/{productId}/formThe form to collect for a product
Returns the insurer's form document for one context. The form is validated against the OIIS form schema before it is served: a form that fails validation is 422, with the validator's findings in fieldErrors. Keep formId and formVersion, because quoting requires them. The renewal and endorsement contexts can be fetched but have no submit route in this version, so build no flow on them yet.
Requires API key authentication. The API key issued to the business, sent as `<keyId>:<secret>`, for example `sk_test_0123456789abcdef0123456789abcdef:<secret>`. The key id prefix selects the environment: `sk_test_` keys read and write test data, `sk_live_` keys production data.
Parameters
contextquerystringrequireddefault: Which form to serve.Responses
The form document.
null/api/v1/products/{providerId}/{productId}/formQuery parameters
context*Code samples
curl -X GET '/api/v1/products/{providerId}/{productId}/form'/forms/{providerId}/{formId}/{formVersion}/optionsLoad the options of one form field
For fields whose options come from the insurer rather than the form document. The field's declared options URL is interpolated from values, so send the answers it names; a placeholder with no answer, a non-scalar answer, or an answer that would escape the insurer's namespace is 400 and names the offending path. A field that loads no options remotely (and a form version this business never fetched) is 404. Searchable fields refuse a query shorter than the field's minimum.
Requires API key authentication. The API key issued to the business, sent as `<keyId>:<secret>`, for example `sk_test_0123456789abcdef0123456789abcdef:<secret>`. The key id prefix selects the environment: `sk_test_` keys read and write test data, `sk_live_` keys production data.
Parameters
formIdpathstringrequireddefault: The formId the form was served with.formVersionpathintegerrequireddefault: The formVersion the form was served with.Request body
application/json{
"fieldId": "",
"query": ""
}Responses
The options for the field.
{
"options": [],
"nextCursor": null
}/api/v1/forms/{providerId}/{formId}/{formVersion}/optionsPath parameters
formId*formVersion*Request body
Code samples
curl -X POST '/api/v1/forms/{providerId}/{formId}/{formVersion}/options' \
-H 'Content-Type: application/json' \
--data-raw '{
"fieldId": "",
"query": ""
}'/uploadsAsk for an upload slot
Reserves a slot with the insurer for one file and hands back the URL to PUT the bytes to. Upload the file yourself, then quote the fileId in a claim's attachments[] or in an attach-document request. An insurer that caps out on the size answers 413 UPLOAD_TOO_LARGE.
Requires API key authentication. The API key issued to the business, sent as `<keyId>:<secret>`, for example `sk_test_0123456789abcdef0123456789abcdef:<secret>`. The key id prefix selects the environment: `sk_test_` keys read and write test data, `sk_live_` keys production data.
Request body
application/json{
"providerId": null,
"purpose": "",
"filename": "",
"mediaType": "",
"bytes": 0
}Responses
The slot to upload into.
null/api/v1/uploadsRequest body
Code samples
curl -X POST '/api/v1/uploads' \
-H 'Content-Type: application/json' \
--data-raw '{
"providerId": null,
"purpose": "",
"filename": "",
"mediaType": "",
"bytes": 0
}'Comparison
1 endpoint/compareCompare the products of one product type
One row per product this business may sell of the given product type, over the same coverage dictionary rows and the same comparison attributes, so the rows line up column by column. A product this business may not sell is simply absent: the response never names it, never says why, and no field relaxes that.
Every premium is read from what the insurer already published. Set quotes to true to additionally ask for an indicative quote wherever one can be asked for; inputs and a UUIDv4 Idempotency-Key are then required, at most 10 insurers are asked, and any beyond that carry premiumUnavailable.reason: "QUOTE_LIMIT_REACHED". The Idempotency-Key header is read only when quotes is true, and a product whose insurer publishes an exact price is never re-quoted.
Nothing here ranks, recommends or re-prices: the only ordering is the sort asked for, and every amount is an integer in minor units carrying its own currency.
Requires API key authentication. The API key issued to the business, sent as `<keyId>:<secret>`, for example `sk_test_0123456789abcdef0123456789abcdef:<secret>`. The key id prefix selects the environment: `sk_test_` keys read and write test data, `sk_live_` keys production data.
Headers
Idempotency-KeyA UUIDv4, read only when quotes is true and ignored otherwise, since a comparison without quotes writes nothing. It is never replayed as a whole: a per-product key is derived from it for each insurer asked, so repeating it replays those insurer quotes rather than this response, and this operation never answers 409. Reusing a key with different inputs cannot replay those quotes: each product it affects comes back with premiumUnavailable.reason: "QUOTE_FAILED".Request body
application/json{
"productType": "",
"providerIds": [],
"quotes": false,
"sort": "UPDATED_DESC",
"limit": 20,
"country": null,
"currency": null,
"channel": null
}Responses
The comparison set.
null/api/v1/compareHeaders
Idempotency-KeyRequest body
Code samples
curl -X POST '/api/v1/compare' \
-H 'Content-Type: application/json' \
--data-raw '{
"productType": "",
"providerIds": [],
"quotes": false,
"sort": "UPDATED_DESC",
"limit": 20,
"country": null,
"currency": null,
"channel": null
}'Quotes
3 endpoints/quotesList quotes
The quotes this business has requested, newest first.
Requires API key authentication. The API key issued to the business, sent as `<keyId>:<secret>`, for example `sk_test_0123456789abcdef0123456789abcdef:<secret>`. The key id prefix selects the environment: `sk_test_` keys read and write test data, `sk_live_` keys production data.
Parameters
productIdquerystringdefault: Only quotes for this product.Responses
One page of quotes.
{
"items": [],
"pagination": null
}/api/v1/quotesQuery parameters
productIdCode samples
curl -X GET '/api/v1/quotes'/quotesRequest a quote
Prices a product with the answers collected on its quote form. formId and formVersion must be the ones /products/{providerId}/{productId}/form served. The stored quote is validated against the OIIS quote schema: an insurer response that fails it is 422 and no retry of the same request will help. Fetch the form from GET /products/{providerId}/{productId}/form before quoting: a formId@formVersion this API has not fetched from that insurer is 422 VALIDATION_FAILED, not 404.
Requires API key authentication. The API key issued to the business, sent as `<keyId>:<secret>`, for example `sk_test_0123456789abcdef0123456789abcdef:<secret>`. The key id prefix selects the environment: `sk_test_` keys read and write test data, `sk_live_` keys production data.
Request body
application/json{
"providerId": null,
"productId": "",
"formId": "",
"formVersion": 0,
"configuration": null,
"context": null,
"country": null,
"currency": null,
"channel": null
}Responses
The quote this Idempotency-Key already produced, replayed.
null/api/v1/quotesRequest body
Code samples
curl -X POST '/api/v1/quotes' \
-H 'Content-Type: application/json' \
--data-raw '{
"providerId": null,
"productId": "",
"formId": "",
"formVersion": 0,
"configuration": null,
"context": null,
"country": null,
"currency": null,
"channel": null
}'/quotes/{providerId}/{quoteId}Read one quote
A quote another business owns is the same 404 as one that does not exist.
Requires API key authentication. The API key issued to the business, sent as `<keyId>:<secret>`, for example `sk_test_0123456789abcdef0123456789abcdef:<secret>`. The key id prefix selects the environment: `sk_test_` keys read and write test data, `sk_live_` keys production data.
Parameters
quoteIdpathstringrequireddefault: The insurer's quote id.Responses
The stored quote.
null/api/v1/quotes/{providerId}/{quoteId}Path parameters
quoteId*Code samples
curl -X GET '/api/v1/quotes/{providerId}/{quoteId}'Purchases
3 endpoints/purchasesList purchases
The purchases this business has made, newest first.
Requires API key authentication. The API key issued to the business, sent as `<keyId>:<secret>`, for example `sk_test_0123456789abcdef0123456789abcdef:<secret>`. The key id prefix selects the environment: `sk_test_` keys read and write test data, `sk_live_` keys production data.
Responses
One page of purchases.
{
"items": [],
"pagination": null
}/api/v1/purchasesCode samples
curl -X GET '/api/v1/purchases'/purchasesBuy a quote
Turns a usable quote into a policy. Collect the premium yourself and describe the settled payment in payment; amountMinor must match the quote's total, or the request is 409 AMOUNT_MISMATCH. A quote that has expired or has already been bought is 409.
Requires API key authentication. The API key issued to the business, sent as `<keyId>:<secret>`, for example `sk_test_0123456789abcdef0123456789abcdef:<secret>`. The key id prefix selects the environment: `sk_test_` keys read and write test data, `sk_live_` keys production data.
Request body
application/json{
"providerId": null,
"quoteId": "",
"transactionId": "",
"customer": null,
"payment": null,
"beneficiaries": [],
"consents": [],
"startDate": "",
"context": null,
"country": null,
"currency": null,
"channel": null
}Responses
The purchase this Idempotency-Key already produced, replayed.
null/api/v1/purchasesRequest body
Code samples
curl -X POST '/api/v1/purchases' \
-H 'Content-Type: application/json' \
--data-raw '{
"providerId": null,
"quoteId": "",
"transactionId": "",
"customer": null,
"payment": null,
"beneficiaries": [],
"consents": [],
"startDate": "",
"context": null,
"country": null,
"currency": null,
"channel": null
}'/purchases/{providerId}/{purchaseId}Read one purchase
A purchase another business owns is the same 404 as one that does not exist.
Requires API key authentication. The API key issued to the business, sent as `<keyId>:<secret>`, for example `sk_test_0123456789abcdef0123456789abcdef:<secret>`. The key id prefix selects the environment: `sk_test_` keys read and write test data, `sk_live_` keys production data.
Parameters
purchaseIdpathstringrequireddefault: The insurer's purchase id.Responses
The stored purchase.
null/api/v1/purchases/{providerId}/{purchaseId}Path parameters
purchaseId*Code samples
curl -X GET '/api/v1/purchases/{providerId}/{purchaseId}'Policies
5 endpoints/policiesList policies
The policies this business has sold, newest first. Each row carries the last policy document read from the insurer; read the policy itself for a live view.
Requires API key authentication. The API key issued to the business, sent as `<keyId>:<secret>`, for example `sk_test_0123456789abcdef0123456789abcdef:<secret>`. The key id prefix selects the environment: `sk_test_` keys read and write test data, `sk_live_` keys production data.
Responses
One page of policy records.
{
"items": [],
"pagination": null
}/api/v1/policiesCode samples
curl -X GET '/api/v1/policies'/policies/{providerId}/{policyId}Read one policy
Reads the policy from the insurer, not from the stored row, so the state is current. A policy another business owns is a 404 and the insurer is never called.
Requires API key authentication. The API key issued to the business, sent as `<keyId>:<secret>`, for example `sk_test_0123456789abcdef0123456789abcdef:<secret>`. The key id prefix selects the environment: `sk_test_` keys read and write test data, `sk_live_` keys production data.
Responses
The policy as the insurer holds it.
{
"policy": null
}/api/v1/policies/{providerId}/{policyId}Code samples
curl -X GET '/api/v1/policies/{providerId}/{policyId}'/policies/{providerId}/{policyId}/documentsList a policy's documents
Lists the documents the insurer holds for this policy, so a documentId can be discovered rather than guessed. Read the bytes of one with GET /policies/{providerId}/{policyId}/documents/{documentId}. A policy another business owns is a 404 and the insurer is never called.
Requires API key authentication. The API key issued to the business, sent as `<keyId>:<secret>`, for example `sk_test_0123456789abcdef0123456789abcdef:<secret>`. The key id prefix selects the environment: `sk_test_` keys read and write test data, `sk_live_` keys production data.
Responses
Every document this insurer lists for the policy. An insurer that lists none answers an empty array.
{
"items": []
}/api/v1/policies/{providerId}/{policyId}/documentsCode samples
curl -X GET '/api/v1/policies/{providerId}/{policyId}/documents'/policies/{providerId}/{policyId}/documents/{documentId}Download a policy document
Answers the decoded bytes, not JSON. Content-Type is the insurer's media type when it is a well-formed type and application/octet-stream otherwise; Content-Disposition is always attachment with a sanitised filename, falling back to the document id. A document larger than the ceiling this API will hold in memory is refused with 502 rather than streamed: DOCUMENT_TOO_LARGE when the insurer inlines the bytes, DOCUMENT_REDIRECT_REFUSED when a signed-redirect download overruns the ceiling or its URL fails the redirect policy.
Requires API key authentication. The API key issued to the business, sent as `<keyId>:<secret>`, for example `sk_test_0123456789abcdef0123456789abcdef:<secret>`. The key id prefix selects the environment: `sk_test_` keys read and write test data, `sk_live_` keys production data.
Parameters
documentIdpathstringrequireddefault: The document id carried on the policy.Responses
The document bytes.
null/api/v1/policies/{providerId}/{policyId}/documents/{documentId}Path parameters
documentId*Code samples
curl -X GET '/api/v1/policies/{providerId}/{policyId}/documents/{documentId}'/policies/{providerId}/{policyId}/cancelCancel a policy
Answers 200 whether the insurer cancelled outright or took the request under review: read outcome to tell them apart. A policy the insurer will not cancel is 409 POLICY_NOT_CANCELLABLE.
Requires API key authentication. The API key issued to the business, sent as `<keyId>:<secret>`, for example `sk_test_0123456789abcdef0123456789abcdef:<secret>`. The key id prefix selects the environment: `sk_test_` keys read and write test data, `sk_live_` keys production data.
Request body
application/json{
"reason": "",
"note": "",
"requestedEffectiveDate": ""
}Responses
The cancellation, whether it completed, is pending, or was replayed.
{
"outcome": "",
"cancellation": null
}/api/v1/policies/{providerId}/{policyId}/cancelRequest body
Code samples
curl -X POST '/api/v1/policies/{providerId}/{policyId}/cancel' \
-H 'Content-Type: application/json' \
--data-raw '{
"reason": "",
"note": "",
"requestedEffectiveDate": ""
}'Claims
5 endpoints/claimsList claims
The claims this business has filed, newest first. Each row carries the last claim document read from the insurer; read the claim itself for a live view.
Requires API key authentication. The API key issued to the business, sent as `<keyId>:<secret>`, for example `sk_test_0123456789abcdef0123456789abcdef:<secret>`. The key id prefix selects the environment: `sk_test_` keys read and write test data, `sk_live_` keys production data.
Responses
One page of claim records.
{
"items": [],
"pagination": null
}/api/v1/claimsCode samples
curl -X GET '/api/v1/claims'/claimsSubmit a claim
Files a claim against a policy this business sold. Attach evidence by reserving slots at /uploads, uploading the bytes, and quoting the fileIds here. A claim against a policy another business owns is a 404. When you send formId and formVersion, fetch that form from GET /products/{providerId}/{productId}/form first: a form this API has not fetched from that insurer is 422 VALIDATION_FAILED, not 404.
Requires API key authentication. The API key issued to the business, sent as `<keyId>:<secret>`, for example `sk_test_0123456789abcdef0123456789abcdef:<secret>`. The key id prefix selects the environment: `sk_test_` keys read and write test data, `sk_live_` keys production data.
Request body
application/json{
"providerId": null,
"policyId": "",
"type": "",
"incidentAt": "",
"formId": "",
"formVersion": 0,
"attachments": [],
"claimedAmount": null,
"payout": null
}Responses
The claim this Idempotency-Key already produced, replayed.
null/api/v1/claimsRequest body
Code samples
curl -X POST '/api/v1/claims' \
-H 'Content-Type: application/json' \
--data-raw '{
"providerId": null,
"policyId": "",
"type": "",
"incidentAt": "",
"formId": "",
"formVersion": 0,
"attachments": [],
"claimedAmount": null,
"payout": null
}'/claims/{providerId}/{claimId}Read one claim
Reads the claim from the insurer, not from the stored row. A claim another business owns is a 404 and the insurer is never called.
Requires API key authentication. The API key issued to the business, sent as `<keyId>:<secret>`, for example `sk_test_0123456789abcdef0123456789abcdef:<secret>`. The key id prefix selects the environment: `sk_test_` keys read and write test data, `sk_live_` keys production data.
Responses
The claim as the insurer holds it.
null/api/v1/claims/{providerId}/{claimId}Code samples
curl -X GET '/api/v1/claims/{providerId}/{claimId}'/claims/{providerId}/{claimId}/documentsAttach a document to a claim
Quotes a fileId from /uploads against an open claim. Answers 200 with the updated claim, replayed or not.
Requires API key authentication. The API key issued to the business, sent as `<keyId>:<secret>`, for example `sk_test_0123456789abcdef0123456789abcdef:<secret>`. The key id prefix selects the environment: `sk_test_` keys read and write test data, `sk_live_` keys production data.
Request body
application/jsonnullResponses
The claim after the attachment.
null/api/v1/claims/{providerId}/{claimId}/documentsRequest body
Code samples
curl -X POST '/api/v1/claims/{providerId}/{claimId}/documents'/claims/{providerId}/{claimId}/appealAppeal a claim decision
A claim gets one appeal. A claim in a state that cannot be appealed, and one that has already used its appeal, are both 409 APPEAL_NOT_ALLOWED.
Requires API key authentication. The API key issued to the business, sent as `<keyId>:<secret>`, for example `sk_test_0123456789abcdef0123456789abcdef:<secret>`. The key id prefix selects the environment: `sk_test_` keys read and write test data, `sk_live_` keys production data.
Request body
application/json{
"reason": "",
"attachments": []
}Responses
The claim after the appeal.
null/api/v1/claims/{providerId}/{claimId}/appealRequest body
Code samples
curl -X POST '/api/v1/claims/{providerId}/{claimId}/appeal' \
-H 'Content-Type: application/json' \
--data-raw '{
"reason": "",
"attachments": []
}'Webhooks
11 endpoints/webhooks/deliveriesList webhook deliveries
Every event this API has sent, or is still trying to send, to the webhook endpoint of this business in this environment, newest first. Deliveries of another business are never listed, and neither the signing secret nor the endpoint of anyone else is ever part of a row.
Requires API key authentication. The API key issued to the business, sent as `<keyId>:<secret>`, for example `sk_test_0123456789abcdef0123456789abcdef:<secret>`. The key id prefix selects the environment: `sk_test_` keys read and write test data, `sk_live_` keys production data.
Responses
One page of deliveries.
{
"items": [],
"pagination": null
}/api/v1/webhooks/deliveriesCode samples
curl -X GET '/api/v1/webhooks/deliveries'/webhooks/deliveries/{deliveryId}Read one webhook delivery
The same row the list serves, plus the exact event body that was signed and the endpoint it was sent to. A delivery this business does not own is a 404, indistinguishable from one that never existed.
Requires API key authentication. The API key issued to the business, sent as `<keyId>:<secret>`, for example `sk_test_0123456789abcdef0123456789abcdef:<secret>`. The key id prefix selects the environment: `sk_test_` keys read and write test data, `sk_live_` keys production data.
Responses
The delivery, with its payload.
{
"delivery": null
}/api/v1/webhooks/deliveries/{deliveryId}Code samples
curl -X GET '/api/v1/webhooks/deliveries/{deliveryId}'/webhooks/deliveries/{deliveryId}/retryRetry a webhook delivery
Queues the delivery again from a clean slate: the status goes back to PENDING, the attempt counter to zero, the last failure is cleared and the next sweep sends it. PENDING, FAILED and DEAD deliveries can be retried; one that already succeeded is 409 INVALID_STATE_TRANSITION. No attempt is made while your request is open, so a 200 means queued, not delivered. The retry is recorded against your Idempotency-Key, so repeating that key replays the stored result with Idempotency-Replayed: true; the delivery is queued once, and a key repeated after the delivery has since succeeded still replays that stored result rather than answering 409.
Requires API key authentication. The API key issued to the business, sent as `<keyId>:<secret>`, for example `sk_test_0123456789abcdef0123456789abcdef:<secret>`. The key id prefix selects the environment: `sk_test_` keys read and write test data, `sk_live_` keys production data.
Responses
The delivery as it now stands, queued for the next sweep.
{
"delivery": null
}/api/v1/webhooks/deliveries/{deliveryId}/retryRequest body
Code samples
curl -X POST '/api/v1/webhooks/deliveries/{deliveryId}/retry'/webhook-endpointsList webhook endpoints
The endpoints of this business in the environment of the key, oldest first. A business holds at most 10 endpoints per environment, so the list is not paged. Signing secrets are never part of a row.
Requires API key authentication. The API key issued to the business, sent as `<keyId>:<secret>`, for example `sk_test_0123456789abcdef0123456789abcdef:<secret>`. The key id prefix selects the environment: `sk_test_` keys read and write test data, `sk_live_` keys production data.
Responses
Every endpoint of this business in this environment.
{
"items": []
}/api/v1/webhook-endpointsCode samples
curl -X GET '/api/v1/webhook-endpoints'/webhook-endpointsCreate a webhook endpoint
Registers an endpoint in the environment of the key and mints its signing secret. The secret is returned in this response only: store it now. Events are sent to the endpoint only when their name is in events; ["*"] subscribes to every event, including ones added later. The URL must be https and reach a public host. Repeating the Idempotency-Key replays the stored endpoint with 200, Idempotency-Replayed: true and without secret, since the plaintext secret is never stored; recover it by rotating the secret with POST /webhook-endpoints/{endpointId}/rotate-secret, which returns a new secret once. More than 10 endpoints per environment, an unknown event name or a URL the policy refuses is 422 VALIDATION_FAILED.
Requires API key authentication. The API key issued to the business, sent as `<keyId>:<secret>`, for example `sk_test_0123456789abcdef0123456789abcdef:<secret>`. The key id prefix selects the environment: `sk_test_` keys read and write test data, `sk_live_` keys production data.
Request body
application/jsonnullResponses
A replay of an earlier request with the same Idempotency-Key: the stored endpoint, without secret. The plaintext secret is never stored; if the first response was lost, get a new one from POST /webhook-endpoints/{endpointId}/rotate-secret.
{
"endpoint": null
}/api/v1/webhook-endpointsRequest body
Code samples
curl -X POST '/api/v1/webhook-endpoints'/webhook-endpoints/{endpointId}Read a webhook endpoint
One endpoint of this business in the environment of the key. An endpoint of another business or of the other environment is 404.
Requires API key authentication. The API key issued to the business, sent as `<keyId>:<secret>`, for example `sk_test_0123456789abcdef0123456789abcdef:<secret>`. The key id prefix selects the environment: `sk_test_` keys read and write test data, `sk_live_` keys production data.
Responses
The endpoint.
{
"endpoint": null
}/api/v1/webhook-endpoints/{endpointId}Code samples
curl -X GET '/api/v1/webhook-endpoints/{endpointId}'/webhook-endpoints/{endpointId}Delete a webhook endpoint
Removes the endpoint. Nothing more is sent to its URL: deliveries still pending for it stop with FAILED.
Requires API key authentication. The API key issued to the business, sent as `<keyId>:<secret>`, for example `sk_test_0123456789abcdef0123456789abcdef:<secret>`. The key id prefix selects the environment: `sk_test_` keys read and write test data, `sk_live_` keys production data.
Responses
The endpoint is gone.
null/api/v1/webhook-endpoints/{endpointId}Code samples
curl -X DELETE '/api/v1/webhook-endpoints/{endpointId}'/webhook-endpoints/{endpointId}Update a webhook endpoint
Changes the fields sent and leaves the others as they are. A null description clears it. Disabling an endpoint stops new deliveries to it, and deliveries still pending for it stop with FAILED. Fields other than url, events, description and enabled are ignored.
Requires API key authentication. The API key issued to the business, sent as `<keyId>:<secret>`, for example `sk_test_0123456789abcdef0123456789abcdef:<secret>`. The key id prefix selects the environment: `sk_test_` keys read and write test data, `sk_live_` keys production data.
Request body
application/jsonnullResponses
The endpoint as it now stands.
{
"endpoint": null
}/api/v1/webhook-endpoints/{endpointId}Request body
Code samples
curl -X PATCH '/api/v1/webhook-endpoints/{endpointId}'/webhook-endpoints/{endpointId}/rotate-secretRotate the signing secret of an endpoint
Mints a new signing secret and returns it in this response only. The previous secret keeps signing alongside the new one for 24 hours, so your receiver can switch over without dropping events: during that window every event carries a signature for each secret.
Requires API key authentication. The API key issued to the business, sent as `<keyId>:<secret>`, for example `sk_test_0123456789abcdef0123456789abcdef:<secret>`. The key id prefix selects the environment: `sk_test_` keys read and write test data, `sk_live_` keys production data.
Responses
The endpoint and its new signing secret.
{
"endpoint": null,
"secret": null
}/api/v1/webhook-endpoints/{endpointId}/rotate-secretRequest body
Code samples
curl -X POST '/api/v1/webhook-endpoints/{endpointId}/rotate-secret'/webhook-endpoints/{endpointId}/testSend a test event to an endpoint
Sends a signed webhook.test event to the endpoint now, whatever events it subscribes to, and answers what your endpoint replied. The event is not queued, retried or written to the delivery log. A 2xx answer from an endpoint of the test environment completes the webhook step of the production activation checklist, exactly as a real delivery does. A disabled endpoint, or one whose signing secret was revoked, is sent nothing.
Requires API key authentication. The API key issued to the business, sent as `<keyId>:<secret>`, for example `sk_test_0123456789abcdef0123456789abcdef:<secret>`. The key id prefix selects the environment: `sk_test_` keys read and write test data, `sk_live_` keys production data.
Responses
What happened to the test event, delivered or not.
null/api/v1/webhook-endpoints/{endpointId}/testRequest body
Code samples
curl -X POST '/api/v1/webhook-endpoints/{endpointId}/test'/webhook-eventsList webhook event names
Every event name an endpoint can subscribe to, and the wildcard that subscribes to all of them.
Requires API key authentication. The API key issued to the business, sent as `<keyId>:<secret>`, for example `sk_test_0123456789abcdef0123456789abcdef:<secret>`. The key id prefix selects the environment: `sk_test_` keys read and write test data, `sk_live_` keys production data.
Responses
The event names.
{
"events": [],
"allEvents": ""
}/api/v1/webhook-eventsCode samples
curl -X GET '/api/v1/webhook-events'