Webhook
Private Webhook API endpoints (endpoints, deliveries, event log)
- GET/webhooks/endpoints
- POST/webhooks/endpoints
- GET/webhooks/stats
- GET/webhooks/endpoints/{webhook_endpoint_id}
- PATCH/webhooks/endpoints/{webhook_endpoint_id}
- DELETE/webhooks/endpoints/{webhook_endpoint_id}
- POST/webhooks/endpoints/{webhook_endpoint_id}/rotate_secret
- POST/webhooks/endpoints/{webhook_endpoint_id}/ping
- GET/webhooks/deliveries
- GET/webhooks/deliveries/{delivery_id}
- POST/webhooks/deliveries/{delivery_id}/retry
- GET/webhooks/events
- GET/webhooks/events/{event_id}
- GET/webhooks/event_types
Query parameters
pageoptionalintegerper_pageoptionalintegerstatusoptionalstringPossible values: enabled, disabled.
Returnsobject
Webhook endpoints list response
Generates the signing secret and returns it once in the response; it is never shown again. Fails with 400 webhook_endpoints_limit_reached when the shop already keeps the configured maximum number of endpoints (30).
Request body
urlRequiredstringAbsolute https URL of the receiver. Must not contain credentials or a fragment and must not resolve to a private or reserved address.
enabled_eventsRequiredstring[]Exact event types (invoice.paid), prefix wildcards (subscription.*, subscription.item.*) or the catch-all *. See GET /webhooks/event_types.
descriptionoptionalstring | nullalert_emailoptionalstring | nullFormat: email.
ReturnsWebhookEndpointWithSecret
Webhook endpoint created, secret included
Error responses
400objectThe shop already keeps the maximum number of webhook endpoints
422objectValidation failed
Shop-level counters (endpoints in use against the limit, deliveries and successes of the last 24 hours, deliveries still scheduled and the earliest next attempt, endpoints with a failing streak) plus one row per live endpoint with its 7-day counts, failing flag, projected auto-disable time and last delivery.
ReturnsWebhookEndpointStats
Webhook endpoint statistics
Health fields included; the secret is never returned.
Path parameters
webhook_endpoint_idRequiredstringReturnsWebhookEndpoint
Webhook endpoint response
Error responses
404objectWebhook endpoint, delivery or event not found for this shop
Replace the subscription list with enabled_events, or change it incrementally with add_events / remove_events; the two styles cannot be combined in one request. Disabling an endpoint marks its scheduled and queued deliveries as skipped (an attempt already in flight finishes); enabling resets the failure counters. Enabling may carry resend_since: every skipped or failed delivery of the endpoint created at or after that time goes back to scheduled (due now, attempt count kept) and the response gains meta.resent_deliveries with the number of rows re-scheduled. resend_since is rejected (422) unless status is enabled in the same request.
Path parameters
webhook_endpoint_idRequiredstringRequest body
urloptionalstringdescriptionoptionalstring | nullalert_emailoptionalstring | nullFormat: email.
statusoptionalstringPossible values: enabled, disabled.
resend_sinceoptionalstring | nullOnly together with status: enabled. UTC, same format as the delivery list filters (Y-m-d\TH:i:s). Re-schedules the endpoint's skipped and failed deliveries created at or after this time.
Format: date-time.
enabled_eventsoptionalstring[]add_eventsoptionalstring[]remove_eventsoptionalstring[]Returnsobject
Webhook endpoint updated. meta is present only when the request carried resend_since.
Error responses
404objectWebhook endpoint, delivery or event not found for this shop
422objectValidation failed
Soft delete. Scheduled and queued deliveries become skipped with reason endpoint_disabled. All its deliveries stay listed, filterable by its id and readable; a retry of one is a 409 endpoint_disabled.
Path parameters
webhook_endpoint_idRequiredstringReturnsWebhookEndpoint
The deleted webhook endpoint
Error responses
404objectWebhook endpoint, delivery or event not found for this shop
Returns the new secret once. The previous secret keeps verifying deliveries until previous_secret_expires_at; pass grace_period_seconds: 0 to drop it immediately.
Path parameters
webhook_endpoint_idRequiredstringRequest body (optional)
grace_period_secondsoptionalintegerDefaults to 86400.
ReturnsWebhookEndpointWithSecret
Webhook endpoint with the new secret
Error responses
404objectWebhook endpoint, delivery or event not found for this shop
422objectValidation failed
Records a webhook.ping event for this endpoint and sends it through the normal pipeline (render, fan-out, delivery). A ping is delivered only to the endpoint it was requested on, whatever its enabled_events say. Every newly created endpoint receives one automatically. No request body.
Path parameters
webhook_endpoint_idRequiredstringReturnsWebhookEndpoint
The endpoint the ping was requested on
Error responses
404objectWebhook endpoint, delivery or event not found for this shop
409objectThe endpoint is disabled, so the test event would never be delivered
Deliveries of the shop, newest first, across every endpoint, deleted endpoints included. Narrow them to one endpoint with endpoint_id or to one event with event_id.
Query parameters
endpoint_idoptionalstringThe endpoint's public id; a deleted endpoint's id is accepted.
event_idoptionalstringpageoptionalintegerper_pageoptionalintegerstatusoptionalstringPossible values: scheduled, queued, in_flight, succeeded, failed, skipped.
event_typeoptionalstringcreated_at[gte]optionalstringFormat: date-time.
created_at[lte]optionalstringFormat: date-time.
Returnsobject
Deliveries list response
Error responses
404objectWebhook endpoint, delivery or event not found for this shop
Path parameters
delivery_idRequiredstringReturnsWebhookDeliveryWithAttempts
Delivery response
Error responses
404objectWebhook endpoint, delivery or event not found for this shop
One more attempt of a succeeded, failed or skipped delivery of an enabled, not deleted endpoint. The row goes to queued (failure_reason cleared, attempt_count kept) and is handed to the delivery workers once the change is saved; the response shows the row as queued with its attempts so far. The attempt is a single manual try: a retryable failure of a delivery whose attempts are already spent finalises it as failed / exhausted again, a success is a success. A delivery that is still scheduled, queued or in_flight is a 409 delivery_already_scheduled; a disabled or deleted endpoint is a 409 endpoint_disabled. Rate limited to 60 requests per minute per shop. No request body.
Path parameters
delivery_idRequiredstringReturnsWebhookDeliveryWithAttempts
The delivery, queued for the manual attempt
Error responses
404objectWebhook endpoint, delivery or event not found for this shop
409objectThe delivery cannot be retried in its current state
429objectMore than 60 manual retries in one minute for this shop
Returns the stored envelope of each event, newest first. type and types[] are mutually exclusive. delivered=0 returns events with at least one delivery that has not succeeded; delivered=1 returns events whose deliveries all succeeded.
Query parameters
pageoptionalintegerper_pageoptionalintegertypeoptionalstringtypes[]optionalstring[]created_at[gte]optionalstringFormat: date-time.
created_at[lte]optionalstringFormat: date-time.
deliveredoptionalintegerPossible values: 1, 0.
Returnsobject
Event log response
Path parameters
event_idRequiredstringReturnsWebhookEventWithDeliveries
Event response
Error responses
404objectWebhook endpoint, delivery or event not found for this shop
Query parameters
subject_typeoptionalstringOnly event types whose payload describes this resource (order, invoice, subscription, subscription_item, ...).
typeoptionalstringAn exact event type or a prefix wildcard such as subscription.* (the enabled_events grammar).
searchoptionalstringCase-insensitive substring of the event name.
ReturnsWebhookEventType[]
Event types response (a plain array, not paginated)