Create a webhook endpoint
Registers an https endpoint for the organization's events and returns its signing secret, ONCE. Every delivery carries `Trama-Signature: t=<unix>,v1=<hex>`, HMAC-SHA256 of `<t>.<raw body>` with that secret. An organization has at most 20 endpoints, disabled ones included: one more answers 409 `WEBHOOK_ENDPOINT_LIMIT_REACHED`.
Registers an https endpoint for the organization's events and returns its signing secret, ONCE. Every delivery carries Trama-Signature: t=<unix>,v1=<hex>, HMAC-SHA256 of <t>.<raw body> with that secret. An organization has at most 20 endpoints, disabled ones included: one more answers 409 WEBHOOK_ENDPOINT_LIMIT_REACHED.
The organization API key, sent as Authorization: Bearer <key>.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
The events this endpoint receives. One or more of: sale.won, sale.updated.
1 <= itemsWhere the events are POSTed. Must be https:// on a public host.
length <= 2048Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/webhooks" \ -H "Content-Type: application/json" \ -d '{ "eventTypes": [ "sale.won" ], "url": "string" }'{ "createdAt": "2019-08-24T14:15:22Z", "eventTypes": [ "sale.won" ], "id": "string", "previousSecretExpiresAt": "2019-08-24T14:15:22Z", "status": "enabled", "updatedAt": "2019-08-24T14:15:22Z", "url": "string", "secret": "string"}