POST
/
campaigns
/
{campaignId}
/
webhook
/
subscribe
curl --request POST \
  --url https://api.voxia.ai/campaigns/{campaignId}/webhook/subscribe \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "url": "<string>",
  "events": [
    "POST_PROCESSING_FINISHED:INTERESTED",
    "POST_PROCESSING_FINISHED:NOT_INTERESTED",
    "POST_PROCESSING_FINISHED:CALL_ME_LATER",
    "POST_PROCESSING_FINISHED:WRONG_NUMBER",
    "POST_PROCESSING_FINISHED:DO_NOT_CALL"
  ],
  "isAdvanced": false,
  "advancedWebhook": {
    "url": "<string>",
    "method": "POST",
    "headers": [],
    "parameters": [],
    "body": ""
  }
}'
{
  "status": "success",
  "data": true
}

Authorizations

Authorization
string
header
required

Headers

x-sub-organization-id
string

Optional sub organization ID. Must belong to your main organization API key.

Path Parameters

campaignId
string
required

The campaign ObjectId as a string.

Body

application/json

Response

200
application/json

The response is of type object.