Webhook Endpoints
Configure webhooks to receive real-time notifications when form submissions arrive. All endpoints require authentication.
Create webhook
POST /webhooks/:deployIdAdd a webhook to a deployment. When a form submission is received, a POST request is sent to the configured URL.
Path parameters
| Parameter | Description |
|---|---|
deployId | The deployment ID |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
url | string | Yes | The webhook endpoint URL |
type | string | No | "generic" (default) or "slack" |
events | string[] | No | Event types to listen for. Defaults to all events. |
Example request
curl -X POST https://api.invoker.page/webhooks/d_abc123 \
-H "Authorization: Bearer inv_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"url": "https://hooks.slack.com/services/T00/B00/xxxx",
"type": "slack"
}'Example response
{
"id": "wh_def456",
"deployment_id": "d_abc123",
"url": "https://hooks.slack.com/services/T00/B00/xxxx",
"type": "slack"
}Errors
| Status | Reason |
|---|---|
| 400 | Missing url field or invalid type value |
| 401 | Missing or invalid API key |
| 404 | Deployment not found or not owned by authenticated user |
List webhooks
GET /webhooks/:deployIdList all webhooks configured for a deployment.
Path parameters
| Parameter | Description |
|---|---|
deployId | The deployment ID |
Example request
curl https://api.invoker.page/webhooks/d_abc123 \
-H "Authorization: Bearer inv_your_api_key"Example response
{
"webhooks": [
{
"id": "wh_def456",
"url": "https://hooks.slack.com/services/T00/B00/xxxx",
"type": "slack",
"events": ["submission"],
"active": true,
"created_at": "2025-01-15T10:30:00Z"
},
{
"id": "wh_ghi789",
"url": "https://example.com/webhook",
"type": "generic",
"events": ["submission"],
"active": true,
"created_at": "2025-01-14T09:00:00Z"
}
]
}Errors
| Status | Reason |
|---|---|
| 401 | Missing or invalid API key |
| 404 | Deployment not found or not owned by authenticated user |
Delete webhook
DELETE /webhooks/:deployId/:webhookIdRemove a webhook from a deployment.
Path parameters
| Parameter | Description |
|---|---|
deployId | The deployment ID |
webhookId | The webhook ID |
Example request
curl -X DELETE https://api.invoker.page/webhooks/d_abc123/wh_def456 \
-H "Authorization: Bearer inv_your_api_key"Example response
{
"message": "Webhook deleted"
}Errors
| Status | Reason |
|---|---|
| 401 | Missing or invalid API key |
| 404 | Webhook or deployment not found |
Webhook payloads
When a form submission triggers a webhook, the payload format depends on the webhook type.
Generic payload
Generic webhooks receive a JSON POST with the following structure:
{
"event": "submission",
"deployment_id": "d_abc123",
"data": {
"name": "Jane Doe",
"email": "jane@example.com",
"message": "Hello from the form"
},
"timestamp": "2025-01-15T14:30:00Z"
}The data field contains the raw form submission fields exactly as submitted.
Slack payload
Slack webhooks send a payload formatted with Block Kit for rich rendering in Slack channels:
{
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": "New submission for my-page"
}
},
{
"type": "section",
"fields": [
{
"type": "mrkdwn",
"text": "*name*\nJane Doe"
},
{
"type": "mrkdwn",
"text": "*email*\njane@example.com"
},
{
"type": "mrkdwn",
"text": "*message*\nHello from the form"
}
]
},
{
"type": "context",
"elements": [
{
"type": "mrkdwn",
"text": "Submitted at 2025-01-15T14:30:00Z"
}
]
}
]
}Field limit
Slack's Block Kit supports a maximum of 10 fields per section. If a form submission contains more than 10 fields, only the first 10 are included in the Slack payload.