POST

WhatsappTemplates.List

List WhatsApp message templates that can be used by the UI, automations, messages, and document sending. Use filters to find templates by language, approval status, customer visibility, or provider. The response is always JSON and list size is capped at 25.

Permissions

  • User must be logged in with a valid bearer token.
  • Returned or changed records are limited by the user permissions, team access, folder access, and account settings.

Action

  • Returns WhatsappTemplates rows as JSON.
  • Supports the documented filters and paging fields.
  • List responses are capped at 25 rows per call.

Push Service

No push is sent because this function only reads data or returns helper information.

Automation

No automation is run for this function.

Special Instructions

  • Send the bearer token on protected calls with Authorization: Bearer YOUR TOKEN.
  • Send parameters as POST body fields exactly as documented.
  • For paging, do not request more than 25 rows.
  • For total rows, call the matching Count function with the same filters.

Required Parameters

No body parameters are required for this function.

Optional Parameters

NameTypeSampleWhat it gives
limit
post
int25Maximum rows to return. Values above 25 are capped.
start
post
int0Offset for paging.
search
post
stringwelcomeSearches template name, message, language, and namespace.
language
post
stringheFilters templates by language code such as he, en, ar, or ru.
approved
post
int1Filters by provider approval flag. 1 means approved, 0 means not approved yet.
show_status
post
int1Filters visible/active templates. Alias: status.
templates_for_customer
post
int1Filters templates available from customer/message screens.
provider
post
stringmessage_birdFilters by WhatsApp provider. Alias for whatsApp_provider.
order_by
post
stringpositionSort field: id, position, template_name, language, approved, show_status.
order_dir
post
stringascSort direction: asc or desc.

Authentication

Send the bearer token returned by Login in the request header.

Authorization: Bearer YOUR TOKEN

Sample Request

{
    "url": "\/app\/WhatsappTemplates.List",
    "method": "POST",
    "headers": {
        "Authorization": "Bearer YOUR TOKEN"
    },
    "body": {
        "language": "he",
        "limit": "25"
    },
    "url_user": "https:\/\/{user}.bull36.com\/app\/WhatsappTemplates.List",
    "url_domain": "https:\/\/{domain}\/app\/WhatsappTemplates.List"
}

Endpoint

POST /app/WhatsappTemplates.List
POST https://{user}.bull36.com/app/WhatsappTemplates.List
POST https://{domain}/app/WhatsappTemplates.List

Sample Output

{
    "success": 1,
    "count": 2,
    "recordsTotal": 2,
    "data": [
        {
            "id": 2516,
            "template_id": 2516,
            "name": "Renewal message",
            "language": "he",
            "message": "Hi {{1}}",
            "dynamic_variables": [
                {
                    "1": "name"
                }
            ]
        }
    ]
}

Count Only

Use the matching count route with the same filters when the UI only needs total rows for paging.

{
    "url": "\/app\/WhatsappTemplates.Count",
    "url_user": "https:\/\/{user}.bull36.com\/app\/WhatsappTemplates.Count",
    "url_domain": "https:\/\/{domain}\/app\/WhatsappTemplates.Count",
    "method": "POST",
    "headers": {
        "Authorization": "Bearer YOUR TOKEN"
    },
    "body": {
        "language": "he"
    },
    "sample_output": {
        "success": 1,
        "count": 123
    },
    "notes": {
        "count": "Use WhatsappTemplates.Count for only the count with the same filters, or read count\/recordsTotal from this response."
    }
}

Count JavaScript

const token = 'YOUR TOKEN';
const body = new URLSearchParams();
body.set('language', 'he');

const res = await fetch('https://{domain}/app/WhatsappTemplates.Count', {
  method: 'POST',
  headers: { Authorization: `Bearer ${token}` },
  body
});
const data = await res.json();
console.log(data.count);

JavaScript Example

const token = 'YOUR TOKEN';
const body = new URLSearchParams({ language: 'he', limit: '25' });
const res = await fetch('/app/WhatsappTemplates.List', { method: 'POST', headers: { Authorization: 'Bearer ' + token }, body });
const data = await res.json();
console.log(data);

Error Example

{
    "success": "0",
    "error": "bearer_token_required",
    "message": "Authorization bearer token is required. Send header: Authorization: Bearer YOUR TOKEN"
}