Send message Voice APIs
Use these Voice API examples to send voice call templates, interactive voice call messages, call permission request templates, and interactive call permission request messages.
Endpoint details
| Field | Value |
|---|---|
| URL | https://apis.rmlconnect.net/wba/v1/messages |
| Authorization header | Authorization: XXXX |
| Content-Type | application/json |
Voice API examples
Send a voice call template using a media template payload.
Send an interactive voice call message with a CTA-style call action.
Send a call permission request template using a media template payload.
Send an interactive call permission request message.
Request examples
Send voice call template
Use this example to send a voice call template with the media_template message type.
curl --location 'https://apis.rmlconnect.net/wba/v1/messages' \
--header 'Authorization: XXXX' \
--header 'Content-Type: application/json' \
--data '{
"phone": "+91810686XXXX",
"media": {
"type": "media_template",
"template_name": "testing_voice_call_22_april",
"lang_code": "en_US",
"button": [
{
"button_no": "1",
"voice_call": "10"
}
]
}
}'Send interactive voice call message
Use this example to send an interactive voice call message with a button that prompts the recipient to call.
curl --location 'https://apis.rmlconnect.net/wba/v1/messages' \
--header 'Authorization: XXXX' \
--header 'Content-Type: application/json' \
--data '{
"phone": "+91810686XXXX",
"enable_acculync": false,
"media": {
"type": "interactive_voice_call",
"header": {
"text": "This is the header"
},
"body": "This is the body of the message",
"action": {
"parameters": {
"display_text": "Call us now",
"ttl_minutes": "1"
}
}
}
}'Send call permission request template
Use this example to send a call permission request template with body variables.
curl --location 'https://apis.rmlconnect.net/wba/v1/messages' \
--header 'Authorization: XXXX' \
--header 'Content-Type: application/json' \
--data '{
"phone": "+91810686XXXX",
"media": {
"type": "media_template",
"template_name": "testing_call_permission_request_23_april",
"lang_code": "en",
"body": [
{
"text": "12345"
},
{
"text": "potatos"
}
]
}
}'Send interactive call permission request message
Use this example to send an interactive call permission request message with a body explaining why you want to call the recipient.
curl --location 'https://apis.rmlconnect.net/wba/v1/messages' \
--header 'Authorization: XXXX' \
--header 'Content-Type: application/json' \
--data '{
"phone": "+91810686XXXX",
"enable_acculync": false,
"media": {
"type": "call_permission_request",
"body": "We would like to call you to help you regarding your query on your recent order"
}
}'Updated 11 days ago