Criar template de WhatsApp
curl --request POST \
--url https://api.jurichat.com/integration/templates/{integrationId} \
--header 'Content-Type: application/json' \
--header 'x-jurichat-api-key: <api-key>' \
--data '
{
"name": "<string>",
"language": "<string>",
"components": [
{
"text": "<string>",
"example": {
"header_text": [
[
"<string>"
]
],
"header_handle": [
"<string>"
],
"body_text": [
[
"<string>"
]
]
},
"buttons": [
{
"type": "QUICK_REPLY",
"text": "<string>"
}
],
"add_security_recommendation": true,
"code_expiration_minutes": 45
}
]
}
'import requests
url = "https://api.jurichat.com/integration/templates/{integrationId}"
payload = {
"name": "<string>",
"language": "<string>",
"components": [
{
"text": "<string>",
"example": {
"header_text": [["<string>"]],
"header_handle": ["<string>"],
"body_text": [["<string>"]]
},
"buttons": [
{
"type": "QUICK_REPLY",
"text": "<string>"
}
],
"add_security_recommendation": True,
"code_expiration_minutes": 45
}
]
}
headers = {
"x-jurichat-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-jurichat-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
language: '<string>',
components: [
{
text: '<string>',
example: {
header_text: [['<string>']],
header_handle: ['<string>'],
body_text: [['<string>']]
},
buttons: [{type: 'QUICK_REPLY', text: '<string>'}],
add_security_recommendation: true,
code_expiration_minutes: 45
}
]
})
};
fetch('https://api.jurichat.com/integration/templates/{integrationId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.jurichat.com/integration/templates/{integrationId}",
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' => '<string>',
'language' => '<string>',
'components' => [
[
'text' => '<string>',
'example' => [
'header_text' => [
[
'<string>'
]
],
'header_handle' => [
'<string>'
],
'body_text' => [
[
'<string>'
]
]
],
'buttons' => [
[
'type' => 'QUICK_REPLY',
'text' => '<string>'
]
],
'add_security_recommendation' => true,
'code_expiration_minutes' => 45
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-jurichat-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.jurichat.com/integration/templates/{integrationId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"language\": \"<string>\",\n \"components\": [\n {\n \"text\": \"<string>\",\n \"example\": {\n \"header_text\": [\n [\n \"<string>\"\n ]\n ],\n \"header_handle\": [\n \"<string>\"\n ],\n \"body_text\": [\n [\n \"<string>\"\n ]\n ]\n },\n \"buttons\": [\n {\n \"type\": \"QUICK_REPLY\",\n \"text\": \"<string>\"\n }\n ],\n \"add_security_recommendation\": true,\n \"code_expiration_minutes\": 45\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-jurichat-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.jurichat.com/integration/templates/{integrationId}")
.header("x-jurichat-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"language\": \"<string>\",\n \"components\": [\n {\n \"text\": \"<string>\",\n \"example\": {\n \"header_text\": [\n [\n \"<string>\"\n ]\n ],\n \"header_handle\": [\n \"<string>\"\n ],\n \"body_text\": [\n [\n \"<string>\"\n ]\n ]\n },\n \"buttons\": [\n {\n \"type\": \"QUICK_REPLY\",\n \"text\": \"<string>\"\n }\n ],\n \"add_security_recommendation\": true,\n \"code_expiration_minutes\": 45\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jurichat.com/integration/templates/{integrationId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-jurichat-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"language\": \"<string>\",\n \"components\": [\n {\n \"text\": \"<string>\",\n \"example\": {\n \"header_text\": [\n [\n \"<string>\"\n ]\n ],\n \"header_handle\": [\n \"<string>\"\n ],\n \"body_text\": [\n [\n \"<string>\"\n ]\n ]\n },\n \"buttons\": [\n {\n \"type\": \"QUICK_REPLY\",\n \"text\": \"<string>\"\n }\n ],\n \"add_security_recommendation\": true,\n \"code_expiration_minutes\": 45\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"status": "<string>",
"category": "<string>",
"success": true
}{
"message": "<string>",
"statusCode": 123,
"details": "<unknown>"
}{
"message": "<string>",
"statusCode": 123,
"details": "<unknown>"
}Templates
Criar template de WhatsApp
Submete um novo template à aprovação da Meta. A análise não é instantânea: o template nasce com status PENDING e só pode ser enviado após virar APPROVED. Cabeçalhos de mídia exigem o handle devolvido por POST /integration/templates/{integrationId}/media em example.header_handle.
POST
/
integration
/
templates
/
{integrationId}
Criar template de WhatsApp
curl --request POST \
--url https://api.jurichat.com/integration/templates/{integrationId} \
--header 'Content-Type: application/json' \
--header 'x-jurichat-api-key: <api-key>' \
--data '
{
"name": "<string>",
"language": "<string>",
"components": [
{
"text": "<string>",
"example": {
"header_text": [
[
"<string>"
]
],
"header_handle": [
"<string>"
],
"body_text": [
[
"<string>"
]
]
},
"buttons": [
{
"type": "QUICK_REPLY",
"text": "<string>"
}
],
"add_security_recommendation": true,
"code_expiration_minutes": 45
}
]
}
'import requests
url = "https://api.jurichat.com/integration/templates/{integrationId}"
payload = {
"name": "<string>",
"language": "<string>",
"components": [
{
"text": "<string>",
"example": {
"header_text": [["<string>"]],
"header_handle": ["<string>"],
"body_text": [["<string>"]]
},
"buttons": [
{
"type": "QUICK_REPLY",
"text": "<string>"
}
],
"add_security_recommendation": True,
"code_expiration_minutes": 45
}
]
}
headers = {
"x-jurichat-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-jurichat-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
language: '<string>',
components: [
{
text: '<string>',
example: {
header_text: [['<string>']],
header_handle: ['<string>'],
body_text: [['<string>']]
},
buttons: [{type: 'QUICK_REPLY', text: '<string>'}],
add_security_recommendation: true,
code_expiration_minutes: 45
}
]
})
};
fetch('https://api.jurichat.com/integration/templates/{integrationId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.jurichat.com/integration/templates/{integrationId}",
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' => '<string>',
'language' => '<string>',
'components' => [
[
'text' => '<string>',
'example' => [
'header_text' => [
[
'<string>'
]
],
'header_handle' => [
'<string>'
],
'body_text' => [
[
'<string>'
]
]
],
'buttons' => [
[
'type' => 'QUICK_REPLY',
'text' => '<string>'
]
],
'add_security_recommendation' => true,
'code_expiration_minutes' => 45
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-jurichat-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.jurichat.com/integration/templates/{integrationId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"language\": \"<string>\",\n \"components\": [\n {\n \"text\": \"<string>\",\n \"example\": {\n \"header_text\": [\n [\n \"<string>\"\n ]\n ],\n \"header_handle\": [\n \"<string>\"\n ],\n \"body_text\": [\n [\n \"<string>\"\n ]\n ]\n },\n \"buttons\": [\n {\n \"type\": \"QUICK_REPLY\",\n \"text\": \"<string>\"\n }\n ],\n \"add_security_recommendation\": true,\n \"code_expiration_minutes\": 45\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-jurichat-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.jurichat.com/integration/templates/{integrationId}")
.header("x-jurichat-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"language\": \"<string>\",\n \"components\": [\n {\n \"text\": \"<string>\",\n \"example\": {\n \"header_text\": [\n [\n \"<string>\"\n ]\n ],\n \"header_handle\": [\n \"<string>\"\n ],\n \"body_text\": [\n [\n \"<string>\"\n ]\n ]\n },\n \"buttons\": [\n {\n \"type\": \"QUICK_REPLY\",\n \"text\": \"<string>\"\n }\n ],\n \"add_security_recommendation\": true,\n \"code_expiration_minutes\": 45\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jurichat.com/integration/templates/{integrationId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-jurichat-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"language\": \"<string>\",\n \"components\": [\n {\n \"text\": \"<string>\",\n \"example\": {\n \"header_text\": [\n [\n \"<string>\"\n ]\n ],\n \"header_handle\": [\n \"<string>\"\n ],\n \"body_text\": [\n [\n \"<string>\"\n ]\n ]\n },\n \"buttons\": [\n {\n \"type\": \"QUICK_REPLY\",\n \"text\": \"<string>\"\n }\n ],\n \"add_security_recommendation\": true,\n \"code_expiration_minutes\": 45\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"status": "<string>",
"category": "<string>",
"success": true
}{
"message": "<string>",
"statusCode": 123,
"details": "<unknown>"
}{
"message": "<string>",
"statusCode": 123,
"details": "<unknown>"
}Authorizations
Chave de API do escritório (criada no painel). Envie o valor no header x-jurichat-api-key.
Path Parameters
ID da integração de WhatsApp API Oficial do escritório.
Pattern:
^[cC][^\s-]{8,}$Body
application/json
Nome único do template. Apenas letras minúsculas, números e underscores, ex.: retorno_atendimento.
Required string length:
1 - 512Pattern:
^[a-z0-9_]+$Categoria declarada à Meta. AUTHENTICATION exige botão OTP e corpo com aviso de segurança.
Available options:
UTILITY, MARKETING, AUTHENTICATION Código do idioma do template, ex.: pt_BR.
Minimum string length:
2Componentes do template. Ao menos um componente BODY é obrigatório.
Minimum array length:
1Show child attributes
Show child attributes
⌘I