How-to
Article MarkdownReport an error

How to Send Phone Broadcast via Route

The /kw/api/broadcast/route API endpoint allows sending messages by broadcast template via external call. This is useful for automating broadcasts from your systems.


Endpoint

POST https://engine-{{instance_name}}.connectiveone.io/kw/api/broadcast/route

Authorization

Using x-auth-token in headers, make a POST request.

Example headers:

Content-Type: application/json
x-auth-token: YOUR_TOKEN

⚠️ Important: The x-auth-token token must be valid for your instance. Contact the support team to obtain the token.


Request Parameters

In the request body, pass the following data:

Parameter Type Required Description
bot_id integer Bot ID that will perform the broadcast
phone string User phone number in international format (without + sign)
template_id integer Broadcast template ID on the instance

Example Request

{
  "phone": "380662094811",
  "bot_id": 69,
  "template_id": 1
}

Example curl request:

curl -X POST \
  https://engine-instancename.connectiveone.io/kw/api/broadcast/route \
  -H "Content-Type: application/json" \
  -H "x-auth-token: YOUR_TOKEN" \
  -d '{
    "phone": "380662094811",
    "bot_id": 69,
    "template_id": 1
  }'

Response Format

200 - Success

Request successfully processed, broadcast should go through.

Example response:

{
  "status": "success",
  "message": "Broadcast scheduled"
}

404 - Not Found

User not found or broadcast template doesn't exist.

Example response:

{
  "status": "error",
  "message": "User not found or template does not exist"
}

422 - Validation Error

Invalid token or some data in the request body is incorrect.

Example response:

{
  "status": "error",
  "message": "Invalid token or request data"
}

Limitations

  • Phone number must be in international format (without + sign)
  • bot_id must match an existing bot
  • template_id must match an existing broadcast template
  • User must be registered in the system and have subscription to notifications

Using your own AI agent?Install the open skill so your AI agent can work with current official ConnectiveOne documentation.Get the skillNeed support?Couldn’t find the answer or need help from the ConnectiveOne team? Create a request in Client Portal.Create a request