Template management Voice APIs

Use these Voice API examples to create and update WhatsApp voice call templates and call permission request templates.

Endpoint details

ActionURL
Create templatehttps://apis.rmlconnect.net/wba/template/create
Update templatehttps://apis.rmlconnect.net/wba/template/update

Common headers

HeaderValue
Authorization{{rml_auth_token}}
Content-Typeapplication/json

Template types

Voice Call Template

Create or update a template with a voice call button.

Combined Button Voice Call Template

Create or update a combined button template that includes a voice call button.

Call Permission Request Media Template

Create or update a call permission request template with a media-style header and body.

Call Permission Request Message Template

Create or update a call permission request message template with body text.

Call Permission Request for Interactive Templates

Create or update a call permission request template with interactive buttons.

Call Permission Request for Combined Buttons Templates

Create or update a call permission request template with combined buttons.

Request examples

Voice Call Template

Create template request

curl --location 'https://apis.rmlconnect.net/wba/template/create' \
--header 'Authorization: {{rml_auth_token}}' \
--header 'Content-Type: application/json' \
--data '{
  "template_name": "voicecalltemplate5",
  "language": [
    "en"
  ],
  "template_type": "template",
  "template_category": "UTILITY",
  "components": {
    "header": {
      "type": "text",
      "text": "header - text"
    },
    "body": {
      "text": "You can call us on WhatsApp now for faster service!"
    },
    "buttons": {
      "type": "VOICE_CALL",
      "elements": [
        {
          "text": "Call Now"
        }
      ]
    }
  }
}'

Update template request

curl --location --request PATCH 'https://apis.rmlconnect.net/wba/template/update' \
--header 'Authorization: {{rml_auth_token}}' \
--header 'Content-Type: application/json' \
--data '{
  "template_name": "voicecalltemplate4",
  "components": {
    "header": {
      "type": "text",
      "text": "header - text"
    },
    "body": {
      "text": "You can call us on WhatsApp now for faster service!"
    },
    "buttons": {
      "type": "VOICE_CALL",
      "elements": [
        {
          "text": "Call Now"
        }
      ]
    }
  }
}'
Combined Button Voice Call Template

Create template request

curl --location 'https://apis.rmlconnect.net/wba/template/create' \
--header 'Authorization: {{rml_auth_token}}' \
--header 'Content-Type: application/json' \
--data '{
  "template_name": "voicecallcombinedbuttontemplate1",
  "language": [
    "en_US"
  ],
  "template_type": "template",
  "template_category": "UTILITY",
  "call_permission_request": true,
  "components": {
    "header": {
      "type": "text",
      "text": "header - text"
    },
    "body": {
      "text": "test for body - 1"
    },
    "buttons": {
      "type": "combined_buttons",
      "elements": [
        {
          "type": "copy_code",
          "example": "AEBDGH"
        },
        {
          "text": "Hello World"
        },
        {
          "type": "VOICE_CALL",
          "text": "Call Now"
        }
      ]
    }
  }
}'

Update template request

curl --location --request PATCH 'https://apis.rmlconnect.net/wba/template/update' \
--header 'Authorization: {{rml_auth_token}}' \
--header 'Content-Type: application/json' \
--data '{
  "template_name": "voicecallcombinedbuttontemplate1",
  "language": [
    "en_US"
  ],
  "template_type": "template",
  "template_category": "UTILITY",
  "call_permission_request": true,
  "components": {
    "header": {
      "type": "text",
      "text": "header - text"
    },
    "body": {
      "text": "test for body - 1"
    },
    "buttons": {
      "type": "combined_buttons",
      "elements": [
        {
          "type": "copy_code",
          "example": "AEBDGH"
        },
        {
          "text": "Hello World"
        },
        {
          "type": "VOICE_CALL",
          "text": "Call Now"
        }
      ]
    }
  }
}'
Call Permission Request Media Template

Create template request

curl --location 'https://apis.rmlconnect.net/wba/template/create' \
--header 'Authorization: {{rml_auth_token}}' \
--header 'Content-Type: application/json' \
--data '{
  "template_name": "callpermissionrequest5",
  "language": [
    "en"
  ],
  "call_permission_request": true,
  "template_type": "template",
  "template_category": "UTILITY",
  "components": {
    "header": {
      "type": "text",
      "text": "header"
    },
    "body": {
      "text": "You can call us on WhatsApp now for faster service!"
    }
  }
}'

Update template request

