API reference · Events and webhooks
Webhooks
Get a signed message the moment something changes. Manage the address, the secret and the delivery log.
/webhookWebhook status
The address we send events to, whether it is paused, and delivery counts. The signing secret is never readable.
Response 200
In data:
urlstring · nullablehasSecretbooleanpausedAtdate-time · nullableISO 8601 date-time.
failuresintegerDeliveries in a row that gave up.
countsobjectShow 4 fields
deliveredintegerfailedintegerqueuedintegerheldinteger
Errors
401unauthorized: the API key is missing, wrong or revoked.403forbidden: this key may not do that (wrong plan, not a business, or the account is not approved).
curl "https://engine-production-0004.up.railway.app/api/v1/webhook" \
-H "Authorization: Bearer wc_test_YOUR_KEY"/webhookSet the webhook address
Public https addresses only (private networks are refused, now and at every delivery). The first time, the response carries the signing secret (whsec_…): copy it, it is shown once.
Request body · application/json
urlstringrequired
Response 200
In data:
urlstringsecretstringOnly the first time.
notestring
Errors
400invalid: something in the request is wrong. The message says what.401unauthorized: the API key is missing, wrong or revoked.403forbidden: this key may not do that (wrong plan, not a business, or the account is not approved).
curl -X PUT "https://engine-production-0004.up.railway.app/api/v1/webhook" \
-H "Authorization: Bearer wc_test_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://alpha.example/hooks/waca"
}'{
"data": {
"url": "https://alpha.example/hooks/waca",
"secret": "whsec_MfKQ9r8GsBn…",
"note": "Copy this signing secret now. It will not be shown again."
}
}/webhookTurn webhooks off
Events are still recorded; read them with GET /events.
Response 200
The response body
okboolean
Errors
401unauthorized: the API key is missing, wrong or revoked.403forbidden: this key may not do that (wrong plan, not a business, or the account is not approved).
curl -X DELETE "https://engine-production-0004.up.railway.app/api/v1/webhook" \
-H "Authorization: Bearer wc_test_YOUR_KEY"/webhook/testSend a test event
Sends a webhook.test event now and tells you how your server answered.
Response 200
In data:
statusstringhttpStatusinteger · nullableerrorstring · nullableattemptsinteger
Errors
401unauthorized: the API key is missing, wrong or revoked.403forbidden: this key may not do that (wrong plan, not a business, or the account is not approved).409conflict or unavailable: not possible in the current state, or the car was just taken.
curl -X POST "https://engine-production-0004.up.railway.app/api/v1/webhook/test" \
-H "Authorization: Bearer wc_test_YOUR_KEY"/webhook/rotateRotate the signing secret
A new secret, shown once. The old one stops working immediately.
Response 201
In data:
secretstringnotestring
Errors
401unauthorized: the API key is missing, wrong or revoked.403forbidden: this key may not do that (wrong plan, not a business, or the account is not approved).409conflict or unavailable: not possible in the current state, or the car was just taken.
curl -X POST "https://engine-production-0004.up.railway.app/api/v1/webhook/rotate" \
-H "Authorization: Bearer wc_test_YOUR_KEY"/webhook/resumeResume a paused webhook
After three deliveries in a row give up, the webhook is paused (and you are emailed). Events are held, not lost. Fix your server, then resume: everything held is sent.
Response 200
In data:
releasedintegerHow many held events were queued.
Errors
401unauthorized: the API key is missing, wrong or revoked.403forbidden: this key may not do that (wrong plan, not a business, or the account is not approved).
curl -X POST "https://engine-production-0004.up.railway.app/api/v1/webhook/resume" \
-H "Authorization: Bearer wc_test_YOUR_KEY"/webhook/deliveriesDelivery log
Each attempt to reach your server: what we sent, how it answered and whether we will retry.
Query parameters
statusstringqueued, delivered, failed or held.
queueddeliveredfailedheldeventstringOnly this event type.
pageintegerPage number, from 1.
Example:
1limitintegerItems per page (1–100). Default 20.
Example:
20
Response 200
A page: { data: [ … ], page, totalPages, total }. Each item in data:
idintegereventIdstringeventstringreferencestring · nullablelivemodebooleanstatusenumqueueddeliveredfailedheldattemptsintegerlastStatusCodeinteger · nullablelastErrorstring · nullablenextAttemptAtdate-time · nullableISO 8601 date-time.
deliveredAtdate-time · nullableISO 8601 date-time.
createdAtdate-timeISO 8601 date-time.
Errors
401unauthorized: the API key is missing, wrong or revoked.403forbidden: this key may not do that (wrong plan, not a business, or the account is not approved).
curl "https://engine-production-0004.up.railway.app/api/v1/webhook/deliveries?page=1&limit=20" \
-H "Authorization: Bearer wc_test_YOUR_KEY"/webhook/deliveries/{id}/retryRetry a delivery
Sends it again with the same body and event id.
Path parameters
idintegerrequiredThe delivery id.
Example:
118
Response 200
In data:
statusstringhttpStatusinteger · nullableerrorstring · nullable
Errors
401unauthorized: the API key is missing, wrong or revoked.403forbidden: this key may not do that (wrong plan, not a business, or the account is not approved).404not_found: no such thing, or it is not yours.409conflict or unavailable: not possible in the current state, or the car was just taken.
curl -X POST "https://engine-production-0004.up.railway.app/api/v1/webhook/deliveries/118/retry" \
-H "Authorization: Bearer wc_test_YOUR_KEY"