Webhooks
Create a webhook endpoint
Register an HTTPS endpoint to receive workspace events.
Overview
Use this API to register an HTTPS endpoint to receive workspace events. It requires bearer api key authentication and the webhooks:write scope.
POST
/webhooks/endpointscURL
POSTbash
curl --request POST \ --url 'https://api.atlascrm.dev/v1/webhooks/endpoints' \ --header 'Authorization: Bearer crm_live_xxx' \ --header 'Content-Type: application/json' \ --data '{ "url": "https://example.com/webhooks/crm", "events": "[\"contact.created\"]"}'Sample Request Body
json
{ "url": "https://example.com/webhooks/crm", "events": "[\"contact.created\"]"}Sample Response
json
{ "status": "success", "data": { "id": "wh_123", "url": "https://example.com/webhooks/crm", "events": [ "contact.created" ], "signingSecret": "whsec_xxx" }}Status Codes
| Code | Description |
|---|---|
| 201 | Webhook endpoint was created. |
Headers
AuthorizationstringRequired
Bearer token for your workspace.
Example: Bearer crm_live_xxx
| Object | Description |
|---|---|
Authorization string | RequiredBearer token for your workspace. Example: Bearer crm_live_xxx |
Request body
urlstringRequired
HTTPS endpoint URL.
Example: https://example.com/webhooks/crm
eventsstring[]Required
Event types to subscribe to.
Example: ["contact.created"]
| Object | Description |
|---|---|
url string | RequiredHTTPS endpoint URL. Example: https://example.com/webhooks/crm |
events string[] | RequiredEvent types to subscribe to. Example: ["contact.created"] |
Response fields
data.idstring
Webhook endpoint identifier.
data.signingSecretstring
Secret used to verify signatures.
| Object | Description |
|---|---|
data.id string | Webhook endpoint identifier. |
data.signingSecret string | Secret used to verify signatures. |