curl --location --request PATCH 'https://apis.rmlconnect.net/wba/template/update' \
--header 'Authorization: {{rml_auth_token}}' \
--header 'Content-Type: application/json' \
--data '{
  "template_name": "callpermissionrequest1",
  "language": [
    "en"
  ],
  "call_permission_request": true,
  "template_type": "template",
  "template_category": "UTILITY",
  "components": {
    "header": {
      "type": "text",
      "text": "header"
    },
    "body": {
      "text": "You can call us on WhatsApp now for faster service!"
    }
  }
}'
Call Permission Request Message Template

Create template request

curl --location 'https://apis.rmlconnect.net/wba/template/create' \
--header 'Authorization: {{rml_auth_token}}' \
--header 'Content-Type: application/json' \
--data '{
  "template_name": "callpermissionrequest6",
  "language": [
    "en"
  ],
  "call_permission_request": true,
  "template_type": "template",
  "template_category": "UTILITY",
  "components": {
    "body": {
      "text": "You can call us on WhatsApp now for faster service!"
    }
  }
}'

Update template request

curl --location --request PATCH 'https://apis.rmlconnect.net/wba/template/update' \
--header 'Authorization: {{rml_auth_token}}' \
--header 'Content-Type: application/json' \
--data '{
  "template_name": "callpermissionrequest1",
  "language": [
    "en"
  ],
  "call_permission_request": true,
  "template_type": "template",
  "template_category": "UTILITY",
  "components": {
    "header": {
      "type": "text",
      "text": "header"
    },
    "body": {
      "text": "You can call us on WhatsApp now for faster service!"
    }
  }
}'
Call Permission Request for Interactive Templates

Create template request

curl --location 'https://apis.rmlconnect.net/wba/template/create' \
--header 'Authorization: {{rml_auth_token}}' \
--header 'Content-Type: application/json' \
--data '{
  "template_name": "callpermissionrequest7",
  "language": [
    "en_US"
  ],
  "template_type": "template",
  "template_category": "UTILITY",
  "call_permission_request": true,
  "components": {
    "header": {
      "type": "text",
      "text": "header - text"
    },
    "body": {
      "text": "test for body - 1"
    },
    "buttons": {
      "type": "mpm",
      "elements": [
        {
          "text": "View items"
        }
      ]
    }
  }
}'

Update template request

curl --location --request PATCH 'https://apis.rmlconnect.net/wba/template/update' \
--header 'Authorization: {{rml_auth_token}}' \
--header 'Content-Type: application/json' \
--data '{
  "template_name": "callpermissionrequest4",
  "language": [
    "en_US"
  ],
  "template_type": "template",
  "template_category": "UTILITY",
  "call_permission_request": true,
  "components": {
    "header": {
      "type": "text",
      "text": "header - text"
    },
    "body": {
      "text": "test for body - 1"
    },
    "buttons": {
      "type": "mpm",
      "elements": [
        {
          "text": "View items"
        }
      ]
    }
  }
}'
Call Permission Request for Combined Buttons Templates

Create template request

curl --location 'https://apis.rmlconnect.net/wba/template/create' \
--header 'Authorization: {{rml_auth_token}}' \
--header 'Content-Type: application/json' \
--data '{
  "template_name": "callpermissionrequest8",
  "language": [
    "en_US"
  ],
  "template_type": "template",
  "template_category": "UTILITY",
  "call_permission_request": true,
  "components": {
    "header": {
      "type": "text",
      "text": "header - text"
    },
    "body": {
      "text": "test for body - 1"
    },
    "buttons": {
      "type": "combined_buttons",
      "elements": [
        {
          "type": "copy_code",
          "example": "AEBDGH"
        },
        {
          "text": "Hello World"
        }
      ]
    }
  }
}'

Update template request

curl --location --request PATCH 'https://apis.rmlconnect.net/wba/template/update' \
--header 'Authorization: {{rml_auth_token}}' \
--header 'Content-Type: application/json' \
--data '{
  "template_name": "callpermissionrequest5",
  "language": [
    "en_US"
  ],
  "template_type": "template",
  "template_category": "UTILITY",
  "call_permission_request": true,
  "components": {
    "header": {
      "type": "text",
      "text": "header - text"
    },
    "body": {
      "text": "test for body - 1"
    },
    "buttons": {
      "type": "combined_buttons",
      "elements": [
        {
          "type": "copy_code",
          "example": "AEBDGH"
        },
        {
          "text": "Hello World"
        }
      ]
    }
  }
}'


Did this page help you?