Skip to main content
GET
/
whatsapp
/
{phoneNumberId}
/
templates
Listar plantillas de WhatsApp
curl --request GET \
  --url https://api.insuranceboosters.com/api/v1/whatsapp/{phoneNumberId}/templates \
  --header 'x-ib-api-key: <api-key>'
import requests

url = "https://api.insuranceboosters.com/api/v1/whatsapp/{phoneNumberId}/templates"

headers = {"x-ib-api-key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'x-ib-api-key': '<api-key>'}};

fetch('https://api.insuranceboosters.com/api/v1/whatsapp/{phoneNumberId}/templates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
const options = {method: 'GET', headers: {'x-ib-api-key': '<api-key>'}};

fetch('https://api.insuranceboosters.com/api/v1/whatsapp/{phoneNumberId}/templates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
const url = 'https://api.insuranceboosters.com/api/v1/whatsapp/{phoneNumberId}/templates';
const options = {method: 'GET', headers: {'x-ib-api-key': '<api-key>'}};

fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));
HttpResponse<String> response = Unirest.get("https://api.insuranceboosters.com/api/v1/whatsapp/{phoneNumberId}/templates")
.header("x-ib-api-key", "<api-key>")
.asString();
using RestSharp;


var options = new RestClientOptions("https://api.insuranceboosters.com/api/v1/whatsapp/{phoneNumberId}/templates");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("x-ib-api-key", "<api-key>");
var response = await client.GetAsync(request);

Console.WriteLine("{0}", response.Content);
using RestSharp;


var options = new RestClientOptions("https://api.insuranceboosters.com/api/v1/whatsapp/{phoneNumberId}/templates");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("x-ib-api-key", "<api-key>");
var response = await client.GetAsync(request);

Console.WriteLine("{0}", response.Content);
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.insuranceboosters.com/api/v1/whatsapp/{phoneNumberId}/templates"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("x-ib-api-key", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
require 'uri'
require 'net/http'

url = URI("https://api.insuranceboosters.com/api/v1/whatsapp/{phoneNumberId}/templates")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-ib-api-key"] = '<api-key>'

response = http.request(request)
puts response.read_body
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.insuranceboosters.com/api/v1/whatsapp/{phoneNumberId}/templates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-ib-api-key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
val client = OkHttpClient()

val request = Request.Builder()
.url("https://api.insuranceboosters.com/api/v1/whatsapp/{phoneNumberId}/templates")
.get()
.addHeader("x-ib-api-key", "<api-key>")
.build()

val response = client.newCall(request).execute()
false
import Foundation

let url = URL(string: "https://api.insuranceboosters.com/api/v1/whatsapp/{phoneNumberId}/templates")!
var request = URLRequest(url: url)
request.httpMethod = "GET"
request.timeoutInterval = 10
request.allHTTPHeaderFields = ["x-ib-api-key": "<api-key>"]

let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self))
$headers=@{}
$headers.Add("x-ib-api-key", "<api-key>")
$response = Invoke-WebRequest -Uri 'https://api.insuranceboosters.com/api/v1/whatsapp/{phoneNumberId}/templates' -Method GET -Headers $headers
{
  "data": [
    {
      "id": "<string>",
      "name": "<string>",
      "language": "<string>",
      "status": "<string>",
      "category": "<string>",
      "components": [
        {}
      ]
    }
  ],
  "paging": {
    "cursors": {
      "before": "<string>",
      "after": "<string>"
    },
    "next": "<string>",
    "previous": "<string>"
  }
}
{
"error": "<string>",
"message": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}
Obtiene las plantillas de WhatsApp aprobadas asociadas a tu línea.

Endpoint

GET /whatsapp/{phoneNumberId}/templates
URL completa: https://api.insuranceboosters.com/api/v1/whatsapp/{phoneNumberId}/templates

Autenticación

x-ib-api-key: <tu-api-key>

Parámetros de ruta

ParámetroDescripción
phoneNumberIdIdentificador de tu línea de WhatsApp. Solicítalo con tu ejecutivo de cuenta si no lo tienes.

Paginación (opcional)

Si la respuesta incluye paging.next, hay más plantillas en páginas siguientes. Para obtenerlas, repite la solicitud agregando el parámetro de consulta nextUrl con el valor exacto de paging.next:
GET /whatsapp/{phoneNumberId}/templates?nextUrl=<valor-de-paging.next>
Si la respuesta solo trae paging.cursors y no incluye paging.next, ya recibiste todos los resultados de esa consulta. Esto es normal cuando todas las plantillas caben en una sola página.

Respuesta exitosa (200)

Cada elemento de data incluye, entre otros campos:
CampoDescripción
idIdentificador de la plantilla.
nameNombre de la plantilla (úsalo al enviar).
languageIdioma de la plantilla (úsalo al enviar).
statusEstado de aprobación (ej. APPROVED).
categoryCategoría (ej. UTILITY, MARKETING).
parameter_formatFormato de variables: NAMED o POSITIONAL.
componentsEstructura de la plantilla (body, footer, botones, etc.).

Ejemplo de respuesta

{
  "data": [
    {
      "id": "1234567890123456",
      "name": "recordatorio_pago",
      "language": "es",
      "status": "APPROVED",
      "category": "UTILITY",
      "parameter_format": "NAMED",
      "components": [
        {
          "type": "BODY",
          "text": "Hola, {{nombre}} 👋\n\nTe escribimos para avisarte que se acerca el pago de tu seguro...",
          "example": {
            "body_text_named_params": [
              { "param_name": "nombre", "example": "María" },
              { "param_name": "monto", "example": "$1,500" }
            ]
          }
        },
        {
          "type": "FOOTER",
          "text": "Acme Seguros | Asesoría"
        },
        {
          "type": "BUTTONS",
          "buttons": [
            { "type": "QUICK_REPLY", "text": "Contactar asesor" }
          ]
        }
      ]
    }
  ],
  "paging": {
    "cursors": {
      "before": "QVFIUzBGX3lK...",
      "after": "QVFIU3YtcHlY..."
    }
  }
}
Cuando hay más páginas, la respuesta también incluye paging.next con la URL para la siguiente consulta. Usa name, language y parameter_format al armar el payload de Enviar plantilla.

Errores frecuentes

HTTPQué significaQué hacer
401API key inválida o faltante.Verifica x-ib-api-key o solicítala con tu ejecutivo de cuenta.
403La línea no pertenece a tu cuenta.Confirma el phoneNumberId con tu ejecutivo de cuenta.
404La línea no existe.Confirma el identificador de la línea.
400La línea no está configurada para consultar plantillas.Contacta soporte.

Authorizations

x-ib-api-key
string
header
required

API key emitida por Insurance Boosters.

Path Parameters

phoneNumberId
string
required

Identificador de tu línea de WhatsApp. Solicítalo con tu ejecutivo de cuenta.

Query Parameters

nextUrl
string

URL completa de la página siguiente. Solo úsala cuando la respuesta anterior incluya paging.next; pásala como valor de este parámetro.

Response

Listado de plantillas.

data
object[]
paging
object