Create a webhook endpoint
Creates a new webhook endpoint for the authenticated organization. The signing secret is returned in the response — this is the only time it will be shown. Use the secret to verify webhook signatures via the `X-Astrocal-Signature` header.
Authorization
BearerAuth AuthorizationBearer <token>
API key authentication. Use your API key as the bearer token.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/v1/webhooks" \ -H "Content-Type: application/json" \ -d '{ "url": "http://example.com", "events": [ "booking.created" ] }'{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"url": "string",
"events": [
"string"
],
"secret": "string",
"active": true,
"created_at": "string",
"updated_at": "string"
}{
"error": {
"code": "string",
"message": "string",
"details": {
"property1": null,
"property2": null
}
}
}{
"error": {
"code": "string",
"message": "string",
"details": {
"property1": null,
"property2": null
}
}
}