Skip to main content
POST
Create a signed webhook for database lifecycle events

Authorizations

Authorization
string
header
required

WorkOS access JWT or a user-owned WorkOS API key. User keys are bound to one organization and restricted to their enabled product permissions. Session-only onboarding and session revocation require an interactive access JWT. No cookie session is assumed.

Headers

X-Request-Id
string

Optional caller-provided correlation identifier.

Required string length: 1 - 128
Idempotency-Key
string
required

Identifies one mutation and its canonical request payload.

Required string length: 1 - 128

Path Parameters

project_id
string
required

Project identifier.

Pattern: ^[0-9A-HJKMNP-TV-Z]{26}$

Query Parameters

environment
enum<string>
required

Application environment the mutation applies to.

Available options:
dev,
prod

Body

application/json
url
string
required

HTTPS receiver URL.

Maximum string length: 2048
Pattern: ^https://
event_types
enum<string>[]
required
Required array length: 1 - 16 elements
Available options:
database.created,
database.ready,
database.woke,
database.slept,
database.suspended,
database.resized,
database.deleted
headers
object

Extra headers sent with every delivery. Names are case-insensitive and must be unique; content-type, host, content-length, connection, transfer-encoding, user-agent, te, upgrade, expect and any name starting with pgcf-, cf- or x-forwarded- are refused.

Response

The webhook with its signing secret, returned once and never persisted in plaintext.

id
string
required
Pattern: ^whk_[a-z0-9]{20}$
environment
enum<string>
required
Available options:
dev,
prod
url
string
required
Maximum string length: 2048
Pattern: ^https://
event_types
enum<string>[]
required
Required array length: 1 - 16 elements
Available options:
database.created,
database.ready,
database.woke,
database.slept,
database.suspended,
database.resized,
database.deleted
header_names
string[]
required
Maximum array length: 8
Pattern: ^[A-Za-z][A-Za-z0-9-]{0,63}$
created_at
string<date-time>
required
secret
string
required

Signing secret, returned only by this creation answer.

Minimum string length: 1