Webhooks API
The Webhooks API allows external systems to trigger automations in PostBeagle in real-time.
Trigger Automation via Webhook
Triggers a specific automation for a contact using their email address. This is useful for integrating with external forms, e-commerce platforms, or other tools.
POST /api/webhooks/automation/:automationId
Headers
If your automation is configured with a Webhook Secret, you must include it in the Authorization header.
Authorization: Bearer YOUR_WEBHOOK_SECRET
Body
| Field | Type | Description |
|---|---|---|
email | string | Required. Email address of the contact to trigger the automation for. The contact must already exist in PostBeagle. |
data | object | Optional JSON object containing custom data to be used in the automation context. |
Example Request
curl -X POST https://api.postbeagle.com/api/webhooks/automation/123e4567-e89b-12d3-a456-426614174000 \
-H "Content-Type: application/json" \
-H "Authorization: Bearer my-secret-token" \
-d '{
"email": "[email protected]",
"data": {
"source": "shopify",
"order_id": "1001",
"value": 49.99
}
}'
Get Webhook Info
Retrieves information about a webhook-triggered automation, including its URL and documentation on how to use it.
GET /api/webhooks/automation/:automationId