Synchronize templates

Halaman ini belum tersedia dalam Bahasa Indonesia. Menampilkan bahasa default (English).

Synchronize templates

POSThttps://api.cekat.ai/templates/sync

Copies the inbox’s templates from Meta into Cekat. Use it after creating or editing templates directly in Meta, or to refresh approval statuses. New templates are added and templates whose status changed are updated.

Authorization

api_keystringheaderrequired

Your Cekat API key, from Settings → Developers & API in the Cekat dashboard.

Query parameters

inbox_idstring<uuid>required

ID of a connected WhatsApp inbox.

Response

200
400
401
404
429

Templates synchronized.

successboolean
status_codeinteger

inbox_id is missing or the inbox is not a WhatsApp inbox.

successboolean
status_codeinteger
errorobject
Show child attributes
messagestring

The API key is missing or invalid.

successboolean
status_codeinteger
errorobject
Show child attributes
messagestring

The resource was not found.

successboolean
status_codeinteger
errorobject
Show child attributes
messagestring

Rate limit exceeded. Wait and retry.

messagestring
POST/templates/sync
cURL
JavaScript
Python
PHP
curl --request POST \
  --url 'https://api.cekat.ai/templates/sync?inbox_id=3c90c3cc-0d44-4b50-8888-8dd25736052a' \
  --header 'api_key: YOUR_API_KEY'
const response = await fetch('https://api.cekat.ai/templates/sync?inbox_id=3c90c3cc-0d44-4b50-8888-8dd25736052a', {
  method: 'POST',
  headers: { 'api_key': 'YOUR_API_KEY' },
});

const data = await response.json();
console.log(data);
import requests

url = "https://api.cekat.ai/templates/sync?inbox_id=3c90c3cc-0d44-4b50-8888-8dd25736052a"
headers = {"api_key": "YOUR_API_KEY"}

response = requests.post(url, headers=headers)
print(response.json())
<?php
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://api.cekat.ai/templates/sync?inbox_id=3c90c3cc-0d44-4b50-8888-8dd25736052a',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_HTTPHEADER => ['api_key: YOUR_API_KEY'],
]);

$response = curl_exec($curl);
curl_close($curl);
echo $response;
Response
200
400
401
404
429
{
  "success": true,
  "status_code": 1
}
{
  "success": true,
  "status_code": 1,
  "error": {
    "message": "<string>"
  }
}
{
  "success": true,
  "status_code": 1,
  "error": {
    "message": "<string>"
  }
}
{
  "success": true,
  "status_code": 1,
  "error": {
    "message": "<string>"
  }
}
{
  "message": "<string>"
}