Sync WABA Templates
Trigger a background synchronization of WhatsApp Business API (WABA) message templates for a given phone number. This fetches the latest templates from Meta and updates your 2Chat account so that new, modified, or removed templates are reflected when you call Get WABA Templates.
info
Requires a WABA channel connected to your 2Chat account. See How to connect WABA to 2Chat.
Query parameters
| Parameter | Description | Example |
|---|---|---|
phone_number | Your WABA number in E.164 format: no spaces, with leading plus sign. Required. | +5215512345432 |
Invocation
- cURL
- Python
- JavaScript
curl --request POST \
--url 'https://api.p.2chat.io/open/waba/templates/sync?phone_number=+5215512345432' \
--header 'Content-Type: application/json' \
--header 'X-User-API-Key: your_api_key_here'
import requests
url = "https://api.p.2chat.io/open/waba/templates/sync"
params = {"phone_number": "+5215512345432"}
headers = {
"Content-Type": "application/json",
"X-User-API-Key": "your_api_key_here"
}
response = requests.post(url, params=params, headers=headers)
print(response.json())
const axios = require('axios');
axios.post('https://api.p.2chat.io/open/waba/templates/sync', null, {
params: { phone_number: '+5215512345432' },
headers: {
'Content-Type': 'application/json',
'X-User-API-Key': 'your_api_key_here'
}
})
.then(response => console.log(response.data))
.catch(error => console.error(error));
Response
The endpoint returns immediately while the synchronization runs in the background.
{
"success": true,
"is_syncing": true,
"start_time_syncing": "2026-04-10T12:08:02.318000",
"message": "Template sync started in background. Please wait."
}
| Field | Description |
|---|---|
success | true when the request was accepted |
is_syncing | true indicates the sync process is running |
start_time_syncing | ISO 8601 timestamp of when the sync started (present only when a new sync was triggered) |
message | Human-readable status message |
If a sync is already in progress for the same number, the endpoint returns:
{
"success": true,
"is_syncing": true,
"message": "Template sync is already in progress. Please wait."
}
caution
The synchronization runs in the background. Updated templates will be available after a few seconds when you call Get WABA Templates. If you have a large number of templates, the sync may take longer.