Skip to main content
POST
/
webhook
Create a webhook
curl --request POST \
  --url https://atoms-api.smallest.ai/api/v1/webhook \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "endpoint": "https://example.com/webhook",
  "description": "Webhook for conversation events",
  "events": [
    {
      "agentId": "60d0fe4f5311236168a109ca",
      "eventType": "post-conversation"
    }
  ]
}'
{
  "status": true,
  "data": "60d0fe4f5311236168a109ca"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
endpoint
string
required

The webhook endpoint URL

Example:

"https://example.com/webhook"

description
string
required

The description of the webhook

Example:

"Webhook for conversation events"

events
object[]
required

Array of events to subscribe to

Response

Webhook created successfully

status
boolean
Example:

true

data
string

The ID of the created webhook

Example:

"60d0fe4f5311236168a109ca"

I