Skip to main content
POST
/
v1
/
regions
/
global
/
webhooks
/
subscriptions
Create subscription
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({webhookId: '<string>', eventType: '<string>', filters: {}})
};

fetch('https://api.example.com/v1/regions/global/webhooks/subscriptions', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "success": true,
  "data": {
    "id": "<string>",
    "webhookId": "<string>",
    "eventType": "<string>",
    "filters": {},
    "active": true,
    "createdAt": "2023-11-07T05:31:56Z"
  }
}

Body

application/json
webhookId
string
required
eventType
string
required
filters
object

Response

201 - application/json

Subscription created

success
enum<boolean>
Available options:
true
data
object

Webhook subscription