Ping a webhook endpoint
/ webhook-endpoints/ {endpoint_id}/ pingSend one endpoint a webhook_endpoint.ping: an event carrying no data, delivered to that endpoint and to no other, as a genuine signed request.
It exists so an endpoint can be proved end to end before anything real depends on it. The request is signed with the endpoint's own secret and is recorded like any other attempt, which the dashboard shows, so a receiver that verifies the ping verifies everything that follows. What it proves is the wire, not the payloads: to see a real event arrive, simulate a deposit in a sandbox and receive what that produces.
It goes to the endpoint whatever its
enabled_eventssay, because nobody subscribes to a ping; it is delivered because it was sent. It is delivered to an endpoint that is turned off as well, since proving an endpoint before switching it on is exactly when a ping is wanted. It works in a live environment and in a sandbox alike: it moves no money and names nothing but the endpoint.The answer is the event, with
event_payloadnullandrelated_object{ "object": "webhook_endpoint", "id": <endpoint_id> }. It is answered as soon as it is RECORDED, so itsstatusispendingand itsprocessed_atisnullin this answer whatever becomes of the delivery; a caller that wants to know what happened reads the event back, or reads its deliveries.It is a separate act from the dashboard's test event, which the delivery policy's
mock_eventsdescribes: that one sends a placeholder body of a chosen type to every legacy endpoint subscribed to it, while a ping proves the wire to one endpoint, names no event type and carries no payload a receiver could take for a real event.Errors
The closed set of codes:
environment_required(400),parameter_unknown(400, a query parameter the ping does not take),header_invalid(400, anIdempotency-Keylonger than 255 characters, or anX-Stridge-Environmentsent beside a secret key),authentication_required,token_invalidandapi_key_not_accepted(401),permission_denied(403, a developer or a viewer in live, a viewer in a sandbox, a secret key withoutwebhook.deliver),membership_suspended(403),environment_not_found(404, an environment the caller cannot reach, or one that never existed),resource_missing(404, an endpoint this environment does not hold, or one that never existed),environment_provisioning(409, a sandbox not ready yet),environment_resetting(409, a sandbox whose reset is still running; the ping records nothing),idempotency_key_reused(400) andrate_limited(429). The ping takes no body, so the request a key names is the endpoint it was sent to: the same key sent to the same endpoint answers the first ping rather than sending another, and the same key sent to another endpoint is refused. A replay is answered even after the endpoint has been deleted.
Parameters
Path
- endpoint_idstringrequired
The endpoint to ping.
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.
Responses
The ping was recorded and dispatched to the endpoint.
- idstringrequired
The event's identifier: its
idempotency_key, under the name every object carries its own. - objectstringrequired
The object's type, always
webhook_event. - idempotency_keystringrequired
The event's own identifier, and the value a receiver deduplicates on. Every path addressing a single event addresses it by this.
- environment_idstring <uuid>required
The environment the event happened in. It is carried on the object rather than implied by the request, so an event detached from the request it arrived on still says which world it belongs to.
- 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. - event_idstringrequired
The identifier carried inside the delivered envelope, for a receiver correlating what it stored against what it was sent. It is not an address on this contract.
Show 8 more fieldsShow fewer fields
- event_typestringrequired
What happened, one of the webhook event types this reference documents, a closed set. An endpoint receives an event only when its
enabled_eventsnames this one; every endpoint names at least one type, so none receives everything by naming nothing.Show full descriptionShow less
The one exception is
webhook_endpoint.ping, which no endpoint subscribes to: it is delivered to the one endpoint it was sent to, whatever that endpoint'senabled_eventssay. - event_versionstringrequired
The schema version of
event_payload, so a receiver can tell a payload it understands from one it does not. - event_timestring <date-time>required
When the thing the event describes happened, which is not when the event was recorded.
- event_payloadanyrequired
What happened, in the shape
event_versionnames. It is an opaque passthrough on this contract: Stridge delivers it and the receiver interprets it.Show full descriptionShow less
It is
nullon awebhook_endpoint.ping, which carries no data: the delivery arriving is the whole of what it says. The Stridge object the event is about, or
nullfor an event about no one object. Awebhook_endpoint.pingnames the endpoint it was sent to.- objectstringrequired
The kind of object, in snake_case and singular:
deposit,payout,webhook_endpoint. The value set is open: a family that starts emitting events adds its name here, and a client renders an unfamiliar one as the string itself. - idstringrequired
The object's identifier, as its own family addresses it.
- objectstringrequired
- statusstringrequiredenum pending · processing · completed · failed
How far Stridge got in telling you.
pendingis recorded but not yet attempted,processingis in flight,completedmeans every matching endpoint accepted it, andfailedmeans at least one did not.Show full descriptionShow less
An event no active endpoint subscribes to is
completed, with itsprocessed_at, as soon as delivery finds no one to send it to: no endpoint was owed it, so nothing is outstanding, andpendingis kept for events Stridge still has to attempt. - processed_atstring | null <date-time>required
When Stridge stopped working on the event, or
nullwhile it has not. Only acompletedorfailedevent carries one. - created_atstring <date-time>required
When Stridge recorded the event. RFC3339 UTC,
Zsuffixed. It is the default sort, newest first.
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.
- 400environment_requiredEnvironment required
- 400header_invalidInvalid header
- 400idempotency_key_reusedIdempotency key reused
- 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
- 429rate_limitedToo many requests