Tillwire Read the guide
API reference

Webhooks. 9 operations.

9 of them work. Each needs a bearer token with its scope. All operations.

Operations

POST/api/v1/webhooks/endpoints/{id}/deletewebhooks.delete-endpointwebhooks.write

Parameters

idpathstring
idpathstring
Idempotency-KeyheaderstringSee common parameters

Answer

Deletion

Errors: 401, 403, 404, 405, 409, 422, 429

curl -X POST -H "Authorization: Bearer $TOKEN" https://yourshop.example/api/v1/webhooks/endpoints/{id}/delete

GET/api/v1/webhooks/deliveries/{id}webhooks.get-deliverywebhooks.read

Parameters

idpathstring
idpathstring

Errors: 401, 403, 404, 405, 422, 429

curl -X GET -H "Authorization: Bearer $TOKEN" https://yourshop.example/api/v1/webhooks/deliveries/{id}

GET/api/v1/webhooks/deliverieswebhooks.list-deliverieswebhooks.read

Parameters

endpointqueryintegerOnly the deliveries of this endpoint.
statusquerystringOnly deliveries in this status: pending, delivered, failed or skipped.
typequerystringOnly deliveries of this type of event.
fromquerystringOnly deliveries made at or after this time, in RFC 3339.
afterquerystringThe cursor of the page: the next of the page before; the newest delivery when left out.
limitqueryintegerThe most deliveries in the page: 1 to 500; 100 when left out.

Errors: 401, 403, 405, 422, 429

curl -X GET -H "Authorization: Bearer $TOKEN" https://yourshop.example/api/v1/webhooks/deliveries

GET/api/v1/webhooks/endpointswebhooks.list-endpointswebhooks.read

Answer

array of WebhookEndpoint

Errors: 401, 403, 405, 422, 429

curl -X GET -H "Authorization: Bearer $TOKEN" https://yourshop.example/api/v1/webhooks/endpoints

POST/api/v1/webhooks/replaywebhooks.replaywebhooks.write

Parameters

Idempotency-KeyheaderstringSee common parameters

Errors: 401, 403, 405, 409, 413, 422, 429

curl -X POST -H "Authorization: Bearer $TOKEN" https://yourshop.example/api/v1/webhooks/replay

POST/api/v1/webhooks/endpoints/{id}/rotate-secretwebhooks.rotate-secretwebhooks.write

Parameters

idpathstring
idpathstring
Idempotency-KeyheaderstringSee common parameters

Errors: 401, 403, 404, 405, 409, 422, 429

curl -X POST -H "Authorization: Bearer $TOKEN" https://yourshop.example/api/v1/webhooks/endpoints/{id}/rotate-secret

POST/api/v1/webhooks/endpointswebhooks.save-endpointwebhooks.write

Parameters

Idempotency-KeyheaderstringSee common parameters

Errors: 401, 403, 405, 409, 413, 422, 429

curl -X POST -H "Authorization: Bearer $TOKEN" https://yourshop.example/api/v1/webhooks/endpoints

POST/api/v1/webhooks/endpoints/{id}/testwebhooks.send-testwebhooks.write

Parameters

idpathstring
idpathstring
Idempotency-KeyheaderstringSee common parameters

Errors: 401, 403, 404, 405, 409, 422, 429

curl -X POST -H "Authorization: Bearer $TOKEN" https://yourshop.example/api/v1/webhooks/endpoints/{id}/test

POST/api/v1/webhooks/endpoints/{id}/enabledwebhooks.set-enabledwebhooks.write

Parameters

idpathstring
idpathstring
Idempotency-KeyheaderstringSee common parameters

Errors: 401, 403, 404, 405, 409, 413, 422, 429

curl -X POST -H "Authorization: Bearer $TOKEN" https://yourshop.example/api/v1/webhooks/endpoints/{id}/enabled

Schemas 13

Deletion

Deletion is what a delete deleted: the slug of the category, the collection or the content page that is gone, or the name of the image.

