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

FieldValue
URLhttps://apis.rmlconnect.net/wba/v1/messages
Authorization headerAuthorization: XXXX
Content-Typeapplication/json

Voice API examples

Send voice call template

Send a voice call template using a media template payload.

Send interactive voice call message

Send an interactive voice call message with a CTA-style call action.

Send call permission request template

Send a call permission request template using a media template payload.

Send interactive call permission request message

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"
  }
}'


Did this page help you?