curl --request POST \
--url https://api.ararahq.com/v1/templates/library \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "confirmacao_pedido",
"libraryTemplateName": "order_confirmation_1"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'confirmacao_pedido', libraryTemplateName: 'order_confirmation_1'})
};
fetch('https://api.ararahq.com/v1/templates/library', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.ararahq.com/v1/templates/library"
payload = {
"name": "confirmacao_pedido",
"libraryTemplateName": "order_confirmation_1"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ararahq.com/v1/templates/library",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'confirmacao_pedido',
'libraryTemplateName' => 'order_confirmation_1'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"id": "a7f3c1e2-4b5d-6789-abcd-ef0123456789",
"name": "pedido_confirmado",
"formattedName": "pedido_confirmado",
"category": "UTILITY",
"originalCategory": "UTILITY",
"language": "pt_BR",
"providerName": "GUPSHUP",
"providerTemplateId": "4c1f0e9a-2b3d-4e5f-8a6b-7c8d9e0f1a2b",
"providerStatus": "PENDING",
"rejectionReason": null,
"availableForSending": true,
"unavailableReason": null,
"bodyPreview": "Oi {{1}}, seu pedido {{2}} foi confirmado. Total: R$ {{3}}.",
"structureJson": {},
"usageGuide": {
"message": "Use o objeto 'variables' no envio da mensagem para substituir os placeholders.",
"endpoint": "POST /v1/messages"
},
"variablesSchema": {
"1": "João",
"2": "12345",
"3": "147,90"
},
"createdAt": "2026-09-15T14:30:00Z",
"updatedAt": null
}Criar template da biblioteca
Cria um template a partir de um item da biblioteca da Meta. Nasce aprovado,
sem esperar revisão. Exige número conectado (422 GUPSHUP_APP_NOT_READY).
Permissão: TEMPLATES_WRITE.
curl --request POST \
--url https://api.ararahq.com/v1/templates/library \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "confirmacao_pedido",
"libraryTemplateName": "order_confirmation_1"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'confirmacao_pedido', libraryTemplateName: 'order_confirmation_1'})
};
fetch('https://api.ararahq.com/v1/templates/library', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.ararahq.com/v1/templates/library"
payload = {
"name": "confirmacao_pedido",
"libraryTemplateName": "order_confirmation_1"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ararahq.com/v1/templates/library",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'confirmacao_pedido',
'libraryTemplateName' => 'order_confirmation_1'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"id": "a7f3c1e2-4b5d-6789-abcd-ef0123456789",
"name": "pedido_confirmado",
"formattedName": "pedido_confirmado",
"category": "UTILITY",
"originalCategory": "UTILITY",
"language": "pt_BR",
"providerName": "GUPSHUP",
"providerTemplateId": "4c1f0e9a-2b3d-4e5f-8a6b-7c8d9e0f1a2b",
"providerStatus": "PENDING",
"rejectionReason": null,
"availableForSending": true,
"unavailableReason": null,
"bodyPreview": "Oi {{1}}, seu pedido {{2}} foi confirmado. Total: R$ {{3}}.",
"structureJson": {},
"usageGuide": {
"message": "Use o objeto 'variables' no envio da mensagem para substituir os placeholders.",
"endpoint": "POST /v1/messages"
},
"variablesSchema": {
"1": "João",
"2": "12345",
"3": "147,90"
},
"createdAt": "2026-09-15T14:30:00Z",
"updatedAt": null
}Authorizations
Chave de API da Arara (ara_live_...), enviada no header Authorization: Bearer ara_live_.... Crie e gerencie as chaves no painel: https://app.ararahq.com/dashboard/apikeys. O valor completo aparece uma única vez, na criação.
Body
Response
Template criado
ID do template (UUID).
Categoria atual. A Meta pode mudar a categoria na revisão.
"GUPSHUP"
Status de aprovação:
PENDING: em revisão.APPROVED: pronto para enviar.REJECTED: reprovado. VejarejectionReason.PAUSED: pausado pela Meta ou pela proteção automática da Arara. O envio responde422 TEMPLATE_PAUSED.DISABLED: desativado. O envio responde422 TEMPLATE_NOT_SENDABLE.
"APPROVED"
false quando o template foi aprovado em um número que a organização não usa mais. Recrie o template no número ativo.
Categoria pedida na criação.
Corpo do template, com os marcadores de variável.
Exemplos por número da variável.
Show child attributes
Show child attributes