Templates
This section shows the available routes related to AcyMailing templates
Get one template
GET
https://www.example.com/index.php?page=acymailing_front&option=com_acym&ctrl=api&task=getOneTemplate&templateId={id}
Get one template by ID
Query Parameters
Name | Type | Description |
---|---|---|
templateId* | Int | ID of the template to get |
Headers
Name | Type | Description |
---|---|---|
Api-Key* | String | The API key of a valid AcyMailing license used in the AcyMailing configuration page, tab "License". |
Get templates
GET
https://www.example.com/index.php?page=acymailing_front&option=com_acym&ctrl=api&task=getTemplates
Get a collection of templates
Query Parameters
Name | Type | Description |
---|---|---|
filters | Array | You can filter templates searching a text in their name/subject, or specifying the type of template ("drag" for drag and drop templates, "standard" for others, leave empty for both). Example: [ "search": "New Year", "templateType": "standard" ] |
templateType | String | Type of template to get if you want only templates for standard editor (value: standard) or for drag and drop templates (value: drag). Don't use this parameter if you want all types. |
limit | Int | The number of templates you would like to get in your request, by default it's set to 20 |
offset | Int | From which element in the database you would like to start getting templates, by default it's set to 0 |
Headers
Name | Type | Description |
---|---|---|
Api-Key* | String | The API key of a valid AcyMailing license used in the AcyMailing configuration page, tab "License". |
Create a template
POST
https://www.example.com/index.php?page=acymailing_front&option=com_acym&ctrl=api&task=createTemplate
Templates created like this can only be edited with the website editor and not the drag and drop one.
Headers
Name | Type | Description |
---|---|---|
Api-Key* | String | The API key of a valid AcyMailing license used in the AcyMailing configuration page, tab "License". |
Content-Type* | String | application/json |
Request Body
Name | Type | Description |
---|---|---|
name* | String | Name of the template |
subject | String | Default subject of emails created using this template |
body | String | HTML content of the email (only the body part) |
from_name | String | Default from name for emails created using this template |
from_email | String | Default from email address for emails created using this template |
reply_to_name | String | Default reply-to name for emails created using this template |
reply_to_email | String | Default reply-to email address for emails created using this template |
headers | String | Extra headers to add to emails created using this template |
preheader | String | Preview line displayed in mail clients for emails created using this template |
stylesheet | String | CSS to be added to the email |
The answers will contains the ID of the template created
Modify a template
POST
https://www.example.com/index.php?page=acymailing_front&option=com_acym&ctrl=api&task=updateTemplate
Modify an existing template
Headers
Name | Type | Description |
---|---|---|
Api-Key* | String | The API key of a valid AcyMailing license used in the AcyMailing configuration page, tab "License". |
Content-Type* | String | application/json |
Request Body
Name | Type | Description |
---|---|---|
templateId* | Int | ID of the template to modify |
preheader | String | Preview line displayed in mail clients for emails created using this template |
headers | String | Extra HTML headers to add to emails created using this template |
reply_to_email | String | Default reply-to email address for emails created using this template |
reply_to_name | String | Default reply-to name for emails created using this template |
from_email | String | Default from email address for emails created using this template |
from_name | String | Default from name for emails created using this template |
body | String | HTML content of the email (only the body part) |
subject | String | Default subject of emails created using this template |
name | String | Name of the template |
stylesheet | String | CSS to be added to the email |
Delete a template
DELETE
https://www.example.com/index.php?page=acymailing_front&option=com_acym&ctrl=api&task=deleteTemplate&templateId={id}
Query Parameters
Name | Type | Description |
---|---|---|
templateId* | Int | ID of the template to delete |
Headers
Name | Type | Description |
---|---|---|
Api-Key* | String | The API key of a valid AcyMailing license used in the AcyMailing configuration page, tab "License". |
Last updated