> ## Documentation Index
> Fetch the complete documentation index at: https://developers.formstack.com/llms.txt
> Use this file to discover all available pages before exploring further.

# /forms/{formId}/webhooks

Create a new webhook for a form

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Formstack API v2025.0",
    "version": "0.0.4"
  },
  "servers": [
    {
      "url": "https://www.formstack.com/api/v2025",
      "description": "Production server"
    },
    {
      "url": "https://staging-formstack.com/api/v2025",
      "description": "Staging server"
    },
    {
      "url": "https://dev-formstack.com/api/v2025",
      "description": "Development server"
    }
  ],
  "paths": {
    "/forms/{formId}/webhooks": {
      "post": {
        "tags": [
          "Webhook"
        ],
        "description": "Create a new webhook for a form",
        "operationId": "createWebhook",
        "parameters": [
          {
            "name": "formId",
            "in": "path",
            "description": "The ID of the form",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWebhookInputApiDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Webhook created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDetailedApiDto"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Form not found"
          },
          "500": {
            "description": "Failed to create webhook"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "LogicDto": {
        "title": "Logic Conditions",
        "description": "Logic conditions for conditional processing",
        "properties": {
          "action": {
            "description": "Action to perform (show/hide)",
            "type": "string",
            "enum": [
              "show",
              "hide"
            ],
            "nullable": false
          },
          "conditional": {
            "description": "Conditional operator (all/any)",
            "type": "string",
            "enum": [
              "all",
              "any"
            ],
            "nullable": false
          },
          "checks": {
            "description": "Array of condition checks",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LogicFieldCheckDto"
            },
            "nullable": false
          }
        },
        "type": "object"
      },
      "LogicFieldCheckDto": {
        "title": "Logic Check Condition",
        "description": "Single condition check for logic operations",
        "properties": {
          "field": {
            "description": "Field ID to check",
            "type": "string",
            "nullable": false
          },
          "condition": {
            "description": "Condition operator",
            "type": "string",
            "enum": [
              "equals",
              "notequals",
              "greaterthan",
              "lessthan"
            ],
            "nullable": false
          },
          "option": {
            "description": "Value to compare against",
            "type": "string",
            "nullable": false
          }
        },
        "type": "object"
      },
      "WebhookDetailedApiDto": {
        "title": "Webhook Detailed",
        "description": "Webhook detailed information",
        "properties": {
          "id": {
            "description": "ID of the webhook",
            "type": "integer",
            "nullable": false
          },
          "name": {
            "description": "Name of the webhook",
            "type": "string",
            "nullable": false
          },
          "formId": {
            "description": "ID of the form",
            "type": "integer",
            "nullable": false
          },
          "url": {
            "description": "URL to send the webhook data to",
            "type": "string",
            "format": "uri",
            "nullable": false
          },
          "contentType": {
            "description": "Content type of the webhook data (urlencoded or json)",
            "type": "string",
            "enum": [
              "urlencoded",
              "json"
            ],
            "nullable": false
          },
          "fileTransferType": {
            "description": "Method for transferring file data in webhook payloads",
            "type": "string",
            "enum": [
              "downloadLink",
              "signedUrl",
              "base64encode"
            ],
            "nullable": false
          },
          "postDataFieldKeys": {
            "description": "Format of field keys in POST data",
            "type": "string",
            "enum": [
              "field_names",
              "field_ids",
              "api_friendly_field_names",
              "internal_labels",
              "internal_labels_api_friendly"
            ],
            "nullable": false
          },
          "useFieldIds": {
            "description": "Whether to use field IDs instead of field names (legacy format)",
            "type": "boolean",
            "nullable": false
          },
          "sharedSecret": {
            "description": "Shared secret for the webhook",
            "type": "string",
            "nullable": true
          },
          "hmacSecret": {
            "description": "HMAC secret used for signing webhook payload data",
            "type": "string",
            "nullable": true
          },
          "customHmacHeader": {
            "description": "Custom HMAC header name",
            "type": "string",
            "nullable": true
          },
          "errorEmails": {
            "description": "Comma-separated email addresses to notify when webhook delivery fails",
            "type": "string",
            "nullable": true
          },
          "includeFieldType": {
            "description": "Whether to include field type information in the webhook data",
            "type": "boolean",
            "nullable": false
          },
          "includeSubfieldNames": {
            "description": "Whether to include subfield names in the webhook data",
            "type": "boolean",
            "nullable": false
          },
          "standardizeValues": {
            "description": "Whether to standardize field values in the webhook data",
            "type": "boolean",
            "nullable": false
          },
          "customerApprovedPciCompliant": {
            "description": "Whether the webhook has been approved for PCI compliance",
            "type": "boolean",
            "nullable": false
          },
          "logic": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/LogicDto"
              }
            ],
            "nullable": true,
            "description": "Logic conditions for when to execute the webhook"
          }
        },
        "type": "object"
      },
      "CreateWebhookInputApiDto": {
        "title": "Create Webhook",
        "description": "Create Webhook request",
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookInputApiDto"
          }
        ]
      },
      "WebhookInputApiDto": {
        "title": "Base Webhook Input",
        "description": "Base Webhook Input properties",
        "properties": {
          "name": {
            "description": "Name of the webhook",
            "type": "string",
            "nullable": false
          },
          "url": {
            "description": "URL to send the webhook data to",
            "type": "string",
            "format": "uri",
            "nullable": false
          },
          "contentType": {
            "description": "Content type of the webhook data (urlencoded or json)",
            "type": "string",
            "default": "urlencoded",
            "enum": [
              "urlencoded",
              "json"
            ],
            "nullable": true
          },
          "fileTransferType": {
            "description": "Method for transferring file data in webhook payloads",
            "type": "string",
            "default": "downloadLink",
            "enum": [
              "downloadLink",
              "signedUrl",
              "base64encode"
            ],
            "nullable": true
          },
          "postDataFieldKeys": {
            "description": "Format of field keys in POST data",
            "type": "string",
            "default": "field_names",
            "enum": [
              "field_names",
              "field_ids",
              "api_friendly_field_names",
              "internal_labels",
              "internal_labels_api_friendly"
            ],
            "nullable": true
          },
          "sharedSecret": {
            "description": "Shared secret for the webhook",
            "type": "string",
            "nullable": true
          },
          "hmacSecret": {
            "description": "HMAC secret used for signing webhook payload data",
            "type": "string",
            "nullable": true
          },
          "customHmacHeader": {
            "description": "Custom HMAC header name",
            "type": "string",
            "nullable": true
          },
          "errorEmails": {
            "description": "Comma-separated email addresses to notify when webhook delivery fails",
            "type": "string",
            "nullable": true
          },
          "includeFieldType": {
            "description": "Whether to include field type information in the webhook data",
            "type": "boolean",
            "default": false,
            "nullable": true
          },
          "includeSubfieldNames": {
            "description": "Whether to include subfield names in the webhook data",
            "type": "boolean",
            "default": true,
            "nullable": true
          },
          "standardizeValues": {
            "description": "Whether to standardize field values in the webhook data for consistency",
            "type": "boolean",
            "default": false,
            "nullable": true
          },
          "customerApprovedPciCompliant": {
            "description": "Whether the webhook has been approved for PCI compliance",
            "type": "boolean",
            "default": false,
            "nullable": true
          },
          "logic": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/LogicDto"
              }
            ],
            "nullable": true,
            "description": "Logic conditions for when to execute the webhook"
          }
        },
        "type": "object"
      }
    }
  },
  "tags": [
    {
      "name": "Webhook",
      "description": "Webhooks push submission data to an external URL in real time as forms are submitted. Use these endpoints to list a form's webhooks and to create, retrieve, update, and delete them, configure payload format, HMAC signing, and failure notifications, and fetch the generated OpenAPI definition describing a webhook's payload."
    }
  ]
}
```