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.

Pro Feature

Webhooks are available on the Pro plan. Upgrade to Pro 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 Required

Your webhook URL must use HTTPS for security. HTTP URLs are not supported.

Webhook Payload

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

webhook-payload.json

Payload Fields

FieldTypeDescription
apiKeystringYour API key
submittedAtstringISO 8601 timestamp of submission
formDataobjectAll form fields submitted by the user
userAgentstringUser agent string of the submitter
ipAddressstringIP address of the submitter

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
  • Ensuring the request comes from a Static Forms IP address
  • Using a secret token in your webhook URL (e.g., https://yoursite.com/webhook?token=SECRET)

Response & Retry Logic

Your webhook endpoint should respond with a 2xx status code (like 200 or 204) to indicate successful receipt. If your endpoint returns an error or times out, we'll retry the webhook:

  • Timeout: 10 seconds
  • Retries: Up to 3 attempts
  • Retry Delay: Exponential backoff (1min, 5min, 30min)

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 30 days. Failed webhooks are retried automatically as described above.

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