Re-enable a webhook endpoint
/ webhook-endpoints/ {endpoint_id}/ enableRe-enable an endpoint Stridge disabled after three days in which no delivery to it answered 2xx, and replay what it missed, in one action.
The replay.
Every event the endpoint selects in
enabled_eventsand did not receive with a2xxsince itsfailing_since, failed and never sent alike, up to 30 days back, is resent to it once, oldest first, each in the bytes it was first sent with and signed fresh, through the per-event resend: each is shown in the dashboard.{"replay_missed": false}re-enables it without the replay. An event whose automatic retries were still running is resent once by the replay, and no automatic attempt is made beside it. An endpoint that is not disabled, a failing one whose retries still run among them, is answered as it is: nothing is replayed and itsfailing_sinceanddisable_atare kept.It answers
200with the endpoint,status: enabledand its failing state cleared, so it is failing again only from its next failed delivery. The replay is queued before the failing state ends: a re-enable that fails partway answers its error and leaves the endpoint disabled, and sending it again with a newIdempotency-Keyresends the rest, never an event whose resend is already queued.
Show 3 more detailsShow fewer details
An endpoint a person turned off
(
is_active: false,disabled_reason: user) is turned on withPATCH /webhook-endpoints/{endpoint_id}{"is_active": true}, not here: this answers409webhook_endpoint_turned_off.Who may.
In live it is an owner's alone: a developer or a viewer answers
403permission_denied. In a sandbox an owner and a developer may, and a viewer answers403permission_denied. A secret key of the environment may too when it holdswebhook.deliver; one without it answers403permission_denied.Retrying.
Send an
Idempotency-Key: a retry with the same key within 24 hours answers the first answer again, a failure included, and replays nothing more, so it recovers a lost answer; after a failure, send a new key to try again. The same key with another body answers400idempotency_key_reused.Errors
The closed set of codes:
environment_required(400),parameter_unknown(400, a query parameter or a body member the call does not take),body_invalid(400, a body that is not a JSON object),header_invalid(400, anIdempotency-Keylonger than 255 characters, or anX-Stridge-Environmentsent beside a secret key),idempotency_key_reused(400),authentication_required,token_invalidandapi_key_not_accepted(401),permission_denied(403, a key withoutwebhook.deliveramong them),membership_suspended(403),environment_not_found(404),resource_missing(404, an endpoint the environment does not hold),webhook_endpoint_turned_off(409),environment_provisioning(409, a sandbox not ready yet),environment_resetting(409),idempotency_key_in_use(409),body_too_large(413),media_type_unsupported(415) andparameter_invalid(422, areplay_missedthat is not a boolean).
Parameters
Path
- endpoint_idstringrequired
The endpoint to re-enable.
Headers
- X-Stridge-Environmentstring <uuid>optional
Which environment the request acts inside, on an operation a session and an API key both call. Learn more
Show full descriptionShow less
It is required under a person's session, exactly as
EnvironmentHeaderdescribes: a session request that omits it answers400withenvironment required, and one naming an environment the caller holds no membership of answers404.An API key names its own environment, so a request made with one omits this header. A key request that sends it answers
400withenvironment header not accepted, whatever it names, rather than having the header ignored: a header that is silently ignored hides the integration bug that sent it. - Idempotency-Keystringoptional
A caller-chosen key making this request safe to retry. Sent, the server remembers what the first request with it produced; omitted, every request is a new one. Learn more
Show full descriptionShow less
The same key with the same parameters returns the first result, status and body both, and does nothing a second time. So a retry after a dropped connection is safe whether or not the first attempt landed. The parameters are compared as parsed, not as bytes: the query with its names sorted and the JSON body decoded, so member order, spacing and escaping never make two requests differ, while any changed value does.
What is remembered is the answer of an attempt that began execution, success or failure, a
500included. A refusal made before execution is not remembered, so a retry with the same key runs afresh once its cause is fixed: a validation error (400,422), a409conflict, a429, a403step_up_required, and any answer carryingRetry-After. An answer whose body is larger than 64 KiB is not remembered either, and an operation may say that its500is not; a retry of either runs the request again. What the first attempt did stands, so a create that took a unique value answers that value's conflict on the retry: a payout whose first attempt took itsreference_idanswers409payout_reference_taken.The same key with different parameters answers
400withidempotency key replayed with a different body: a key names one request, and reusing it for another is a client bug rather than a retry. A replay while the first request is still in flight answers409at once witha request with this idempotency key is still in flight, and the remedy is to retry once the first has answered.Keys are scoped to the environment the request acts inside, and to its reset: one environment's key never answers another environment's request, and a key used before a sandbox reset runs afresh after it.
An operation that acts on a workspace or on the account rather than inside an environment, such as creating a workspace or requesting go-live in the dashboard, scopes its keys to the caller and to its path, so the same key sent for another workspace is a separate request and never a replay.
Request body
- replay_missedbooleandefault true
Whether to resend every event the endpoint selects and did not receive with a
2xxsince itsfailing_since, up to 30 days back, each once, oldest first.falsere-enables it without the replay.
Responses
The endpoint is enabled, and what it missed is queued to it.
- idstringrequired
The endpoint's own identifier.
- objectstringrequired
The object's type, always
webhook_endpoint. - environment_idstring <uuid>required
The environment whose events this endpoint receives. An endpoint receives the events of one environment and no other, so a sandbox endpoint never receives a live environment's events.
- livemodebooleanrequired
truewhenenvironment_idnames aliveenvironment andfalsein a sandbox. It is carried on the object itself, so a payload read on its own, a logged response or a webhook body, still says which side of the boundary it came from. - urlstring <uri>required
Where deliveries are sent.
Show full descriptionShow less
An endpoint registered through this API holds an absolute
httpsURL on port 443 with a public destination (the rules are onPOST /webhook-endpoints); one registered before it may hold a URL those rules refuse, which keeps receiving until it is changed. It is unique inside the environment: two endpoints on one URL would double every delivery to it. - namestringrequired
What this endpoint is called, for the people reading the list rather than for Stridge.
Show 9 more fieldsShow fewer fields
- enabled_eventsarray<string>required
Which events to send here: webhook event types this reference documents, or
["*"], every one of those types butwebhook_endpoint.ping, types added later included.Show full descriptionShow less
Which events reach the endpoint is the delivery policy's
enabled_eventsrule: an endpoint created through/v2is sent only the events/v2shows. An endpoint names at least one type: subscribing to nothing is an endpoint that never receives anything, which is a mistake no client means to make and none can express here. Alegacyendpoint registered with no list reads[]: it receives nothing. - event_payloadstringrequiredenum thin · legacy
The body this endpoint receives, fixed for its whole life.
thin, every endpoint created through this API: theThinEventof every type, which names the object and carries no copy of it.legacy, every other endpoint: the full legacy body of each type, unchanged.Show full descriptionShow less
It never changes: an update naming it is refused. To move to thin events, create a new endpoint, run it beside the old one (both receive each event under the same
webhook-id, so a receiver deduplicating on it acts once), then delete the old one. - is_activebooleanrequired
Whether a person has the endpoint on. An inactive endpoint is skipped rather than queued, so events that occur while it is off are not delivered when it comes back on. An endpoint Stridge disabled for failing stays
is_active: true; itsstatussays it is disabled. - statusstringrequiredenum enabled · disabled
Whether events are sent to the endpoint.
disablednames why indisabled_reason: a person turned it off (is_active: false), or Stridge disabled it after three days in which no delivery to it answered2xx, which onlyPOST /webhook-endpoints/{endpoint_id}/enableundoes.Show full descriptionShow less
A disabled endpoint's pending retries stop and new events are not sent to it.
- disabled_reasonstring | nullrequiredenum failing · user · null
Why a
disabledendpoint is disabled:failing, three days with no2xx, oruser, a person turned it off.nullwhile it isenabled. - failing_sincestring | null <date-time>required
When the endpoint's first failed delivery happened since a delivery to it last answered
2xx, ornullwhile it is not failing.Show full descriptionShow less
While the endpoint is enabled, any
2xxends it; a disabled endpoint keeps it, whatever a ping or a resend to it answers, untilPOST /webhook-endpoints/{endpoint_id}/enable, so the re-enable replays every event it missed. After two days failing the workspace's owners get one notice for the endpoint, in the dashboard; after three it is disabled. RFC3339 UTC,Zsuffixed. - disable_atstring | null <date-time>required
When a failing endpoint is disabled unless a delivery to it answers
2xxfirst:failing_sinceplus three days.nullwhile it is not failing. - created_atstring <date-time>required
When the endpoint was registered. RFC3339 UTC,
Zsuffixed. It is the default sort, newest first. - updated_atstring <date-time>required
When the endpoint was last changed.
Errors
The error.code values this operation can return. Each one links to its entry in the error catalogue, which explains the cause and the fix.
- 400body_invalidInvalid request body
- 400environment_requiredEnvironment required
- 400header_invalidInvalid header
- 400idempotency_key_reusedIdempotency key reused
- 400422parameter_invalidInvalid parameter
- 400parameter_unknownUnknown parameter
- 401api_key_not_acceptedAPI key not accepted
- 401authentication_requiredAuthentication required
- 401publishable_key_not_acceptedPublishable key not accepted
- 401token_invalidInvalid or expired token
- 403membership_suspendedMembership suspended
- 403permission_deniedPermission denied
- 404environment_not_foundEnvironment not found
- 404resource_missingNo such object
- 409environment_provisioningEnvironment provisioning
- 409environment_resettingEnvironment resetting
- 409idempotency_key_in_useIdempotency key in use
- 409webhook_endpoint_turned_offWebhook endpoint turned off
- 413body_too_largeRequest body too large
- 415media_type_unsupportedUnsupported media type
- 429rate_limitedToo many requests