🚀 Devdraft Launch Week I is live! Sign up for exclusive access and early features. Learn more →
curl --request POST \
--url https://api.devdraft.ai/api/v0/webhooks \
--header 'Content-Type: application/json' \
--header 'x-client-secret: <api-key>' \
--data '{
"name": "Payment Notifications",
"url": "https://api.example.com/webhooks/payments",
"isActive": true,
"signing_secret": "whsec_123456789",
"encrypted": false
}'
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Payment Notifications",
"url": "https://api.example.com/webhooks/payments",
"isActive": true,
"encrypted": false,
"created_at": "2024-03-20T12:00:00.000Z",
"updated_at": "2024-03-20T12:00:00.000Z",
"delivery_stats": {
"total_events": 150,
"successful_deliveries": 145,
"failed_deliveries": 5,
"last_delivery": "2024-03-20T11:55:00.000Z"
}
}
Creates a new webhook endpoint for receiving event notifications. Requires webhook:create scope.
curl --request POST \
--url https://api.devdraft.ai/api/v0/webhooks \
--header 'Content-Type: application/json' \
--header 'x-client-secret: <api-key>' \
--data '{
"name": "Payment Notifications",
"url": "https://api.example.com/webhooks/payments",
"isActive": true,
"signing_secret": "whsec_123456789",
"encrypted": false
}'
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Payment Notifications",
"url": "https://api.example.com/webhooks/payments",
"isActive": true,
"encrypted": false,
"created_at": "2024-03-20T12:00:00.000Z",
"updated_at": "2024-03-20T12:00:00.000Z",
"delivery_stats": {
"total_events": 150,
"successful_deliveries": 145,
"failed_deliveries": 5,
"last_delivery": "2024-03-20T11:55:00.000Z"
}
}
Your secret API key. Keep this secure and never expose it in client-side code.
Webhook configuration details
The body is of type object
.
The webhook has been successfully created.
The response is of type object
.