Webhooks
Register webhook endpoints (Settings → Webhooks, or via the API). MetaKit sends a JSON POST event to every registered URL. See the Webhook Events section for the full catalog of events and example payloads. The same event is sent to each webhook independently.
- Failed deliveries (non-2xx, connection error, or no answer within 10 seconds) are retried for about 3 days: after 5s, 30s, 2m, 10m, 30m, 1h, 3h, 6h, 12h, 24h and 24h. Events are stored before sending, so retries survive restarts on our side.
- Every delivery carries
X-MetaKit-Delivery, the same on every retry, with a byte-identical body. Delivery is at-least-once: drop ids you have already processed. Each retry is re-signed with a fresht. - A webhook whose deliveries all fail for 7 days is disabled and its owner emailed. Nothing is sent to it until it is enabled again, or its URL is changed.
- Every delivery from the last 30 days, with its status and the exact payload, is listed in Settings → Webhooks → Deliveries and by the deliveries endpoint below. Failed ones can be resent.
List webhooks
/v1/webhooksAll registered webhook endpoints.
curl https://api.metakit.cloud/v1/webhooks \
-H "Authorization: Bearer stk_live_..."[
{ "id": "6a...", "name": "Trade alerts", "url": "https://example.com/hook",
"lastDeliveryStatus": "never", "status": "active", "createdAt": "2026-07-10T12:00:00.000Z" }
]Create webhook
/v1/webhooksRegister a webhook endpoint.
{ "name": "Trade alerts", "url": "https://example.com/hook" }curl https://api.metakit.cloud/v1/webhooks \
-H "Authorization: Bearer stk_live_..." \
-H "Content-Type: application/json" \
-X POST \
-d '{ "name": "Trade alerts", "url": "https://example.com/hook" }'{ "id": "6a...", "name": "Trade alerts", "url": "https://example.com/hook",
"lastDeliveryStatus": "never", "createdAt": "2026-07-10T12:00:00.000Z" }Update webhook
/v1/webhooks/{id}Update a webhook name and/or URL. Changing the URL of a disabled webhook also enables it again.
{ "name": "Renamed", "url": "https://example.com/new" }curl https://api.metakit.cloud/v1/webhooks/123 \
-H "Authorization: Bearer stk_live_..." \
-H "Content-Type: application/json" \
-X PATCH \
-d '{ "name": "Renamed", "url": "https://example.com/new" }'{ "id": "6a...", "name": "Renamed", "url": "https://example.com/new", "...": "..." }Enable webhook
/v1/webhooks/{id}/enableTurn a disabled webhook back on (status becomes active). New events are sent again; events from while it was disabled are not, but failed deliveries can be resent.
curl https://api.metakit.cloud/v1/webhooks/123/enable \
-H "Authorization: Bearer stk_live_..." \
-X POST{ "id": "6a...", "status": "active", "...": "..." }List deliveries
/v1/webhooks/{id}/deliveriesDeliveries to one webhook, newest first, kept 30 days. status is pending (waiting for a retry), delivered or failed. payload is the exact body sent. After an outage on your side, list the failed ones and resend them.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
status | string | No | pending, delivered or failed. |
page | integer | No | Page number (default 1). |
limit | integer | No | Items per page (default 25, max 100). |
curl https://api.metakit.cloud/v1/webhooks/123/deliveries \
-H "Authorization: Bearer stk_live_..."{
"data": [
{
"id": "6745c0d2a1b2c3d4e5f60718",
"event": "trade.position.closed",
"status": "failed",
"attempts": 12,
"last_response_status": 503,
"last_error": "HTTP 503",
"last_latency_ms": 212,
"last_attempt_at": "2026-07-31T09:44:10.000Z",
"next_attempt_at": null,
"delivered_at": null,
"created_at": "2026-07-28T09:41:00.000Z",
"payload": "{"event":"position.closed", ...}"
}
],
"page": 1, "limit": 25, "total": 1, "total_pages": 1
}Resend delivery
/v1/webhooks/{id}/deliveries/{delivery_id}/resendSend one delivery again now, with the same body and X-MetaKit-Delivery id. Its retry schedule restarts. Returns 409 webhook_disabled while the webhook is disabled, and 409 delivery_in_progress if an attempt is running right now.
curl https://api.metakit.cloud/v1/webhooks/123/deliveries/123/resend \
-H "Authorization: Bearer stk_live_..." \
-X POST{ "id": "6745c0d2a1b2c3d4e5f60718", "status": "delivered", "attempts": 1, "...": "..." }Delete webhook
/v1/webhooks/{id}Remove a webhook. Returns 204.
curl https://api.metakit.cloud/v1/webhooks/123 \
-H "Authorization: Bearer stk_live_..." \
-X DELETE204 No Content