Webhooks

Create Webhook

POST

Webooks can be set up using the webhook API endpoints. Currently, only one webhook may be created per organization. The webhook will be called for events in that organization.

Consult the Events documentation for more information.

Request

This endpoint expects an object.
endpoint
stringRequired
secret
stringRequired
organization_id
stringOptional

Response

This endpoint returns an object
data
objectOptional
POST
1curl -X POST https://app.polytomic.com/api/webhooks \
2 -H "Authorization: Bearer <token>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "endpoint": "https://example.com/webhook",
6 "secret": "secret"
7}'
200Successful
1{
2 "data": {
3 "created_at": "2024-01-01T00:00:00Z",
4 "endpoint": "https://example.com/webhook",
5 "id": "248df4b7-aa70-47b8-a036-33ac447e668d",
6 "organization_id": "248df4b7-aa70-47b8-a036-33ac447e668d",
7 "secret": "secret"
8 }
9}