Skip to main content
POST
/
webhook-subscriptions
Create webhook subscription
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({url: '<string>', eventTypes: '<array>'})
};

fetch('https://api.dolfinai.co/webhook-subscriptions', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "secret": "<string>",
  "url": "<string>",
  "eventTypes": "<array>",
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "clientId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "active": true,
  "consecutiveFailures": 123,
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Body

application/json
url
string
required
eventTypes
array
required

Response

Created

secret
string
required
url
string
required
eventTypes
array
required
id
string<uuid>
clientId
string<uuid>
active
boolean
consecutiveFailures
createdAt
string<date-time>
updatedAt
string<date-time>