Skip to main content
POST
Create webhook

Path Parameters

workspaceSlug
string
required

URL-safe workspace identifier.

Body

application/json

Request payload for creating a new workspace webhook.

Request payload for creating a new workspace webhook.

description
string
required

Detailed description of the webhook's purpose (max 500 characters).

Maximum string length: 500
displayName
string
required

Human-readable name for the webhook (1-128 characters).

Required string length: 1 - 128
events
string[]
required

List of event types this webhook should receive.

Defines the types of events that can trigger webhook delivery.

This enumeration corresponds to the WEBHOOK_EVENT PostgreSQL enum and is used to configure which events a webhook should receive notifications for.

Allowed value: "file.created"
url
string<uri>
required

The URL to send webhook payloads to.

Maximum string length: 2048
headers
object

Optional custom headers to include in webhook requests.

status

Initial status of the webhook (enabled or disabled).

Allowed value: "enabled"

Response

Webhook creation response that includes the secret (visible only once).

The secret is used for HMAC-SHA256 signature verification of webhook payloads. It is only returned when the webhook is first created and cannot be retrieved again. Store it securely.

Webhook creation response that includes the secret (visible only once).

The secret is used for HMAC-SHA256 signature verification of webhook payloads. It is only returned when the webhook is first created and cannot be retrieved again. Store it securely.

consecutiveFailures
integer<int32>
required

Consecutive failed deliveries since the last success.

createdAt
string<date-time>
required

Timestamp when this webhook was first created.

createdBy
object
required

Account that created this webhook.

description
string
required

Detailed description of the webhook's purpose.

displayName
string
required

Human-readable name for the webhook.

events
string[]
required

List of event types this webhook receives.

Defines the types of events that can trigger webhook delivery.

This enumeration corresponds to the WEBHOOK_EVENT PostgreSQL enum and is used to configure which events a webhook should receive notifications for.

Allowed value: "file.created"
headers
object
required

Custom headers included in webhook requests.

id
string
required

Opaque identifier of the webhook.

Pattern: ^whk_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
secret
string
required

HMAC-SHA256 signing secret for webhook verification.

Important: This is the only time the secret will be shown. Store it securely as it cannot be retrieved again.

status
required

Current status of the webhook.

Allowed value: "enabled"
updatedAt
string<date-time>
required

Timestamp when this webhook was last modified.

url
string
required

The URL to send webhook payloads to.

workspaceSlug
string
required

Handle of the workspace this webhook belongs to.

Required string length: 3 - 32
Pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$
lastFailureAt
string<date-time>

Timestamp of the most recent failed delivery.

lastSuccessAt
string<date-time>

Timestamp of the most recent successful delivery.