Skip to content

Webhook Endpoints

Configure webhooks to receive real-time notifications when form submissions arrive. All endpoints require authentication.

Create webhook

POST /webhooks/:deployId

Add a webhook to a deployment. When a form submission is received, a POST request is sent to the configured URL.

Path parameters

ParameterDescription
deployIdThe deployment ID

Request body

FieldTypeRequiredDescription
urlstringYesThe webhook endpoint URL
typestringNo"generic" (default) or "slack"
eventsstring[]NoEvent types to listen for. Defaults to all events.

Example request

bash
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

json
{
  "id": "wh_def456",
  "deployment_id": "d_abc123",
  "url": "https://hooks.slack.com/services/T00/B00/xxxx",
  "type": "slack"
}

Errors

StatusReason
400Missing url field or invalid type value
401Missing or invalid API key
404Deployment not found or not owned by authenticated user

List webhooks

GET /webhooks/:deployId

List all webhooks configured for a deployment.

Path parameters

ParameterDescription
deployIdThe deployment ID

Example request

bash
curl https://api.invoker.page/webhooks/d_abc123 \
  -H "Authorization: Bearer inv_your_api_key"

Example response

json
{
  "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

StatusReason
401Missing or invalid API key
404Deployment not found or not owned by authenticated user

Delete webhook

DELETE /webhooks/:deployId/:webhookId

Remove a webhook from a deployment.

Path parameters

ParameterDescription
deployIdThe deployment ID
webhookIdThe webhook ID

Example request

bash
curl -X DELETE https://api.invoker.page/webhooks/d_abc123/wh_def456 \
  -H "Authorization: Bearer inv_your_api_key"

Example response

json
{
  "message": "Webhook deleted"
}

Errors

StatusReason
401Missing or invalid API key
404Webhook 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:

json
{
  "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:

json
{
  "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.

Deploy forms and sites from AI conversations.