Single TTS Call

Convert text to voice and play it for single phone number

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

Request Body

Name
Type
Description

phoneNumber

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": "69b9e312e3b64b3880760639f5dfdffa",
    "phoneNumber": "0912*******",
    "status": "WAITING",
    "statusCode": 0,
    "billSec": 0,
    "requestDate": 1564640750,
    "executionDate": 0,
    "price": 0.0
  },
  "error": null
}

Sample Request

{
    "phoneNumber": "0912*******",
    "text": "Hi there"
}

Sample Response

{
  "result": {
    "id": "69b9e312e3b64b3880760639f5dfdffa",
    "phoneNumber": "0912*******",
    "status": "WAITING",
    "statusCode": 0,
    "billSec": 0,
    "requestDate": 1564640750,
    "executionDate": 0,
    "price": 0.0
  },
  "error": null
}

To understand the definition of the response, refer to Call Status

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 requestId returned from the response

Last updated