Send Voice Message (RESTful API)
Call the batchcalls API to send voice messages.
- Url:https://api.uspeedo.com/voice/v1/batchcalls
- Method:Post
Request Parameters
Parameter name | Type | Description | Required |
---|---|---|---|
accountId | number | Account ID | Yes |
batch | []BatchModel | Batch Submission of Information | Yes |
BatchModel
Parameter name | Type | Description | Default | Required |
---|---|---|---|---|
destination | string | Phone number: +12344232311 | "" | Yes |
templateId | string | Fetch from Console: https://console.uspeedo.com/vms/template | "" | Yes |
repetition | number | Default non-repeating, enumeration values: 1, 2, 3 | 1 | No |
Response Elements
Parameter name | Type | Description | Default | Required |
---|---|---|---|---|
batchId | string | Batch submission of ID | Yes | |
totalCount | number | Total number of submissions | 0 | Yes |
acceptedCount | number | Total number of calls | 0 | Yes |
failureBatch | []FailurBatch | Phone numbers with failed submissions | [] | No |
retCode | number | Return Code: 0 SUCCESS, others ERROR | 0 | Yes |
message | string | Error message when retCode not equals 0 | "" | Yes |
FailurBatch
Parameter name | Type | Description | Default | Required |
---|---|---|---|---|
status | FailurBatchStatus | Information on failed calls | Yes | |
destination | string | The phone number for the call | "" | No |
FailurBatchStatus
Parameter name | Type | Description | Default | Required |
---|---|---|---|---|
code | number | 0 SUCCESS, others ERROR | 0 | Yes |
message | string | Error message when code not equals 0 | "" | No |
timestamp | number | Submission Failure Time | 0 | No |
Request Body Example
{
"accountId": "120023",
"batch": [
{
"destination": "string",
"repetition": 0,
"templateId": "string"
}
]
}
Response Example
{
"retCode": 0,
"message": "string",
"batchId": "string",
"acceptedCount": 0,
"totalCount": 0
"failureBatch": [
{
"destination": "string",
"status": {
"code": 0,
"message": "string",
"timestamp": 0
}
}
]
}