deletedrequiredstring
WebhookAttempt

WebhookAttempt is one try of a delivery: when, the status the receiver gave (0 for none), the first 1 KiB of its answer, how long it took in milliseconds, and the error of a try that got no answer.

answerstring
atrequiredstring (date-time)
duration_msrequiredinteger
errorstring
nrequiredinteger
statusrequiredinteger
WebhookDeliveriesPage

WebhookDeliveriesPage is a page of the log and where the next one starts.

deliveriesrequiredarray of WebhookDelivery
morerequiredboolean
nextrequiredstring
WebhookDelivery

WebhookDelivery is one event for one endpoint, and where it stands.

attemptsrequiredinteger
created_atrequiredstring (date-time)
done_atstring (date-time)
endpointrequiredinteger
eventrequiredinteger
idrequiredinteger
last_errorstring
last_statusrequiredinteger
next_atstring (date-time)
objectrequiredstring
replay_ofinteger
statusrequiredstring
typerequiredstring
WebhookDeliveryDetail

WebhookDeliveryDetail is a delivery with the exact payload sent, as text, and its tries in order.

attemptsrequiredinteger
created_atrequiredstring (date-time)
done_atstring (date-time)
endpointrequiredinteger
eventrequiredinteger
idrequiredinteger
last_errorstring
last_statusrequiredinteger
next_atstring (date-time)
objectrequiredstring
payloadrequiredstring
replay_ofinteger
statusrequiredstring
triesrequiredarray of WebhookAttempt
typerequiredstring
WebhookEnabledRequest

WebhookEnabledRequest turns an endpoint on (its trouble cleared, and the events from now on sent) or off.

enabledrequiredboolean
WebhookEndpoint

WebhookEndpoint is an address the store tells of its events, as the operations show it. It never holds the secret: that is given once, by the save that makes the endpoint and by a rotation.

consecutive_failuresrequiredinteger
cooling_untilstring (date-time)
created_atrequiredstring (date-time)
created_byrequiredstring
descriptionstring
disabled_atstring (date-time)
disabled_reasonstring
enabledrequiredboolean
idrequiredinteger
previous_secret_untilstring (date-time)
typesrequiredarray of string
urlrequiredstring
WebhookEndpointRequest

WebhookEndpointRequest makes an endpoint (ID 0) or changes one (ID its id): its address (https; a store in the test environment also takes http to localhost), its description (at most 100 characters) and the types it chooses, at least one, each of EventTypes or "*". A type whose scope the caller does not hold is refused (403 at the door).

descriptionstring
idinteger
typesrequiredarray of string
urlrequiredstring
WebhookEndpointSaved

WebhookEndpointSaved is the answer of a save: the endpoint, and, for the save that made it, its secret, `whsec_` and 43 characters, which is given this once.

endpointrequiredWebhookEndpoint
secretstring
WebhookReplayRequest

WebhookReplayRequest asks for the replay of one delivery (Delivery), or of every delivery of an endpoint that failed or was skipped since a time (Endpoint and Since; at most 1000 a call). Exactly one of the two is given.

deliveryinteger
endpointinteger
sincestring (date-time)
WebhookReplayed

WebhookReplayed are the new deliveries a replay made.

deliveriesrequiredarray of integer
truncatedrequiredboolean
WebhookSecret

WebhookSecret is the new secret of a rotation, given this once, and until when the one before it still signs beside it.

previous_valid_untilrequiredstring (date-time)
secretrequiredstring
WebhookTestResult

WebhookTestResult is what the endpoint answered to the test ping: its status (0 for none), the first 1 KiB of its answer, how long it took in milliseconds, and the error of a call that got no answer. OK is true for a 2xx.

answerstring
duration_msrequiredinteger
errorstring
okrequiredboolean
statusrequiredinteger

Made from engine/internal/openapi/openapi.json at commit 6c4cbd921. The contract-only operations come from the engine’s stub file, engine/internal/ops.