Skip to content

Create webhook

Request

Create a new outgoing webhook for your organization

Security
x-api-key
Bodyapplication/jsonrequired
urlstring, (uri), <= 2048 charactersrequired

The URL to call for this webhook. Must use the https scheme.

Example:"https://example.com/webhook"
customHeadersArray of objects, <= 10 items

Custom headers to include when calling the URL. Up to 10 entries are allowed, and keys must be unique (case-sensitive).

eventsobject

Filters controlling which events are sent to this webhook.

curl -i -X POST \
  https://eu1.api.pushsecurity.com/v1/settings/webhooks \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY_HERE' \
  -d '{
    "url": "https://example.com/webhook"
  }'

Responses

OK

Bodyapplication/json
signingSecretstringrequired

The signing secret for this webhook. This is only ever returned once, at creation time.

Example:"psws_2a2197dead2c47e48dcbfb0f04cf83e0"
idstring

Unique identifier for this object

Example:"2a2197de-ad2c-47e4-8dcb-fb0f04cf83e0"
urlstring or null

The URL called by this webhook

Example:"https://example.com/webhook"
enabledboolean

Whether the webhook is enabled

Example:true
eventsobject

The events that are sent from this webhook.

customHeadersConfiguredboolean

Whether the webhook has custom headers configured

Example:false
creationTimestampinteger

When the webhook was created, formatted as a UNIX timestamp (in seconds)

Example:1698064423
lastUpdatedTimestampinteger

When the webhook was last updated, formatted as a UNIX timestamp (in seconds)

Example:1698064423
Response
{ "id": "2a2197de-ad2c-47e4-8dcb-fb0f04cf83e0", "url": "https://example.com/webhook", "enabled": true, "events": { "objects": [ "API_KEY_ADDED", "CONTROL_RULE_UPDATED" ], "categories": [ "AUDIT", "CONTROL" ] }, "customHeadersConfigured": false, "creationTimestamp": 1698064423, "lastUpdatedTimestamp": 1698064423, "signingSecret": "psws_2a2197dead2c47e48dcbfb0f04cf83e0" }