POST

EmailTemplates.List

List email templates for the authenticated account (table email_template). Use ids with Chat.SendCustomer from=send_email as template_id or email_template_id, and with Ticket.AutomationSave as email_template_id (customer mail under Send email). Same templates as the dashboard EMAIL composer / ticket automation Email template select.

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 EmailTemplates 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, subject, and source.
status
post
int1Filter by status (1 = active).
default_quick_email
post
int1Filter templates marked as default quick email.
order_by
post
stringidSort field: id, tamplate_name, subject, status, default_quick_email.
order_dir
post
stringdescSort direction: asc or desc.

Authentication

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

Authorization: Bearer YOUR TOKEN

Sample Request

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

Endpoint

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

Sample Output

{
    "success": 1,
    "count": 1,
    "recordsTotal": 1,
    "data": [
        {
            "id": 42,
            "template_id": 42,
            "email_template_id": 42,
            "name": "Welcome",
            "template_name": "Welcome",
            "subject": "Hello",
            "status": 1
        }
    ]
}

Count Only

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

{
    "url": "\/app\/EmailTemplates.Count",
    "url_user": "https:\/\/{user}.bull36.com\/app\/EmailTemplates.Count",
    "url_domain": "https:\/\/{domain}\/app\/EmailTemplates.Count",
    "method": "POST",
    "headers": {
        "Authorization": "Bearer YOUR TOKEN"
    },
    "body": {
        "status": "1"
    },
    "sample_output": {
        "success": 1,
        "count": 123
    },
    "notes": {
        "count": "Use EmailTemplates.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('status', '1');

const res = await fetch('https://{domain}/app/EmailTemplates.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({ status: '1', limit: '25' });
const res = await fetch('/app/EmailTemplates.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"
}