Skip to Content
OpenPerf

Webhooks

Create a webhook

POST
/api/v1/webhooks

Creates an outbound webhook endpoint for organization events. Requires owner access.

Authorization

cookie
cookiebetter-auth.session_token<token>

Dashboard session cookie

Request Body

application/json
  1. body
url*string
Formaturi
Lengthlength <= 2048
events*array<>
Items1 <= items

Response Body

application/json
  1. response
id*string
url*string
events*array<>
enabled*boolean
consecutiveFailures*integer
lastError*string|null
lastDeliveredAt*|
Formatdate-time
createdAt*string
Formatdate-time
Example Request
curl -X POST 'https://api.example.com/api/v1/webhooks' \
  -H 'Content-Type: application/json' \
  -d '{
  "url": "http://example.com",
  "events": [
    "error.created"
  ]
}'
Example Response
{
  "id": "string",
  "url": "string",
  "events": [
    "error.created"
  ],
  "enabled": true,
  "consecutiveFailures": 0,
  "lastError": "string",
  "lastDeliveredAt": "2019-08-24T14:15:22Z",
  "createdAt": "2019-08-24T14:15:22Z"
}