Skip to main content
POST
/
v2
/
webhooks
/
register
Register Webhook
curl --request POST \
  --url https://app.closerx.ai/api/v2/webhooks/register/ \
  --header 'Company-Name: <company-name>' \
  --header 'Content-Type: application/json' \
  --header 'api_key: <api-key>' \
  --data '
{
  "webhook_url": "https://webhook.site/abcdef123456",
  "description": "This is a test webhook to capture call start and end events.",
  "agent_ids": [
    "549"
  ],
  "events_to_subscribe": [
    "call.started",
    "call.ended"
  ]
}
'
{
  "message": "Webhook registered successfully!",
  "data": {
    "id": 25,
    "webhook_url": "https://webhook.site/abcdef123456",
    "description": "This is a test webhook to capture call start and end events.",
    "agents": [
      {
        "id": 549,
        "agent_name": "vinay dan 2"
      }
    ],
    "events_to_subscribe": [
      "call.started"
    ]
  }
}

Authorizations

api_key
string
header
required

Headers

Company-Name
string
required

Schema name for multi-tenancy

Body

application/json
webhook_url
string<uri>
required

URL to send webhook payloads to

Example:

"https://webhook.site/abcdef123456"

description
string
required

Description of the webhook purpose

Example:

"This is a test webhook to capture call start and end events."

agent_ids
string[]
required

List of agent IDs this webhook is associated with

events_to_subscribe
string[]
required

List of events to subscribe to (e.g. call.started, call.ended)

Response

Webhook registered successfully

message
string
Example:

"Webhook registered successfully!"

data
object