anyshop docs homeStatusOpen the dashboard

API reference Webhooks and events Add a webhook endpoint

API referenceWebhooks and events

Add a webhook endpoint

POST methodhttps://api.anyshop.io/v1/webhook_endpoints

The answer carries its signing secret once. Endpoints must be public https addresses.

  • Scope webhooks:write
  • Idempotent with Idempotency-Key
  • Works while the store is suspended

Body

application/json2 required, 2 optional
  • urlstring requiredA public https address. anyshop never follows redirects or calls private networksUp to 2,048 characters
  • descriptionstring For you, up to 200 charactersUp to 200 characters
  • events"all" or array of enums required"all" (now and later), or a list of event typesallorder.paidorder.fulfilledorder.refundeddispute.createdstock.lowlicense.activated
  • signingenum How deliveries are signed: hmac (a shared secret, the default) or ed25519hmaced25519

Headers

  • Idempotency-Keystring Up to 255 characters. A retry with the same key and request gets the first answer, without running twice (24 hours).

Returns

The webhook_endpoint object.

Errors

Status and error.type
  • 400invalid_requestThe request is not valid; error.param names the field
  • 401authenticationNo API key, or it is not valid
  • 403permissionThe key does not have the scope this needs, it is a test key where only a live key may act (the catalog), or the store is suspended (store_suspended)
  • 404not_foundNot found in the key's store and mode
  • 409conflictConflicts with the object's state (type conflict), or an Idempotency-Key reused for another request (type idempotency, code idempotency_key_reused)
  • 429rate_limitedToo many requests; see Retry-After