Email Template API

Manage email templates — retrieve, create, update and delete

Base URL

https://{tenant}.logzi.com/api/email_template/

Every request returns a JSON response. On success result.code == 1, on error result.code == 0. Email templates contain a subject line and HTML content — the system fills these in automatically when a document is sent out.

GET /api/email_template/get

Retrieve a single email template by its identifier.

Query parameters

ParameterTypeRequiredDescription
idintEmail template identifier

Example request

GET /api/email_template/get?id=2
X-API-KEY: {your_api_key}
GET /api/email_template/list

Retrieve a paginated list of email templates.

Query parameters

ParameterTypeRequiredDescription
list_offsetintPagination offset (default: 0)
list_conditionobjectObject containing filter conditions

Example request

GET /api/email_template/list?list_offset=0
X-API-KEY: {your_api_key}
POST /api/email_template/save

Create or update an email template. For a new template use data[id] = 0.

POST fields — data object

FieldTypeRequiredDescription
idint0 = new template, >0 = update
company_user_idintIdentifier of the employee who owns the template
email_template_namestringTemplate name (for internal identification)
template_subjectstringEmail subject line (dynamic tags supported)
template_contentstringHTML body (dynamic tags supported)
email_template_type_idintTemplate type identifier
email_template_ccstringCC email address(es)
template_enable_item_file_list_tableint1 = include attachment list table

Example request

POST /api/email_template/save
X-API-KEY: {your_api_key}
Content-Type: application/json

{
  "data": {
    "id": 0,
    "company_user_id": 3,
    "email_template_name": "Számla kiküldő sablon",
    "template_subject": "Számla: {identify}",
    "template_content": "<p>Kedves {partner_name},</p><p>mellékeljük a számlát.</p>"
  }
}
POST /api/email_template/delete

Delete an email template by its identifier.

POST fields — data object

FieldTypeRequiredDescription
idintIdentifier of the template to delete

Example request

POST /api/email_template/delete
X-API-KEY: {your_api_key}
Content-Type: application/json

{ "data": { "id": 2 } }

Get in touch with us

Interested in our software? Feel free to write to us!

Need help?

If you can't find the answer and need assistance

Create your account now,
pay later!

Try it free for 3 days, no risk, no obligation!