List templates description

The List templates API is part of Voiso's WhatsApp Digital Messages APIs.

Please refer to the detailed API endpoint specification: List templates

Purpose

To obtain a list of all your contact center WhatsApp message template names and details.

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.voiso.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 Voiso. ¿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.