younifyd
Menu

Create a webhook subscription

Create a webhook subscription

POST/webhooks/producers/{producerIdentifier}/subscriptions

Use it in a workflow

  1. Add a step and choose the SCAYLE Admin connector.
  2. Pick the Create a webhook subscription action (under Webhooks).
  3. Fill in the fields below, then reference the result from later steps as {{createAWebhookSubscription.response.data}}.

Request

Path parameters

producerIdentifierstringrequired

Producer name (identifier).

Request body

Enter the body as JSON in the step's Body field.

idinteger

Subscription ID.

externalIdstring

Identifier in an external system; must be unique per producer when set.

eventNamestringrequired

Event name this subscription listens to.

urlstring (uri)required

Delivery URL including scheme (HTTP or HTTPS).

targetobject

Subscription scope context (for example company or shop country identifiers) used for routing and filtering.

enabledboolean

When false, webhooks are not delivered until re-enabled.

Default true

disabledReasonstring

Set when the subscription was automatically disabled (for example due to excessive delivery failures). The only sentinel value exposed today is `max_suspensions`.

One ofmax_suspensions

authany
customHeadersobject

Extra HTTP headers attached to webhook requests.

rpminteger

Maximum delivery requests per minute for this subscription.

suspendedUntilstring (date-time)

When set, deliveries are deferred until after this timestamp.

emailstring (email)

Notification email (for example when a subscription becomes suspended).

isInternalboolean

When true, the subscription is used for a managed integration path. When false, notifications are sent to the HTTPS URL you configure in `url`.

json
{
  "eventName": "customer-created",
  "url": "https://consumer.example.com/hooks",
  "id": 1,
  "externalId": "ext-sub-1",
  "target": {
    "companyId": 1,
    "shopCountryId": 2
  },
  "enabled": true,
  "disabledReason": "max_suspensions",
  "auth": null,
  "customHeaders": {
    "X-Integration-Id": "acme-webhooks"
  },
  "rpm": 60,
  "suspendedUntil": "2024-09-30T09:31:43.235Z",
  "email": "alerts@biz.example"
}

Response

Returns 201 with an object. Read it in later steps with {{createAWebhookSubscription.response.data.<field>}}.

idinteger

Subscription ID.

externalIdstring

Identifier in an external system; must be unique per producer when set.

eventNamestring

Event name this subscription listens to.

urlstring (uri)

Delivery URL including scheme (HTTP or HTTPS).

targetobject

Subscription scope context (for example company or shop country identifiers) used for routing and filtering.

enabledboolean

When false, webhooks are not delivered until re-enabled.

Default true

disabledReasonstring

Set when the subscription was automatically disabled (for example due to excessive delivery failures). The only sentinel value exposed today is `max_suspensions`.

One ofmax_suspensions

authany
customHeadersobject

Extra HTTP headers attached to webhook requests.

rpminteger

Maximum delivery requests per minute for this subscription.

suspendedUntilstring (date-time)

When set, deliveries are deferred until after this timestamp.

emailstring (email)

Notification email (for example when a subscription becomes suspended).

isInternalboolean

When true, the subscription is used for a managed integration path. When false, notifications are sent to the HTTPS URL you configure in `url`.

json
{
  "eventName": "customer-created",
  "url": "https://consumer.example.com/hooks",
  "id": 1,
  "externalId": "ext-sub-1",
  "target": {
    "companyId": 1,
    "shopCountryId": 2
  },
  "enabled": true,
  "disabledReason": "max_suspensions",
  "auth": null,
  "customHeaders": {
    "X-Integration-Id": "acme-webhooks"
  },
  "rpm": 60,
  "suspendedUntil": "2024-09-30T09:31:43.235Z",
  "email": "alerts@biz.example"
}

Need more? See the SCAYLE Admin guide for connection setup and behaviour shared by every action.