Webhook endpoints
Webhook endpoints are HTTPS URLs that receive HTTP POSTs for the events your store cares about, signed per the Standard Webhooks spec. Subscribe each endpoint to one or more event types from the curated catalog and rotate its signing secret on demand.
- GETList all webhook endpoints/v1/webhooks/endpoints
- GETRetrieve a webhook endpoint/v1/webhooks/endpoints/{endpointId}
- POSTCreate a webhook endpoint/v1/webhooks/endpoints
- PATCHUpdate a webhook endpoint/v1/webhooks/endpoints/{endpointId}
- DELETEDelete a webhook endpoint/v1/webhooks/endpoints/{endpointId}
- GETList all webhook event types/v1/webhooks/endpoints/event-types
- POSTRotate a webhook signing secret/v1/webhooks/endpoints/{endpointId}/rotate-secret
- POSTSend a test event to a webhook endpoint/v1/webhooks/endpoints/{endpointId}/send-test-event
The webhook endpoint object
The webhook endpoint object is the shape returned by endpoints in this collection. Its attributes are listed below.
Attributes
Whether the endpoint is currently receiving deliveries. Disabled endpoints stay in the list but are skipped by the dispatcher.
Pinned event payload version. Reserved for forward compatibility; today every endpoint receives the latest shape.
Time the endpoint was created.
Optional human-readable label shown in the dashboard.
Unique identifier for the webhook endpoint.
Store this endpoint belongs to.
Event types (or glob patterns) the endpoint subscribes to. Patterns are constrained to the published catalog — see GET /v1/webhooks/event-types.
Time the endpoint was last updated.
Absolute URL that receives the signed event POSTs.
{ "active": false, "apiVersion": "string", "createdAt": "2026-01-01T00:00:00.000Z", "description": "Production webhook", "id": "whe_01HJZQK7XJ8R9YGEWABCDEFGHJK", "storeId": "str_01HJZQK7XJ8R9YGEWABCDEFGHJK", "subscribedEvents": [ "product.created", "product.updated" ], "updatedAt": "2026-01-01T00:00:00.000Z", "url": "https://example.com/webhooks/mercel"}List all webhook endpoints
Lists every webhook endpoint configured for the current store. Returned in a single page today — the response envelope still uses Pagination so the surface is forward-compatible.
Path & query parameters
Maximum number of items to return per page. Defaults to 20, capped at 100.
Opaque pagination token. Pass the value returned in nextPageUrl / previousPageUrl rather than constructing one — the encoding is internal and may change.
curl -X GET "https://api.mercel.app/v1/webhooks/endpoints"{
"data": [
{
"active": true,
"apiVersion": "string",
"createdAt": "2019-08-24T14:15:22Z",
"description": "Production webhook",
"id": "whe_01HJZQK7XJ8R9YGEWABCDEFGHJK",
"storeId": "str_01HJZQK7XJ8R9YGEWABCDEFGHJK",
"subscribedEvents": [
"product.created",
"product.updated"
],
"updatedAt": "2019-08-24T14:15:22Z",
"url": "https://example.com/webhooks/mercel"
}
],
"nextPageUrl": "http://example.com",
"previousPageUrl": "http://example.com"
}Retrieve a webhook endpoint
Retrieves the details of an existing webhook endpoint by id.
Path & query parameters
The id of the webhook endpoint to operate on.
curl -X GET "https://api.mercel.app/v1/webhooks/endpoints/whe_01hh9zzzzzzzzzzzzzzzzzzzzz"{
"endpoint": {
"active": true,
"apiVersion": "string",
"createdAt": "2019-08-24T14:15:22Z",
"description": "Production webhook",
"id": "whe_01HJZQK7XJ8R9YGEWABCDEFGHJK",
"storeId": "str_01HJZQK7XJ8R9YGEWABCDEFGHJK",
"subscribedEvents": [
"product.created",
"product.updated"
],
"updatedAt": "2019-08-24T14:15:22Z",
"url": "https://example.com/webhooks/mercel"
}
}Create a webhook endpoint
Creates a webhook endpoint and issues its initial signing secret. The raw secret is returned exactly once — save it now, as the platform retains a hash only.
Body parameters
Pinned event payload version. Reserved for forward compatibility.
Optional human-readable label shown in the dashboard.
Event types (or glob patterns) the endpoint subscribes to. Patterns are constrained to the published catalog — see GET /v1/webhooks/event-types.
Absolute https URL the webhook events should be POSTed to.
curl -X POST "https://api.mercel.app/v1/webhooks/endpoints" \ -H "Content-Type: application/json" \ -d '{ "subscribedEvents": [ "product.created", "product.updated" ], "url": "https://example.com/webhooks/mercel" }'{
"endpoint": {
"active": true,
"apiVersion": "string",
"createdAt": "2019-08-24T14:15:22Z",
"description": "Production webhook",
"id": "whe_01HJZQK7XJ8R9YGEWABCDEFGHJK",
"storeId": "str_01HJZQK7XJ8R9YGEWABCDEFGHJK",
"subscribedEvents": [
"product.created",
"product.updated"
],
"updatedAt": "2019-08-24T14:15:22Z",
"url": "https://example.com/webhooks/mercel"
},
"secret": {
"createdAt": "2019-08-24T14:15:22Z",
"id": "whs_01HJZQK7XJ8R9YGEWABCDEFGHJK",
"secret": "whsec_AAAA1111BBBB2222CCCC3333DDDD4444",
"secretPreview": "whsec_AAA…"
}
}Update a webhook endpoint
Updates the specified webhook endpoint by setting the values of the fields passed. Any fields not provided are left unchanged.
Path & query parameters
The id of the webhook endpoint to operate on.
Body parameters
Whether the endpoint should receive new deliveries. Disable to pause without losing the endpoint and its history.
Pinned event payload version. Reserved for forward compatibility.
Optional human-readable label shown in the dashboard.
Event types (or glob patterns) the endpoint subscribes to. Patterns are constrained to the published catalog — see GET /v1/webhooks/event-types.
Absolute https URL the webhook events should be POSTed to.
curl -X PATCH "https://api.mercel.app/v1/webhooks/endpoints/whe_01hh9zzzzzzzzzzzzzzzzzzzzz" \ -H "Content-Type: application/json" \ -d '{}'{
"endpoint": {
"active": true,
"apiVersion": "string",
"createdAt": "2019-08-24T14:15:22Z",
"description": "Production webhook",
"id": "whe_01HJZQK7XJ8R9YGEWABCDEFGHJK",
"storeId": "str_01HJZQK7XJ8R9YGEWABCDEFGHJK",
"subscribedEvents": [
"product.created",
"product.updated"
],
"updatedAt": "2019-08-24T14:15:22Z",
"url": "https://example.com/webhooks/mercel"
}
}Delete a webhook endpoint
Permanently deletes a webhook endpoint and revokes its signing secrets. Past delivery rows are retained for audit purposes. This action cannot be undone.
Path & query parameters
The id of the webhook endpoint to operate on.
curl -X DELETE "https://api.mercel.app/v1/webhooks/endpoints/whe_01hh9zzzzzzzzzzzzzzzzzzzzz"{
"ok": true
}List all webhook event types
Lists the published catalog of event types a webhook endpoint can subscribe to. The catalog is curated — subscriptions must match an entry exactly or use a documented glob pattern. The catalog is the same for every store.
Path & query parameters
Maximum number of items to return per page. Defaults to 20, capped at 100.
Opaque pagination token. Pass the value returned in nextPageUrl / previousPageUrl rather than constructing one — the encoding is internal and may change.
curl -X GET "https://api.mercel.app/v1/webhooks/endpoints/event-types"{
"data": [
{
"category": "product",
"description": "string",
"type": "product.created"
}
],
"nextPageUrl": "http://example.com",
"previousPageUrl": "http://example.com"
}Rotate a webhook signing secret
Issues a fresh signing secret on the endpoint. The previous secret remains valid for 24 hours so receivers can roll over without missing deliveries. The new raw secret is returned exactly once.
Path & query parameters
The id of the webhook endpoint to operate on.
curl -X POST "https://api.mercel.app/v1/webhooks/endpoints/whe_01hh9zzzzzzzzzzzzzzzzzzzzz/rotate-secret"{
"secret": {
"createdAt": "2019-08-24T14:15:22Z",
"id": "whs_01HJZQK7XJ8R9YGEWABCDEFGHJK",
"secret": "whsec_AAAA1111BBBB2222CCCC3333DDDD4444",
"secretPreview": "whsec_AAA…"
}
}Send a test event to a webhook endpoint
Enqueues a synthetic webhook.ping delivery to the endpoint so you can verify connectivity, signing, and your receiver code without waiting for a real event. The endpoint must be active.
Path & query parameters
The id of the webhook endpoint to operate on.
curl -X POST "https://api.mercel.app/v1/webhooks/endpoints/whe_01hh9zzzzzzzzzzzzzzzzzzzzz/send-test-event"{
"ping": {
"deliveryId": "whd_01HJZQK7XJ8R9YGEWABCDEFGHJK"
}
}