Skip to main content
POST
/
webhooks
Create webhook
curl --request POST \
  --url https://management-api.fpjs.io/webhooks \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-API-Version: <x-api-version>' \
  --data '
{
  "url": "https://website.com/webhook",
  "description": "My Webhook",
  "status": "enabled",
  "environment": {}
}
'
{
  "data": {
    "id": "wh_HYv9YfsIIUjpvR",
    "description": "My Webhook",
    "status": "enabled",
    "verified": false,
    "environment": {},
    "url": "https://website.com/webhook",
    "legacy": true,
    "basic_auth": {},
    "created_at": "2023-11-07T05:31:56Z",
    "signing_key": "<string>",
    "last_enabled_at": {},
    "last_disabled_at": {}
  }
}
Webhook needs to be verified before it will start sending identification events to your server. The response will include a signing key. When fetching webhooks after creation, signing key will not be visible! When specifying an environment during creation, webhook will report events only from an associated environment. Setting environment to null creates a workspace-scoped webhook that reports on all events. See webhooks documentation for more details.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

X-API-Version
string
required

Management API version.

Body

application/json
url
string
required

URL of the webhook endpoint. Must start with https://.

Example:

"https://website.com/webhook"

description
string

Description of the webhook.

Example:

"My Webhook"

status
enum<string>

Status of the webhook: 'enabled' or 'disabled'.

Available options:
enabled,
disabled
environment
object

Environment ID this webhook is associated with. Null if global.

Response

Webhook created, but needs to be verified before it's active.

data
object
required