Developers

Webhook subscriptions

Markdown

Create a subscription

Subscribes to topics at an endpoint registered in the version, and returns the signing secret once.

POST/stores/{storeId}/v1/webhook-subscriptions
No scope required

One subscription per installation. Each topic requires its scope. See Webhooks for details.

Request body

endpoint_urlstring (uri)required
event_typesarray<string>required
payload_versionobjectrequired

Response

dataobjectrequired
idstring (uuid)
endpoint_urlstring (uri)
event_typesarray<string>
payload_versionobject
stateobject
active paused revoked
secret_generationinteger
issued_scopesarray<string>
executionobject
Who executed the request: the app, version, installation and store. Field names here are camelCase.
appIdstring (uuid)
versionIdstring (uuid)
installationIdstring (uuid)
storeIdstring (uuid)
requestIdstring (uuid)
generationinteger
routeEpochinteger
appAuthEpochinteger
grantRevisioninteger
metaobjectrequired
request_idstring (uuid)
The request ID; include it in any support request.
secretstring
Signing secret: 32 bytes, base64url-encoded. Returned once.

Errors

HTTPCodeMeaning
409SUBSCRIPTION_EXISTSThe installation already has a subscription.
403ENDPOINT_NOT_APPROVEDThe URL is not registered in the version.
422ENDPOINT_UNSAFEThe URL is not a public https URL.
403SCOPE_REQUIREDA topic without its scope.

Shared codes are listed in Errors.

    ↑↓ moveEnter openEsc close