Skip to the page
Chapters

Events

Replay an event

POST/api/v1/events/{id}/replay

Sends the event again: one new delivery is queued for each endpoint that is enabled and subscribed to its type now (none when there is no such endpoint). The event is the same, with the same ID and sequence. Send an empty JSON object as the body. An event of another organization or mode is not found.

Needs a key with submit permission.

Request

Headers

Headers
NameTypeRequiredDescription
Idempotency-KeystringrequiredMakes the request safe to repeat: a request with the same key and body returns the first answer (the reply has an idempotent-replayed header), and the same key with a different request is refused. 1 to 255 printable characters; a UUID is a good choice.At least 1 character.At most 255 characters.Matches `^[\x21-\x7e]{1,255}$`.

Path parameters

Path parameters
NameTypeRequiredDescription
idstringrequiredAn event ID (evt_...).

Response

The deliveries that were queued. Status 200.

Response fields
NameTypeDescription
objectstringAlways `event_replay`.
event_idstringAn ID that starts with evt_.
deliveriesarray of objectThe deliveries queued: one for each endpoint that is enabled and subscribed to the event type now. Empty when there is none.
deliveries[].idstringAn ID that starts with whd_.
deliveries[].objectstringAlways `webhook_delivery`.
deliveries[].endpoint_idstringAn ID that starts with whe_.

Errors

Errors
HTTP statusCodeWhat it means
401UNAUTHORIZEDA valid API key is required. Send it as "Authorization: Bearer <key>".
403PERMISSION_DENIEDThis API key is not allowed to do that.
404NOT_FOUNDNot found.
422INVALID_REQUESTThe request is not valid.
400IDEMPOTENCY_KEY_REQUIREDPOST and PATCH requests need an Idempotency-Key header.
422IDEMPOTENCY_KEY_REUSEDThat Idempotency-Key was already used with a different request.
409IDEMPOTENCY_KEY_IN_USEA request with that Idempotency-Key is still running. Retry shortly.
429TOO_MANY_REQUESTSToo many requests of this kind lately. Wait, then try again.
413PAYLOAD_TOO_LARGEThe request body is larger than 1 MB.
504TIMEOUTThe request took too long to finish. It may still have taken effect: look it up before sending it again with a new Idempotency-Key. What it made is found with GET /api/v1/eligibility?request_id=<this request_id>, and the same filter on /api/v1/claims and /api/v1/attachments (a key with read permission).
500INTERNALSomething went wrong on our side. Quote the request ID if you contact us.

Example

Example request

Shell
curl -X POST "https://sandbox.myclaimhouse.com/api/v1/events/evt_01JM000000E008000000000020/replay" \
  -H "Authorization: Bearer $CLAIMHOUSE_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Example response: 200

JSON
{
  "object": "event_replay",
  "event_id": "evt_01JM000000E008000000000020",
  "deliveries": [
    {
      "id": "whd_01JM000000E008000000000022",
      "object": "webhook_delivery",
      "endpoint_id": "whe_01JM000000E008000000000021"
    }
  ]
}