Skip to main content
POST
Create a webhook

Authorizations

X-API-Key
string
header
required

User API key authentication. Create a key under Settings → API keys in the Slash dashboard (https://app.slash.com/global-settings/api-keys) and send the x-legal-entity header naming the legal entity to act on with every request. Keys scoped to a legal entity are rejected with 403 user_api_key_required.

Headers

X-Idempotency-Key
string
required

Unique caller-generated key for one create request. Once an authenticated, schema-valid request reaches the operation, the key is permanently consumed for that operation and legal entity whether the operation succeeds or fails. Reusing it in that scope returns 409 and never replays a response, unlike API v1, which replays the original response for a matching key.

Required string length: 1 - 255

The legal entity to act on. Required on every request except GET /v2/legal-entities, which lists the ids a user API key can send here: those of every legal entity its user has access to.

Pattern: ^le_[a-zA-Z0-9]+$

Body

application/json
url
string
required

The URL Slash sends events to. It must use https on the default port and a domain name, not an IP address or a local hostname, and must not contain credentials.

Maximum string length: 2048
Example:

"https://example.com/webhooks/slash"

name
string
required
Required string length: 1 - 255
Example:

"Production"

enabledEvents
string[]

The event types the webhook receives. Omit it to receive every event.

Minimum array length: 1
Example:

Response

The webhook.

id
string
required

Webhook id with the public_webhook_endpoint_ prefix.

Example:

"public_webhook_endpoint_2rj4l7hmrrrcv"

name
string
required
Example:

"Production"

url
string
required

The URL Slash sends events to.

Example:

"https://example.com/webhooks/slash"

status
enum<string>
required

active webhooks receive events. A paused webhook holds new events and sends them once it is unpaused. Slash sets backing_off after failed deliveries and retries at backingOffUntil, and disabled after repeated failures; unpausing either makes it active and sends the events it held. archived webhooks get no new events.

Available options:
active,
paused,
backing_off,
disabled,
archived
createdAt
string<date-time>
required
enabledEvents
string[]

The event types this webhook receives. Omitted when it receives every event.

Example:
pausedAt
string<date-time>

When the webhook was paused.

backingOffUntil
string<date-time>

When Slash retries delivery to a backing_off webhook.

disabledAt
string<date-time>

When Slash disabled the webhook after repeated failed deliveries.

archivedAt
string<date-time>