Subscribe webhook
Creates a new webhook subscription to receive events from EasyRoutes. The request body should include the URL to send webhook events to and the topics to subscribe to. The response will include the created webhook subscription with its ID and the list of subscribed topics. You may have a maximum of 5 webhook subscriptions per organization. The webhook URL must be publicly accessible and able to handle POST requests with JSON payloads. The response will include the created webhook subscription with a unique ID.
Authorization
bearerAuth Access token from /authenticate
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/webhooks" \ -H "Content-Type: application/json" \ -d '{ "url": "https://example.com/webhook", "topics": [ "ROUTE_CREATED", "ROUTE_UPDATED" ] }'{ "id": "sub-123e4567-e89b-12d3-a456-426614174000", "url": "https://example.com/webhook", "topics": [ "ROUTE_CREATED", "ROUTE_UPDATED" ], "active": true}{ "code": 0, "message": "string", "details": [ { "@type": "string" } ]}