Automatic Voice Calls
Voice calls are a tool for mass calling subscribers to quickly deliver audio information.
Audio mailing can be launched through the user cabinet or via the JSON API.
URI: /api/voice.php
All requests to API are sent in JSON format using the POST method.
Header parameters
Requests must contain header Content-Type: multipart/form-data.
Request parameters
Request example
curl -L -X POST 'https://endpoint.net/api/voice.php' \
-F 'key="bb56a4369eb19***cfec6d1776bd25"' \
-F 'phone="380501234567" \
-F 'voice=@"audio.wav"' \
-F 'hook="https://webhook.url/webhook.php?id=123456"' \
-F 'dtmf=true'
Response examples
- Successful
- API key missing
- Webhook
HTTP Status Code: 200
Content Type: JSON application/json
{
"id": 100500,
"price": 0.4
}
HTTP Status Code: 200
Content Type: JSON application/json
{
"errors": [
"API key missing"
]
}
HTTP Status Code: 200
Content Type: JSON application/json
{
"id": 100500,
"phone": "380501234567",
"status": "ANSWERED",
"duration": 123,
"dtmf": "7"
}