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
| Name | Type | Required | Description |
|---|---|---|---|
| Idempotency-Key | string | required | Makes 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
| Name | Type | Required | Description |
|---|---|---|---|
| id | string | required | An event ID (evt_...). |
Response
The deliveries that were queued. Status 200.
| Name | Type | Description |
|---|---|---|
| object | string | Always `event_replay`. |
| event_id | string | An ID that starts with evt_. |
| deliveries | array of object | The deliveries queued: one for each endpoint that is enabled and subscribed to the event type now. Empty when there is none. |
| deliveries[].id | string | An ID that starts with whd_. |
| deliveries[].object | string | Always `webhook_delivery`. |
| deliveries[].endpoint_id | string | An ID that starts with whe_. |
Errors
| HTTP status | Code | What it means |
|---|---|---|
| 401 | UNAUTHORIZED | A valid API key is required. Send it as "Authorization: Bearer <key>". |
| 403 | PERMISSION_DENIED | This API key is not allowed to do that. |
| 404 | NOT_FOUND | Not found. |
| 422 | INVALID_REQUEST | The request is not valid. |
| 400 | IDEMPOTENCY_KEY_REQUIRED | This request needs an Idempotency-Key header: a value you make up (a UUID is good), new for each new request. |
| 400 | IDEMPOTENCY_KEY_INVALID | The Idempotency-Key header must be 1 to 255 printable characters. |
| 422 | IDEMPOTENCY_KEY_REUSED | That Idempotency-Key was already used with a different request. |
| 409 | IDEMPOTENCY_KEY_IN_USE | A request with that Idempotency-Key is still running. Send it again with the same key after Retry-After seconds. |
| 429 | TOO_MANY_REQUESTS | Too many requests of this kind lately. Wait, then try again. |
| 413 | PAYLOAD_TOO_LARGE | The request body is larger than 1 MB. |
| 504 | TIMEOUT | The request took too long. Send it again with the same Idempotency-Key and body after Retry-After seconds: a 409 means it is still finishing (wait and send again), and any other answer is final. If this 504 comes back, find what the request made by listing with ?idempotency_key=<the key>. |
| 500 | INTERNAL | Something went wrong on our side. Quote the request ID if you contact us. |
Example
Example request
curl -X POST "https://app.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
{
"object": "event_replay",
"event_id": "evt_01JM000000E008000000000020",
"deliveries": [
{
"id": "whd_01JM000000E008000000000022",
"object": "webhook_delivery",
"endpoint_id": "whe_01JM000000E008000000000021"
}
]
}