The request sends a message using the template of the API external call mailing.
Authorization
Using x-auth-token in the headers, we make a POST request and pass the following data in the request body:
- bot_id - the ID of the bot that will perform the mailing
- phone - the user's phone number
- template_id - the ID of the mailing template on the instance
Example:
{
"phone":"380662094811",
"bot_id": 69,
"template_id": 1
}
Possible HTTP response codes:
- 422 – Invalid token / some data in the request body
- 404 – User not found / mailing template
- 200 – Request processed successfully, mailing should go through