Skip to main content
POST
Create a webhook endpoint

Authorizations

hookie_session
string
cookie
required

The console's sealed session cookie, set by WorkOS AuthKit. Mutating requests also require the X-Requested-With CSRF header.

Path Parameters

pid
string
required

Project id (UUID) belonging to the caller workspace.

Body

application/json
name
string
required
Required string length: 1 - 80
slug
string
required

The base slug (lowercase letters, digits and hyphens, max 47 characters). This is NOT the public URL - a separate high-entropy slug is generated and returned as webhook_slug.

Pattern: ^[a-z0-9][a-z0-9-]{0,46}$
dataset
string
required
Pattern: ^[A-Za-z][A-Za-z0-9_]{0,62}$
enabled
boolean
default:true

Anything other than the literal false is treated as true.

criteria
object[]

Omitted or empty accepts any payload (the URL already scopes it). The validator rejects more than 10 entries before the documented 20-criteria ceiling can apply.

Maximum array length: 10
mappings
object[]

Omitted or empty means identity - store the whole payload.

Maximum array length: 50

Response

Created at version 1, with a mirror mapping rule synced behind it. webhook_slug is the public URL credential and is the only place it is returned in full at creation time.

id
string
required
slug
string
required

Versioned route slug, base-v1.

webhook_slug
string
required

High-entropy public slug - treat as a secret.