Advanced

Webhooks

Receive real-time notifications when someone submits your form

Webhooks allow you to send form submission data to any URL in real-time. This enables you to integrate Static Forms with thousands of services like Slack, Discord, Zapier, Make (Integromat), n8n, or your own custom applications.

Paid Feature

Webhooks are available on paid plans (Pro or Advanced). View pricing to unlock this feature.

How Webhooks Work

When a form is submitted, Static Forms sends an HTTP POST request to your webhook URL with the form data. Your endpoint receives the data in real-time and can process it however you want.

  1. 1User submits your form
  2. 2Static Forms processes the submission
  3. 3We send a POST request to your webhook URL
  4. 4Your endpoint receives and processes the data

Setting Up a Webhook

To configure webhooks for your account:

  1. Log in to your dashboard
  2. Navigate to Settings → Webhooks
  3. Click Add Webhook
  4. Enter your webhook URL
  5. Click Save

HTTPS Recommended

HTTPS is strongly recommended for security. HTTP URLs are supported but should be used only in trusted environments.

Webhook Payload

When a form is submitted, we send a POST request with the following JSON payload:

webhook-payload.json

Payload Fields

FieldTypeDescription
eventstringEvent name (e.g., form.submitted)
timestampnumberUnix timestamp (seconds)
dataobjectSubmission details (see below)
data.submissionIdstringUnique submission ID
data.formDataobjectAll form fields submitted by the user
data.apiKeystringAPI key associated with the submission
data.recipientEmailstringEmail that receives the submission
data.replyTostringReply-to email (when available)
data.attachmentsarrayFile attachment metadata (if any)

Webhook Security

We recommend verifying webhook requests to ensure they're coming from Static Forms. You can do this by:

  • Checking the apiKey in the payload matches your expected key
  • Using a secret token in your webhook URL (e.g., https://yoursite.com/webhook?token=SECRET)
  • Requiring a custom header or bearer token on your endpoint

Response & Retry Logic

Your webhook endpoint should respond with a 2xx status code (like 200 or 204) to indicate successful receipt. Webhook delivery uses a single attempt:

  • Timeout: 30 seconds
  • Retries: No automatic retries

Best Practice

Return a 200 response quickly and process the webhook data asynchronously in a background job for the most reliable delivery.

Example Implementations

Node.js / Express

webhook-server.js

Next.js API Route

app/api/webhook/route.ts

Python / Flask

webhook_server.py

Popular Integrations

Testing Your Webhook

You can test your webhook configuration from the dashboard:

  1. Go to Settings → Webhooks
  2. Click Test Webhook next to your webhook URL
  3. We'll send a test payload to your endpoint
  4. Check your endpoint logs to verify it received the test

Webhook Logs

View webhook delivery attempts and debug issues in your dashboard under Settings → Webhook Logs. Logs include:

  • Timestamp of each attempt
  • HTTP status code returned
  • Response time
  • Error messages (if any)

Log Retention

Webhook logs are retained for 14 days. Webhooks use a single delivery attempt, so handle failures on your endpoint side.

Troubleshooting

Webhook Not Receiving Requests

  • Verify your webhook URL is correct and uses HTTPS
  • Check your webhook logs in the dashboard for errors
  • Ensure your endpoint is publicly accessible (not localhost)
  • Check firewall rules allow inbound traffic

Timeouts

  • Return a 200 response within 10 seconds
  • Process webhook data asynchronously if it takes longer
  • Optimize database queries and external API calls

Duplicate Webhooks

  • Implement idempotency using the submittedAt timestamp
  • Store processed submission IDs to prevent duplicate processing
  • Still return 200 even if you've seen the submission before