Skip to main content
POST
/
webhooks
Create Webhook
curl --request POST \
  --url https://api.dfns.io/webhooks \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-DFNS-USERACTION: <api-key>' \
  --data '{
  "url": "<string>",
  "status": "Enabled",
  "description": "<string>",
  "events": [
    "policy.triggered"
  ]
}'
{
  "id": "<string>",
  "url": "<string>",
  "events": [
    "policy.triggered"
  ],
  "status": "Enabled",
  "description": "<string>",
  "dateCreated": "<string>",
  "dateUpdated": "<string>",
  "secret": "<string>"
}

Authentication

✅ Organization User (CustomerEmployee)
❌ Delegated User (EndUser)
✅ Service Account

Required Permissions

Webhooks:Create: Always required.

Authorizations

Authorization
string
header
required
X-DFNS-USERACTION
string
header
required

Body

application/json
url
string
required
events
enum<string>[]
required
Minimum length: 1
status
enum<string>
Available options:
Enabled,
Disabled
description
string
Maximum length: 256

Response

200 - application/json
id
string
required
url
string
required
events
enum<string>[]
required
status
enum<string>
required
Available options:
Enabled,
Disabled
dateCreated
string
required
dateUpdated
string
required
secret
string
required
description
string