Manage your templates ("My templates") and template categories, read and update a template's content, and create a campaign from a template. Deleting a template category also deletes all the templates in it.
All endpoints use the base URL https://webapi.mymarketing.co.il and an API key in the Authorization header. New to the API? Start with Get started with the ActiveTrail API.
Endpoints
| Method | Endpoint | What it does |
|---|---|---|
GET | /api/ | Get account's "my templates" |
GET | /api/ | Get a specific template' information |
POST | /api/ | Create and return a new template |
PUT | /api/ | Update a specific template |
DELETE | /api/ | Delete a specific template |
GET | /api/ | Get a template's content |
PUT | /api/ | Update template's content |
POST | /api/ | Create campaign using a specific template |
GET | /api/ | Get "my templates" categories |
POST | /api/ | Create and return a new template category |
PUT | /api/ | Update the given template category |
DELETE | /api/ | Delete the given template category |
Endpoint details
Get account's "my templates"
GET https://webapi.mymarketing.co.il/api/templates
No parameters.
Full reference, request and response samples
Get a specific template' information
GET https://webapi.mymarketing.co.il/api/templates/{id}
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | integer | Template id. Can be found using the endpoint "Get account's "my templates"" or in the UI(go to "Emails" -> "My Templates" -> click on your desired template -> you'll find the ID at the end of the URL). Required. |
Full reference, request and response samples
Create and return a new template
POST https://webapi.mymarketing.co.il/api/templates
| Parameter | In | Type | Description |
|---|---|---|---|
name | body | string | The template's name Required. |
subject | body | string | The subject of the email that will be sent - for operational messages only |
preheader | body | string | The preheader of the email that will be sent - for operational messages only |
classification | body | string | Template classification. Used to classify operational messages reports |
AddPrintButton | body | boolean | Add Print Button |
template_category_id | body | integer | To which category the template will be added to. Can be found using the endpoint "Get "my templates" categories". |
template_category_name | body | string | Template category Name. Will be the category name that is related to the category ID. Can be removed in a post/put endpoint |
campaign_encoding | body | SystemLanguageType | Campaign encoding of the given template. UTF-8 is recommended in a post/put endpoint |
content | body | string | The template's content. A clean text (without any design to it) or HTML content. if you send HTML content please note you should use back-slash before each quotation mark. |
The request body is a JSON object (ApiCampaignTemplateUpdatePost).
Full reference, request and response samples
Update a specific template
PUT https://webapi.mymarketing.co.il/api/templates/{id}
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | integer | Template id. Can be found using the endpoint "Get account's "my templates"" or in the UI(go to "Emails" -> "My Templates" -> click on your desired template -> you'll find the ID at the end of the URL). Required. |
name | body | string | The template's name Required. |
subject | body | string | The subject of the email that will be sent - for operational messages only |
preheader | body | string | The preheader of the email that will be sent - for operational messages only |
classification | body | string | Template classification. Used to classify operational messages reports |
AddPrintButton | body | boolean | Add Print Button |
template_category_id | body | integer | To which category the template will be added to. Can be found using the endpoint "Get "my templates" categories". |
template_category_name | body | string | Template category Name. Will be the category name that is related to the category ID. Can be removed in a post/put endpoint |
campaign_encoding | body | SystemLanguageType | Campaign encoding of the given template. UTF-8 is recommended in a post/put endpoint |
content | body | string | The template's content. A clean text (without any design to it) or HTML content. if you send HTML content please note you should use back-slash before each quotation mark. |
The request body is a JSON object (ApiCampaignTemplateUpdatePost).
Full reference, request and response samples
Delete a specific template
DELETE https://webapi.mymarketing.co.il/api/templates/{id}
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | integer | Template id. Can be found using the endpoint "Get account's "my templates"" or in the UI(go to "Emails" -> "My Templates" -> click on your desired template -> you'll find the ID at the end of the URL). Required. |
Full reference, request and response samples
Get a template's content
GET https://webapi.mymarketing.co.il/api/templates/{id}/content
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | integer | Template id. Can be found using the endpoint "Get account's "my templates"" or in the UI(go to "Emails" -> "My Templates" -> click on your desired template -> you'll find the ID at the end of the URL). Required. |
Full reference, request and response samples
Update template's content
PUT https://webapi.mymarketing.co.il/api/templates/{Id}/content
| Parameter | In | Type | Description |
|---|---|---|---|
Id | path | integer | Template id. Can be found using the endpoint "Get account's "my templates"" or in the UI(go to "Emails" -> "My Templates" -> click on your desired template -> you'll find the ID at the end of the URL). Required. |
name | body | string | The template's name Required. |
subject | body | string | The subject of the email that will be sent - for operational messages only |
preheader | body | string | The preheader of the email that will be sent - for operational messages only |
classification | body | string | Template classification. Used to classify operational messages reports |
AddPrintButton | body | boolean | Add Print Button |
template_category_id | body | integer | To which category the template will be added to. Can be found using the endpoint "Get "my templates" categories". |
template_category_name | body | string | Template category Name. Will be the category name that is related to the category ID. Can be removed in a post/put endpoint |
campaign_encoding | body | SystemLanguageType | Campaign encoding of the given template. UTF-8 is recommended in a post/put endpoint |
content | body | string | The template's content. A clean text (without any design to it) or HTML content. if you send HTML content please note you should use back-slash before each quotation mark. |
The request body is a JSON object (ContentTemplateUpdateInfo).
Full reference, request and response samples
Create campaign using a specific template
POST https://webapi.mymarketing.co.il/api/templates/{Id}/campaign
| Parameter | In | Type | Description |
|---|---|---|---|
Id | path | integer | Template id. Can be found using the endpoint "Get account's "my templates"" or in the UI(go to "Emails" -> "My Templates" -> click on your desired template -> you'll find the ID at the end of the URL). Required. |
campaign_details | body | ApiCampaignDetails | The details of the campaign that you create: name, campaign subject, sending profile id, google analytics, campaign category id, sub account id and preheader. |
pairs | body | Collection of Pair | Key and value pairs: wherever a KEY (any text) appears in the template, it's replaced with its VALUE. If you send the email to several addresses at once, the values are the same for all of them. |
The request body is a JSON object (ApiCampaignPostInfo).
Full reference, request and response samples
Get "my templates" categories
GET https://webapi.mymarketing.co.il/api/templates/TemplateCategory
No parameters.
Full reference, request and response samples
Create and return a new template category
POST https://webapi.mymarketing.co.il/api/templates/TemplateCategory
| Parameter | In | Type | Description |
|---|---|---|---|
name | body | string | The category's name. |
name_key | body | string | Can be deleted in a post/put endpoints |
The request body is a JSON object (ApiTemplateCategoryPost).
Full reference, request and response samples
Update the given template category
PUT https://webapi.mymarketing.co.il/api/templates/TemplateCategory/{id}
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | integer | Category Id. Can be found using the endpoint "Get "my templates" categories". Required. |
name | body | string | The category's name. |
name_key | body | string | Can be deleted in a post/put endpoints |
The request body is a JSON object (ApiTemplateCategoryPost).
Full reference, request and response samples
Delete the given template category
DELETE https://webapi.mymarketing.co.il/api/templates/TemplateCategory/{id}
Delete the given template category. please note: if you delete a category - all the templates in this category will be deleted as well
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | integer | Category Id. Can be found using the endpoint "Get "my templates" categories" Required. |
Full reference, request and response samples
This reference is based on the ActiveTrail API documentation, where you can also test each endpoint with your own API key.