๐ WhatsApp Template Listing API
Fetch approved WhatsApp message templates for a specific 2BeBot Channel. These templates can be used when sending template-based messages via the 2BeBot Integration.
๐ Endpoint
GET /api/v1/whatsapp/:id/templates:id= ID of the 2BeBot Channel
๐ Authentication
All requests must include a valid API key passed as a Bearer token in the Authorization header:
You can get your API key from the /companies page.
Authorization: Bearer YOUR_API_KEY๐ฅ Request
๐ธ Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | โ Yes | 2BeBot Channel ID for which to fetch templates |
๐ค Response
Returns a list of approved templates registered under the given 2BeBot Channel.
โ Success (200)
Example Response
[
{
"id": "2",
"name": "with_header",
"language": "en_US",
"category": "MARKETING",
"body_text": [
{
"value": "Dennis",
"variable": "{{1}}"
}
],
"header_text": {
"value": "https://smart.smartfiles.download/meta_templates/99c6cd2b_6d6e_43c3_b78b_2810d27bf78c_512_x_512_px_.png",
"variable": "{{url}}"
},
"header_type": "MEDIA"
}
]๐ Field Reference
| Field | Type | Description |
|---|---|---|
id | string | Template ID (internal database ID) |
name | string | Name of the template (used when sending messages) |
language | string | Language code in en_US, fr, etc. |
category | string | Template category, e.g. MARKETING, UTILITY, AUTHENTICATION |
body_text | array | Array of variables used in the message body, includes placeholder variable and a sample value |
header_type | string | Either "TEXT" or "MEDIA" |
header_text | object | Header content placeholder. If MEDIA, contains a placeholder media URL and variable name ({{url}}) |
๐ Notes on Usage
body_text.valueandheader_text.valueare examples or placeholders.
- These values must be replaced with actual dynamic content in your message payload when sending the message.
- The
variablefield (e.g.{{1}},{{url}}) matches the placeholders configured in your template on Meta's WhatsApp Manager.
โ Not Found (404)
{
"error": "No templates found"
}Returned if no approved templates exist for the given 2BeBot Channel ID.
๐งช Example Request
curl -X GET https://smart.botatende.com/api/v1/whatsapp/123/templates \
-H "Authorization: Bearer YOUR_API_KEY"