Webhooks

Create a webhook subscription

POST https://demo.notifuse.com/api/webhookSubscriptions.create

Creates a new webhook subscription to receive HTTP callbacks when specified events occur in the workspace.

Authorizations

Authorization string header required

Bearer authentication header of the form Bearer <token>, where <token> is your API key.

Body application/json

workspace_id string required

The ID of the workspace

Example ws_1234567890
name string required

Human-readable name for the subscription

Min length 1 Max length 255 Example Production Webhook
url string<uri> required

The HTTPS URL to receive webhook events

Example https://api.example.com/webhooks/notifuse
event_types string[] required

List of event types to subscribe to

custom_event_filters object | null

Optional filters for custom_event.* event types

Show 2 child attributes Hide 2 child attributes
goal_types string[] | null

Filter by goal type (e.g., purchase, subscription, lead)

event_names string[] | null

Filter by event name (e.g., orders/fulfilled, payment.succeeded)

list_ids string[]

Narrow the list.* events to these lists. Omit it, or send an empty array, to receive an event for every list in the workspace.

segment_ids string[]

Narrow the segment.* events to these segments. Omit it, or send an empty array, to receive an event for every segment in the workspace.

Response

201 Webhook subscription created successfully object
subscription object

A webhook subscription that receives HTTP callbacks when events occur

Show 13 child attributes Hide 13 child attributes
id string

Unique identifier for the subscription

Example whsub_a1b2c3d4e5f6
name string

Human-readable name for the subscription

Example Production Webhook
url string<uri>

The HTTPS URL to receive webhook events

Example https://api.example.com/webhooks/notifuse
secret string

Secret key for signing webhook payloads (Standard Webhooks spec)

Example whsec_a1b2c3d4e5f6g7h8i9j0
settings object

Settings for webhook subscription

Show 4 child attributes Hide 4 child attributes
event_types string[]

List of event types this subscription is subscribed to

custom_event_filters object | null

Optional filters for custom_event.* event types

Show 2 child attributes Hide 2 child attributes
goal_types string[] | null

Filter by goal type (e.g., purchase, subscription, lead)

event_names string[] | null

Filter by event name (e.g., orders/fulfilled, payment.succeeded)

list_ids string[]

Lists the list.* events are narrowed to. Absent or empty means every list.

segment_ids string[]

Segments the segment.* events are narrowed to. Absent or empty means every segment.

event_types string[]

List of event types this subscription is subscribed to (flattened from settings for convenience)

custom_event_filters object | null

Optional filters for custom_event.* event types (flattened from settings for convenience)

Show 2 child attributes Hide 2 child attributes
goal_types string[] | null

Filter by goal type (e.g., purchase, subscription, lead)

event_names string[] | null

Filter by event name (e.g., orders/fulfilled, payment.succeeded)

list_ids string[]

Lists the list.* events are narrowed to (flattened from settings for convenience). Absent or empty means every list.

segment_ids string[]

Segments the segment.* events are narrowed to (flattened from settings for convenience). Absent or empty means every segment.

enabled boolean

Whether the subscription is currently active

Example true
last_delivery_at string<date-time> | null

Timestamp of the last delivery attempt

Example 2024-01-15T10:30:00Z
created_at string<date-time>

When the subscription was created

Example 2024-01-01T00:00:00Z
updated_at string<date-time>

When the subscription was last updated

Example 2024-01-15T10:30:00Z
400 Bad request - validation failed object
error string required

Error message

401 Unauthorized - invalid or missing authentication token object
error string required

Error message

500 Internal server error object
error string required

Error message