Redeliver an event subscription delivery
const url = 'https://api.getsitecontrol.com/v1/sites/1/event-subscriptions/1/deliveries/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/redeliver';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.getsitecontrol.com/v1/sites/1/event-subscriptions/1/deliveries/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/redeliver \ --header 'Authorization: Bearer <token>'Sends the same request again as a new delivery and returns it, pending. Call it after fixing the receiver. URL and body are the ones stored with the delivery, not the event subscription’s current ones; secret headers take their current values. The new delivery has a new id (the webhook-id header), the same event id in the body, and is signed with the current secret; repeating the call returns the same new delivery.
Only a finished real delivery that reached the receiver can be redelivered, while the event subscription is active and its URL host is unchanged. Needs edit.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Event subscription id from list_event_subscriptions
Event subscription id from list_event_subscriptions
Delivery id from list_event_subscription_deliveries or test_event_subscription; the receiver got it as the webhook-id header
Delivery id from list_event_subscription_deliveries or test_event_subscription; the receiver got it as the webhook-id header
Header Parameters
Section titled “Header Parameters”Makes a retry of a POST safe: a repeat with the same key, body and GSC-Version returns the stored response with Idempotency-Replayed: true instead of running again. The key protects against repeated execution while the key store works. Saving the change and storing the response under the key are not atomic: if the process or the key store fails between them, the change is kept, the key is released after 15 minutes and a retry runs the request again. After a timeout or a 5xx, read the resource to check the result before retrying. 5xx and 429 responses and responses over 256 KB are not stored, so a repeat runs the request again. A key is kept for 24 hours. The same key with another body or version is 422; a repeat while the first request runs is 409.
Makes a retry of a POST safe: a repeat with the same key, body and GSC-Version returns the stored response with Idempotency-Replayed: true instead of running again. The key protects against repeated execution while the key store works. Saving the change and storing the response under the key are not atomic: if the process or the key store fails between them, the change is kept, the key is released after 15 minutes and a retry runs the request again. After a timeout or a 5xx, read the resource to check the result before retrying. 5xx and 429 responses and responses over 256 KB are not stored, so a repeat runs the request again. A key is kept for 24 hours. The same key with another body or version is 422; a repeat while the first request runs is 409.
Responses
Section titled “Responses”object
Delivery id, sent as the webhook-id header: the same on every retry, new on a redelivery
id of the event in the payload: the same for every event subscription and every redelivery of the event
Null once the event is purged
True for a delivery of test_event_subscription
Pending: waiting for an attempt or being sent; succeeded: accepted by the
receiver; failed: given up, see outcome; cancelled: dropped before sending
because the event subscription was deleted, switched off or saved since, or
its URL host changed.
How a finished delivery ended. accepted: the receiver answered 2xx, 302 or 303, which is not proof it processed the event; rejected: another 4xx, or 301, 307, 308 and other 3xx (the receiver moved, see the attempt’s location), not retried; gone: 410; retry_exhausted: every retry failed; expired: no time left for a retry; rate_limited: the receiver’s 429 pause ran past the deadline; invalid_request: the request could not be built, e.g. a template failed on the event (last_error says why); private_network_block: the host resolved to a private address; cancelled: see status. More values may appear
Requests sent so far
HTTP status of the last attempt’s answer; null without an answer
What went wrong last, e.g. HTTP 500 or render failed: ...
When the next attempt is due; null once finished
When it finished; null while pending
The delivery this one redelivers
{ "status": "pending"}Headers
Section titled “Headers”API version the response was produced for
Request id, echoed from the request when valid
Limit of the tightest bucket
Requests left in its window
End of its window, epoch seconds
True when the response is a stored one, replayed
The documented shape of every error body on the versioned surface.
object
object
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "reason": "example", "next": "example", "request_id": "example", "errors": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ], "metadata": {}}Headers
Section titled “Headers”API version the response was produced for
Request id, echoed from the request when valid
Limit of the tightest bucket
Requests left in its window
End of its window, epoch seconds
The documented shape of every error body on the versioned surface.
object
object
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "reason": "example", "next": "example", "request_id": "example", "errors": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ], "metadata": {}}Headers
Section titled “Headers”API version the response was produced for
Request id, echoed from the request when valid
Limit of the tightest bucket
Requests left in its window
End of its window, epoch seconds
Authentication scheme: Bearer
The documented shape of every error body on the versioned surface.
object
object
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "reason": "example", "next": "example", "request_id": "example", "errors": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ], "metadata": {}}Headers
Section titled “Headers”API version the response was produced for
Request id, echoed from the request when valid
Limit of the tightest bucket
Requests left in its window
End of its window, epoch seconds
event_subscription_not_found: no event subscription with this id on the site; delivery_not_found: no delivery with this id in the event subscription’s journal; site_not_found: no such site
The documented shape of every error body on the versioned surface.
object
object
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "reason": "example", "next": "example", "request_id": "example", "errors": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ], "metadata": {}}Headers
Section titled “Headers”API version the response was produced for
Request id, echoed from the request when valid
Limit of the tightest bucket
Requests left in its window
End of its window, epoch seconds
delivery_not_redeliverable: the delivery is still pending, is a test (run test_event_subscription again), never reached the receiver, the event subscription is inactive, or its URL host changed; the detail says which. idempotency_in_progress: a request with the same Idempotency-Key is still running
The documented shape of every error body on the versioned surface.
object
object
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "reason": "example", "next": "example", "request_id": "example", "errors": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ], "metadata": {}}Headers
Section titled “Headers”API version the response was produced for
Request id, echoed from the request when valid
Limit of the tightest bucket
Requests left in its window
End of its window, epoch seconds
The documented shape of every error body on the versioned surface.
object
object
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "reason": "example", "next": "example", "request_id": "example", "errors": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ], "metadata": {}}Headers
Section titled “Headers”API version the response was produced for
Request id, echoed from the request when valid
Limit of the tightest bucket
Requests left in its window
End of its window, epoch seconds
The documented shape of every error body on the versioned surface.
object
object
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "reason": "example", "next": "example", "request_id": "example", "errors": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ], "metadata": {}}Headers
Section titled “Headers”API version the response was produced for
Request id, echoed from the request when valid
Limit of the tightest bucket
Requests left in its window
End of its window, epoch seconds
The documented shape of every error body on the versioned surface.
object
object
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "reason": "example", "next": "example", "request_id": "example", "errors": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ], "metadata": {}}Headers
Section titled “Headers”API version the response was produced for
Request id, echoed from the request when valid
Limit of the tightest bucket
Requests left in its window
End of its window, epoch seconds
Seconds until the bucket refills
The documented shape of every error body on the versioned surface.
object
object
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "reason": "example", "next": "example", "request_id": "example", "errors": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ], "metadata": {}}Headers
Section titled “Headers”API version the response was produced for
Request id, echoed from the request when valid
Limit of the tightest bucket
Requests left in its window
End of its window, epoch seconds