Create webhook subscriptionv3.1

POST
/api/v3.1/webhook_subscriptions

Creates a webhook subscription for the authenticated project. Only one subscription is allowed per project. The signing secret is returned in subscription responses.

Authorization

ApiKeyAuth
x-api-key<token>

Project API key authentication

In: header

Request Body

application/json

webhook_urlstringRequired

HTTPS URL to receive webhook events

Format: uri
enabled_eventsarray of stringRequired

Array of event types to subscribe to

versionenum

Webhook payload version

Default: "V3"
Possible values:
V1V2V3

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

import requestsurl = "https://example.com/api/v3.1/webhook_subscriptions"body = """{  "webhook_url": "http://example.com",  "enabled_events": [    "string"  ]}"""response = requests.request("POST", url, data = body, headers = {  "Content-Type": "application/json"})print(response.text)
{  "id": "string",  "webhook_url": "string",  "version": "V1",  "enabled_events": [    "string"  ],  "secret": "string",  "created_at": "string",  "updated_at": "string"}