curl --request GET \
--url https://api.routa.chat/v1/templates/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.routa.chat/v1/templates/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.routa.chat/v1/templates/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.routa.chat/v1/templates/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.routa.chat/v1/templates/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "tmpl_01J8ZK9M3Q7XABCDEFGHJKMNPQ",
"channel": "chan_01J8ZK9M3Q7XABCDEFGHJKMNPQ",
"name": "confirmacao_pedido",
"language": "pt_BR",
"category": "marketing",
"body_text": "Olá {{1}}! Seu pedido {{2}} foi confirmado.",
"variables": [
{
"index": 1,
"example": "Ana"
}
],
"status": "draft",
"rejection_reason": "abusive_content",
"failure_code": null,
"failure_detail": null,
"deletion_requested": false,
"deletion_failure_detail": null,
"origin": "routa",
"read_only": false,
"unsupported_components": [],
"created_at": "2026-09-04T13:22:41.031Z",
"updated_at": "2026-09-04T13:22:41.031Z",
"components": {
"header": {
"kind": "text",
"text": "<string>",
"example": "<string>"
},
"footer": {
"text": "<string>"
},
"buttons": [
{
"kind": "quick_reply",
"text": "<string>"
}
]
}
}{
"error": {
"type": "invalid_request_error",
"code": "channel_inactive",
"message": "Channel chan_01J8... is not active and cannot send messages.",
"request_id": "req_01J8ZK9M3Q7XABCDEFGHJKMNPQ",
"param": "components.buttons.0.example",
"doc_url": "<string>",
"details": {}
}
}{
"error": {
"type": "invalid_request_error",
"code": "channel_inactive",
"message": "Channel chan_01J8... is not active and cannot send messages.",
"request_id": "req_01J8ZK9M3Q7XABCDEFGHJKMNPQ",
"param": "components.buttons.0.example",
"doc_url": "<string>",
"details": {}
}
}{
"error": {
"type": "invalid_request_error",
"code": "channel_inactive",
"message": "Channel chan_01J8... is not active and cannot send messages.",
"request_id": "req_01J8ZK9M3Q7XABCDEFGHJKMNPQ",
"param": "components.buttons.0.example",
"doc_url": "<string>",
"details": {}
}
}{
"error": {
"type": "invalid_request_error",
"code": "channel_inactive",
"message": "Channel chan_01J8... is not active and cannot send messages.",
"request_id": "req_01J8ZK9M3Q7XABCDEFGHJKMNPQ",
"param": "components.buttons.0.example",
"doc_url": "<string>",
"details": {}
}
}Consultar template
Retorna um template com o status de aprovação atual. Se ele foi rejeitado, rejection_reason indica o motivo. Se a Routa não conseguiu submetê-lo (status: failed), failure_code indica o motivo e failure_detail traz a frase do provedor, quando ele a deu. Pela API, é preciso criar o template de novo. No painel, um template failed ou rejected pode ser editado e reenviado.
Quando uma exclusão feita no painel está em andamento, deletion_requested é true e o template não pode ser usado para enviar.
curl --request GET \
--url https://api.routa.chat/v1/templates/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.routa.chat/v1/templates/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.routa.chat/v1/templates/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.routa.chat/v1/templates/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.routa.chat/v1/templates/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "tmpl_01J8ZK9M3Q7XABCDEFGHJKMNPQ",
"channel": "chan_01J8ZK9M3Q7XABCDEFGHJKMNPQ",
"name": "confirmacao_pedido",
"language": "pt_BR",
"category": "marketing",
"body_text": "Olá {{1}}! Seu pedido {{2}} foi confirmado.",
"variables": [
{
"index": 1,
"example": "Ana"
}
],
"status": "draft",
"rejection_reason": "abusive_content",
"failure_code": null,
"failure_detail": null,
"deletion_requested": false,
"deletion_failure_detail": null,
"origin": "routa",
"read_only": false,
"unsupported_components": [],
"created_at": "2026-09-04T13:22:41.031Z",
"updated_at": "2026-09-04T13:22:41.031Z",
"components": {
"header": {
"kind": "text",
"text": "<string>",
"example": "<string>"
},
"footer": {
"text": "<string>"
},
"buttons": [
{
"kind": "quick_reply",
"text": "<string>"
}
]
}
}{
"error": {
"type": "invalid_request_error",
"code": "channel_inactive",
"message": "Channel chan_01J8... is not active and cannot send messages.",
"request_id": "req_01J8ZK9M3Q7XABCDEFGHJKMNPQ",
"param": "components.buttons.0.example",
"doc_url": "<string>",
"details": {}
}
}{
"error": {
"type": "invalid_request_error",
"code": "channel_inactive",
"message": "Channel chan_01J8... is not active and cannot send messages.",
"request_id": "req_01J8ZK9M3Q7XABCDEFGHJKMNPQ",
"param": "components.buttons.0.example",
"doc_url": "<string>",
"details": {}
}
}{
"error": {
"type": "invalid_request_error",
"code": "channel_inactive",
"message": "Channel chan_01J8... is not active and cannot send messages.",
"request_id": "req_01J8ZK9M3Q7XABCDEFGHJKMNPQ",
"param": "components.buttons.0.example",
"doc_url": "<string>",
"details": {}
}
}{
"error": {
"type": "invalid_request_error",
"code": "channel_inactive",
"message": "Channel chan_01J8... is not active and cannot send messages.",
"request_id": "req_01J8ZK9M3Q7XABCDEFGHJKMNPQ",
"param": "components.buttons.0.example",
"doc_url": "<string>",
"details": {}
}
}Autorizações
Resposta
Sucesso
O corpo do template, com os placeholders {{1}}, {{2}}, … É null só em um template importado e somente leitura (read_only), que a Routa não consegue reproduzir.
"Olá {{1}}! Seu pedido {{2}} foi confirmado."
Estado de aprovação. Somente approved permite enviar. rejected indica que o provedor analisou e recusou o template. failed indica que a Routa não conseguiu submetê-lo. Um template failed ou rejected pode ser editado e reenviado no painel, e então volta a submitted.
draft, submitted, pending, approved, rejected, paused, disabled, failed true desde que uma exclusão foi aceita (feita no painel) até a Routa terminar de apagar o template no WhatsApp. Nesse intervalo o template não pode ser usado para enviar e uma mensagem que o cita retorna 422 template_not_sendable. false nos demais casos.
false
Componentes de um template importado que a Routa não consegue reproduzir. Vazia quando read_only é false.
named_parameters, media_header, location_header, carousel, flow_button, otp_button, copy_code_button, catalog, limited_time_offer, other []