Submit template to Meta
Submits the template to Meta for approval — the dashboard’s Submit to Meta. Use it for a template that was never sent to Meta (source: "PILOT_STATUS") or to re-submit a rejected one. The target is the key’s WhatsApp number, which must be a Meta Cloud API number with a WhatsApp Business Account (422 TEMPLATE_REQUIRES_META_NUMBER otherwise). The body is empty: the number comes from the key, and any field — whatsappNumberId included — is refused with 400 UNKNOWN_FIELDS.
Returns the template (now source: "META", usually metaStatus: "PENDING") plus metaTemplateId. Meta reviews it asynchronously: read the status later with GET /v1/templates/{id} or refresh it with POST /v1/templates/sync. Permission templates:manage (same as the dashboard): OWNER or ADMIN for account keys and OAuth tokens.
Requires a number-scoped key.
curl --request POST \
--url https://pilotstatus.com.br/v1/templates/{id}/submit \
--header 'x-api-key: <api-key>'import requests
url = "https://pilotstatus.com.br/v1/templates/{id}/submit"
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
fetch('https://pilotstatus.com.br/v1/templates/{id}/submit', 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://pilotstatus.com.br/v1/templates/{id}/submit",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"x-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"
"net/http"
"io"
)
func main() {
url := "https://pilotstatus.com.br/v1/templates/{id}/submit"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://pilotstatus.com.br/v1/templates/{id}/submit")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/v1/templates/{id}/submit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "tpl_01HZX...",
"name": "order_update",
"category": "UTILITY",
"body": "{\"body\":{\"text\":\"Pedido {{order}} enviado\"}}",
"variables": [
"order"
],
"source": "META",
"metaStatus": "PENDING",
"metaLanguage": "pt_BR",
"sendable": false,
"metaTemplateId": "1234567890123456"
}Was this page helpful?
curl --request POST \
--url https://pilotstatus.com.br/v1/templates/{id}/submit \
--header 'x-api-key: <api-key>'import requests
url = "https://pilotstatus.com.br/v1/templates/{id}/submit"
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
fetch('https://pilotstatus.com.br/v1/templates/{id}/submit', 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://pilotstatus.com.br/v1/templates/{id}/submit",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"x-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"
"net/http"
"io"
)
func main() {
url := "https://pilotstatus.com.br/v1/templates/{id}/submit"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://pilotstatus.com.br/v1/templates/{id}/submit")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/v1/templates/{id}/submit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "tpl_01HZX...",
"name": "order_update",
"category": "UTILITY",
"body": "{\"body\":{\"text\":\"Pedido {{order}} enviado\"}}",
"variables": [
"order"
],
"source": "META",
"metaStatus": "PENDING",
"metaLanguage": "pt_BR",
"sendable": false,
"metaTemplateId": "1234567890123456"
}