Skip to main content

Create Webhook

Create a new webhook endpoint.

POST /api/v1/webhooks

Required Scope: webhooks:write

Request

Body Parameters

ParameterTypeRequiredDescription
namestringYesWebhook name
urlstringYesWebhook endpoint URL (HTTPS)
eventsstring[]YesEvents to subscribe to
headersobjectNoCustom headers to include

Example

curl -X POST "https://api.flowmaestro.io/api/v1/webhooks" \
-H "X-API-Key: fm_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Production Notifications",
"url": "https://api.example.com/webhooks/flowmaestro",
"events": ["execution.completed", "execution.failed"],
"headers": {
"X-Custom-Header": "my-value"
}
}'

Response

Status: 201 Created

{
"data": {
"id": "wh_abc123",
"name": "Production Notifications",
"url": "https://api.example.com/webhooks/flowmaestro",
"events": ["execution.completed", "execution.failed"],
"secret": "whsec_abc123xyz...",
"headers": {
"X-Custom-Header": "my-value"
},
"is_active": true,
"created_at": "2024-01-15T10:30:00.000Z"
},
"meta": {
"request_id": "...",
"timestamp": "..."
}
}
warning

The secret is only returned once when creating the webhook. Store it securely — you'll need it to verify webhook signatures.

Errors

StatusCodeDescription
400validation_errorInvalid URL or events