AmarVoice API

Voice Broadcasting API Documentation

Version 1.0

Base URL: api.awajdigital.com/v1

Authentication

All API requests require authentication using a Bearer token. You can obtain your API token from your dashboard account settings.

Important: Keep your API token secure and never share it publicly.

Example Request Header

Authorization: Bearer your_api_token_here
POST /v1/broadcasts

Broadcast to Multiple Numbers

Send voice messages to multiple phone numbers in a single API call. Perfect for bulk announcements, notifications, or marketing campaigns.

Request Parameters

Parameter Type Required Description
voice string Yes Name of your approved voice
sender string Yes Your active caller sender number
phone_numbers array Yes Array of Bangladeshi phone numbers (01XXXXXXXXX format, max 999 numbers)

Request Example (cURL)

See API documentation for full cURL example

Success Response Example

{
"success": true,
"data": {
"broadcast_id": "broadcast_1234567890",
"status": "queued",
"total_recipients": 3,
"successful_deliveries": 0,
"failed_deliveries": 0,
"created_at": "2024-01-15T10:30:00Z"
},
"message": "Broadcast created successfully"
}

OTP Broadcast

Send OTP (One-Time Password) voice messages to a single phone number. The voice must contain at least one dynamic part with digit mode.

Request Parameters

Parameter Type Required Description
voice string Yes Name of your approved voice with digit mode
sender string Yes Your active caller sender number
phone_number string Yes Single Bangladeshi phone number (01XXXXXXXXX format)
otp_code string Yes OTP code (4-6 digits)

Request Example (cURL)

See API documentation for full cURL example

Success Response Example

{
"success": true,
"data": {
"broadcast_id": "otp_broadcast_1234567890",
"status": "queued",
"phone_number": "01XXXXXXXXX",
"otp_code": "123456",
"created_at": "2024-01-15T10:30:00Z"
},
"message": "OTP broadcast created successfully"
}

Error Responses

The API uses standard HTTP status codes and returns error details in JSON format.

401 Unauthorized

Invalid or missing API token

Error: Unauthorized access

403 Forbidden

Voice not found, not approved, or sender not active

Error: Voice not found or not approved

400 Bad Request

Invalid request parameters or validation errors

Error: Invalid phone number format

500 Internal Server Error

Server error occurred while processing the request

Error: Failed to create broadcast