Skip to main content

Commercial Call - API

Endpoint

The journey to seamless marketing starts here:

https://api.betatel.com/api/v1/callgen/call/commercial

Method: POST

This endpoint initiates commercial calls, enabling the delivery of pre-crafted marketing messages through a one-way communication channel. The AI agent speaks your message clearly and professionally, ensuring your promotions reach customers effortlessly.

Headers

Proper configuration of headers is key to ensuring secure and successful communication. Here’s what you’ll need:

ParamValueDescription
Content-typeapplication/jsonSpecifies the format of your payload.
x-api-key{{x-api-key}}Your unique API key for secure access.
x-user-id{{x-user-id}}Your user identifier for added security and tracking.

Request Body

The request body is where you define the details of the commercial call—who receives the message, what the message says, and how it should be delivered.

Example of body
{
"callee": "38722222222",
"caller": "38111111111",
"text":"Hello! This is an exclusive offer just for you from [Your Brand Name]. Enjoy 20% off your next purchase when you shop with us before 23.02. Don’t miss out on this limited-time deal! Visit our website or nearest store today to take advantage of this special discount. Thank you for being a valued customer!",
"language":"en",
"maxRingTime": 10
}
FieldTypeRequiredDescription
textstringYesThe message content to deliver to your customer.
calleestringYesThe recipient’s phone number in international format.
callerstringYesThe verification code to send (visible as the caller ID during the flash call).
maxRingTimeintegerNoMaximum duration for the call to ring, in seconds (default: 5).
languagestringNoLanguage of the message (default: en).

Code Snippets

Integrating the Commercial Call API into your system is simple. Below are examples for various programming languages.

Example - cURL
curl --location 'https://dev.api.betatel.com/api/v1/callgen/call/commercial' \
--header 'x-api-key: 5326eed0b6f7a83a5bb08e8f5a5e6510a74eff7596736fdc80f09c7242a16f42' \
--header 'x-user-id: 675aed6103dee9ca55a36a9a' \
--header 'Content-Type: application/json' \
--data '{
"callee": "38722222222",
"caller": "38111111111",
"text":"Hello! This is an exclusive offer just for you from [Your Brand Name]. Enjoy 20% off your next purchase when you shop with us before 23.02. Don’t miss out on this limited-time deal! Visit our website or nearest store today to take advantage of this special discount. Thank you for being a valued customer!",
"language":"en",
"maxRingTime": 10
}'

Response

Once the call is initiated, the API will return a response confirming the operation:

JSON Schema:

{
"uuid": "string"
}
  • uuid: A unique identifier to track the call and verify its status.

Congratulations

You’ve just unlocked a new way to connect with your customers! With the Commercial Call API, you can transform your marketing strategy by delivering personalized voice messages directly to your audience. Whether it’s a promotion, announcement, or exclusive offer, Betatel ensures your message is heard loud and clear. Start your journey today!