Register a webhook subscription
const url = 'http://localhost:8891/api/v1/webhooks';const options = { method: 'POST', headers: { 'idempotency-key': '3f8a1c62-9d5e-4b7a-8f21-0c4e6b9d2a17', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"url":"https://hooks.partner.example/elasticstage","events":["track.ready","product.available"],"secret":"whsec_your_own_secret"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:8891/api/v1/webhooks \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'idempotency-key: 3f8a1c62-9d5e-4b7a-8f21-0c4e6b9d2a17' \ --data '{ "url": "https://hooks.partner.example/elasticstage", "events": [ "track.ready", "product.available" ], "secret": "whsec_your_own_secret" }'Point an endpoint at one or more events (see the payloads published under webhooks in this document). Deliveries are signed with the secret you supply — it is never returned, so keep your copy. 409 on an Idempotency-Key reused for a different request; 422 when the URL resolves to a private, loopback, link-local or metadata address. Requires the webhooks:create scope. Events, signature verification and delivery semantics: see webhook events.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Header Parameters
Section titled “Header Parameters”Example
3f8a1c62-9d5e-4b7a-8f21-0c4e6b9d2a17Unique key for this write. Retrying with the same key replays the first response instead of creating a duplicate; reusing it for a different body is a 409. Keys are scoped to the operation, so the same key may also be sent to a different endpoint.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Example
{ "url": "https://hooks.partner.example/elasticstage", "events": [ "track.ready", "product.available" ], "secret": "whsec_your_own_secret"}Responses
Section titled “ Responses ”Default Response
object
Example
{ "id": "b7d4c8e1-2f3a-4b5c-8d6e-7f8091a2b3c4", "url": "https://hooks.partner.example/elasticstage", "events": [ "track.ready", "product.available" ], "status": "active", "consecutive_failures": 0, "last_delivery_at": null, "last_failure_at": null, "disabled_at": null, "created_at": "2026-07-29T10:02:11Z", "updated_at": "2026-07-29T10:02:11Z"}Default Response
object
Example
{ "code": "VALIDATION_ERROR"}Default Response
object
Example
{ "code": "VALIDATION_ERROR"}Default Response
object
Example
{ "code": "VALIDATION_ERROR"}Default Response
object
Example
{ "code": "VALIDATION_ERROR"}Default Response
object
Example
{ "code": "VALIDATION_ERROR"}Default Response
object
Example
{ "code": "VALIDATION_ERROR"}Default Response
object
Example
{ "code": "VALIDATION_ERROR"}Default Response
object
Example
{ "code": "VALIDATION_ERROR"}