Bitel
2.0.0
2.0.0
  • Introduction
  • Authorization
  • API Structure
  • General API Errors
  • SMS
    • Introduction
    • Template SMS
    • OTP SMS
    • Single SMS
    • Batch SMS
    • Batch P2P SMS
    • SMS Status
  • Call
    • Introduction
    • OTP Call
    • Single Call
    • Single TTS Call
    • Batch Call
    • Batch TTS Call
    • Call Status
  • Webhook
    • Sms Webhook Events
    • Voice Webhook Events
  • Files
    • Introduction
    • Upload Voice
    • Text To Speech
    • Download Voice
  • Code Samples
    • C#
    • PHP
    • Python
Powered by GitBook
On this page

Was this helpful?

  1. Call

Batch TTS Call

Convert text to voice and play it for multiple(up to 100) phone number

POST https://api.bitel.rest/api/v2/voice/batch/tts

Request Body

Name
Type
Description

phoneNumbers

string

target phone number. example: 0912*******

text

string

the text that is played for the user

retryCount

number

how many times the call is retried if the number if either busy or doesn't answer(default = 1)

serverId

string

Identifier of dialer from which the voice will be originated

{
  "result": [
    {
      "id": "755021ff3bfd4669af3145b285297756",
      "phoneNumber": "0912*******",
      "status": "WAITING",
      "statusCode": 0,
      "billSec": 0,
      "requestDate": 1564643999,
      "executionDate": 0,
      "price": 0.0
    },
    {
      "id": "b694d5431c654c4082aa4a2de82ee5f2",
      "phoneNumber": "0912*******",
      "status": "WAITING",
      "statusCode": 0,
      "billSec": 0,
      "requestDate": 1564643999,
      "executionDate": 0,
      "price": 0.0
    }
  ],
  "error": null
}
{
  "phoneNumbers": [
    "0912*******"
  ],
  "text": "Hi, there",
  "retryCount": 3
}

Sample Response

{
  "result": [
    {
      "id": "755021ff3bfd4669af3145b285297756",
      "phoneNumber": "0912*******",
      "status": "WAITING",
      "statusCode": 0,
      "billSec": 0,
      "requestDate": 1564643999,
      "executionDate": 0,
      "price": 0.0
    },
    {
      "id": "b694d5431c654c4082aa4a2de82ee5f2",
      "phoneNumber": "0912*******",
      "status": "WAITING",
      "statusCode": 0,
      "billSec": 0,
      "requestDate": 1564643999,
      "executionDate": 0,
      "price": 0.0
    }
  ],
  "error": null
}

Make sure to store the "id" of the response in order to get the call status

Error Codes

Code

Description

InvalidRequest

Indicates that the submitted request is invalid

InvalidServer

Indicates that the selected server id is invalid

Make sure to store the campaignId returned from the response

PreviousBatch CallNextCall Status

Last updated 5 years ago

Was this helpful?

To understand the definition of the response, refer to

Call Status