List WhatsApp templates description

The List templates API is part of the WhatsApp Digital Messages APIs.

📢

This legacy information is part of v1, v2, or v3, which will be supported only until March 31, 2027. To avoid disruption, migrate your integration to v4 before that date. For endpoint mappings, Bearer token authentication, and scoped API key guidance, see the Migrating to v4 article in the Developer's Guide.

Please refer to the detailed API endpoint specification: List WhatsApp templates

WhatsApp

Use the Voiso WhatsApp outbound messaging API to send messages to contacts.

Purpose

To obtain a list of all your contact center WhatsApp message template names and details, use the List WhatsApp templates API.

The following associated details are also retrieved:

  • UUID: WhatsApp template identifier
  • Name: Template name
  • Category: Template type
  • Language: Language used in the template
  • Number: The phone number associated with the template
  • Body: The message text of the template

Prerequisites

Making requests

The List_templates API requires the Base URL (cluster_id) and the contact center API key (client_api_key). It uses the following parameters to initiate a call:

The key parameter is the contact center's API key. Voiso responds with a list of WhatsApp message templates and their details.

For example:

{
  "method": "GET",
  "url": "https://cluster1.contact_center_name.com/api/v3/messages/whatsapp/templates",
  "params": {
    "key": "cc7c76b8987a27ab5...b89b00ab6c3"
  }
}

Response

The following table describes the elements of the response.

ElementDescriptionTypeNotes
uuidThe unique ID number of the template.stringUse this value to populate the template_uuid field when sending messages.
nameThe name of the template. It must conform to WhatsApp's naming standards.string
categoryThe WhatsApp template category name.string
languageThe two- or four-letter language code indicates the template's language.string
bodyThe text of the the template.stringThe body may include placeholder parameters.
numberThe business phone number associated with the template.string

Response sample

{
    "templates": [
        {
            "uuid": "5f87aa44-2b9d-4c52-a715-b9d43718b8df",
            "name": "my_internal_test",
            "category": "MARKETING",
            "language": "en_US",
            "body": "Thank you for contacting us! Reply to this message if you want to continue the conversation",
            "number": "16555215555"
        },
        {
            "uuid": "78dc4eaa-397a-4d53-9f0e-9b781abc2c3d",
            "name": "impulsa_tu_centro_de_contacto_003",
            "category": "MARKETING",
            "language": "es-MX",
            "body": "Hola, soy Oskars de <BrandName />. ¿Quieres disfrutar de los beneficios de enviar mensajes profesionales con tu marca directamente a tus clientes a través de WhatsApp? ¡Eso ayuda a hacer crecer el negocio y retener a los clientes!",
            "number": "16555215555"
        },
    ]
}

Troubleshooting

The following issues are sometimes encountered:

The API key specified is invalid

The Listtemplates API requires the contact center API key to validate the request. If you see this error, "error": "The API key specified is invalid", check that you are using the correct contact center API key. For more information about API keys, refer to Authentication.