POST
/
webhooks
curl --request POST \
  --url https://app.formbricks.com/api/v2/management/webhooks \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "name": "<string>",
  "url": "<string>",
  "source": "user",
  "environmentId": "<string>",
  "triggers": [
    "responseFinished"
  ],
  "surveyIds": [
    "<string>"
  ]
}'
{
  "id": "<string>",
  "name": "<string>",
  "createdAt": "2021-01-01T00:00:00.000Z",
  "updatedAt": "2021-01-01T00:00:00.000Z",
  "url": "<string>",
  "source": "user",
  "environmentId": "<string>",
  "triggers": [
    "responseFinished"
  ],
  "surveyIds": [
    "<string>"
  ]
}

Authorizations

x-api-key
string
header
required

Use your Formbricks x-api-key to authenticate.

Body

application/json
The webhook to create
name
string | null
required

The name of the webhook

url
string
required

The URL of the webhook

source
enum<string>
required

The source of the webhook

Available options:
user,
zapier,
make,
n8n
environmentId
string
required

The ID of the environment

triggers
enum<string>[]
required

The triggers of the webhook

Available options:
responseFinished,
responseCreated,
responseUpdated
surveyIds
string[]
required

The IDs of the surveys

Response

201 - application/json
Webhook created successfully.
id
string

The ID of the webhook

name
string | null

The name of the webhook

createdAt
string

The date and time the webhook was created

Example:

"2021-01-01T00:00:00.000Z"

updatedAt
string

The date and time the webhook was last updated

Example:

"2021-01-01T00:00:00.000Z"

url
string

The URL of the webhook

source
enum<string>

The source of the webhook

Available options:
user,
zapier,
make,
n8n
environmentId
string

The ID of the environment

triggers
enum<string>[]

The triggers of the webhook

Available options:
responseFinished,
responseCreated,
responseUpdated
surveyIds
string[]

The IDs of the surveys

Was this page helpful?