Skip to main content
POST
/
open
/
forms
/
{form}
/
integrations
curl -X POST 'https://api.opnform.com/open/forms/123/integrations' \
  -H 'Authorization: Bearer YOUR_PAT' \
  -H 'Content-Type: application/json' \
  -d '{
    "integration_id": "webhook",
    "status": "active",
    "data": {
      "webhook_url": "https://example.com/opnform-hook"
    }
  }'
{
  "message": "Form Integration was created.",
  "form_integration": {
    "id": 42,
    "form_id": 123,
    "integration_id": "webhook",
    "status": "active",
    "data": {
      "webhook_url": "https://example.com/opnform-hook"
    }
  }
}

Create Webhook Integration

Add a new webhook integration to send form submissions to an external endpoint.

Authentication & Scope

This endpoint requires a Personal Access Token with the manage-integrations ability.

Request

form
number
required
The ID of the form to which the webhook will be added.
integration_id
string
required
Must be set to "webhook" for webhook integrations.
status
string
The initial status of the webhook. Allowed values: "active" (default), "inactive".
data
object
required
Configuration object containing webhook details.
curl -X POST 'https://api.opnform.com/open/forms/123/integrations' \
  -H 'Authorization: Bearer YOUR_PAT' \
  -H 'Content-Type: application/json' \
  -d '{
    "integration_id": "webhook",
    "status": "active",
    "data": {
      "webhook_url": "https://example.com/opnform-hook"
    }
  }'

Response

200 OK – Webhook created successfully.
{
  "message": "Form Integration was created.",
  "form_integration": {
    "id": 42,
    "form_id": 123,
    "integration_id": "webhook",
    "status": "active",
    "data": {
      "webhook_url": "https://example.com/opnform-hook"
    }
  }
}
403 Forbidden – The token does not have manage-integrations ability or insufficient form permissions. 404 Not Found – Form not found. 422 Unprocessable Entity – Validation error (e.g., invalid webhook URL).
{
  "message": "The webhook url must be a valid URL.",
  "errors": {
    "data.webhook_url": ["The webhook url must be a valid URL."]
  }
}

Authorizations

Authorization
string
header
required

Personal Access Token

Path Parameters

form
number
required

The ID of the form.

Body

application/json
integration_id
enum<string>
required

Must be "webhook"

Available options:
webhook
data
object
required
status
enum<string>
default:active

The initial status of the webhook

Available options:
active,
inactive

Response

Webhook created successfully

message
string
Example:

"Form Integration was created."

form_integration
object