Create, read and delete mailing lists, and add or remove their members.
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 mailing lists |
GET | /api/ | Get MailingList by id |
POST | /api/ | Create and return a new Mailing List |
DELETE | /api/ | Delete MailingList |
GET | /api/ | Get all mailing list's members |
POST | /api/ | Add a member to a mailing list |
DELETE | /api/ | Remove member from mailing list |
Endpoint details
Get account's mailing lists
GET https://webapi.mymarketing.co.il/api/mailinglist
No parameters.
Full reference, request and response samples
Get MailingList by id
GET https://webapi.mymarketing.co.il/api/mailinglist/{Id}
| Parameter | In | Type | Description |
|---|---|---|---|
Id | path | integer | MailingList id. Can be found using the endpoint "Get account's mailing lists" or in the UI (go to Contacts->Mailing Lists->click on the mailing lists's name -> you'll find the id in the URL) Required. |
Full reference, request and response samples
Create and return a new Mailing List
POST https://webapi.mymarketing.co.il/api/mailinglist
| Parameter | In | Type | Description |
|---|---|---|---|
Name | body | string | Name of the Mailing List |
The request body is a JSON object (MailingListDTO).
Full reference, request and response samples
Delete MailingList
DELETE https://webapi.mymarketing.co.il/api/mailinglist/{id}
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | integer | MailingList id. Can be found using the endpoint "Get account's mailing lists" or in the UI (go to Contacts->Mailing Lists->click on the mailing lists's name -> you'll find the id in the URL) Required. |
Full reference, request and response samples
Get all mailing list's members
GET https://webapi.mymarketing.co.il/api/mailinglist/{id}/members
Get all mailing list's members. You can get the list filtered by customer status (active, unsubscribed, bounced. etc.,) by the state change date (from/to date, the default is three months back)
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | integer | MailingList id. Can be found using the endpoint "Get account's mailing lists" or in the UI (go to Contacts->Mailing Lists->click on the mailing lists's name -> you'll find the id in the URL) Required. |
CustomerStates | query | CustomerStates | Filter by contact status. Values: ALL, ACTIVE, INACTIVE, CUSTOMER_REQUEST, BOUNCED, SPAM_COMPLIENT, QUARANTINED. |
FromDate | query | date | Start of the date range. Format: mm-dd-yyyy. |
ToDate | query | date | End of the date range. Format: mm-dd-yyyy. |
Page | query | integer | Get a specific page (number of pages is limited) (Range: inclusive between 1 and 2147483647) |
Limit | query | integer | Limit the number of items you get in the results. (Removing the "limit" will, by default, display only 20 records) (Range: inclusive between 1 and 100) |
Full reference, request and response samples
Add a member to a mailing list
POST https://webapi.mymarketing.co.il/api/mailinglist/{id}/members
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | integer | Mailinglist id. Can be found using the endpoint "Get account's mailing lists" or in the UI (go to Contacts->Mailing Lists->click on the mailing lists's name -> you'll find the id in the URL) Required. |
GroupIds | body | Collection of integer | The groups' id the contacts will be added to separated with commas (,). Can be found using the endpoint "Get account's groups" or in the UI (go to Contacts->Groups->click on the group's name -> you'll find the id in the URL) Required. |
SubscribeIp | body | string | The Subscribe Ip |
status | body | ApiStatusTypes | The contact's email status. Values: None (0), Subscribed (1), Unsubscribed (2), Pending (3). |
sms_status | body | ApiStatusTypes | The contact's SMS status. Values: None (0), Subscribed (1), Unsubscribed (2), Pending (3). |
DoubleOptin | body | DoubleOptin | See DoubleOptin |
Email | body | string | Required if SMS is null. please note: mandatory in the endpoint "Create a new contact" and in "Send an email operational message to individual contacts" |
SMS | body | string | Required if email is null. |
FirstName | body | string | Contact field |
LastName | body | string | Contact field |
Anniversary | body | date | Contact field |
Birthday | body | date | Contact field |
City | body | string | Contact field |
Fax | body | string | Contact field |
Phone1 | body | string | Contact field |
Phone2 | body | string | Contact field |
Street | body | string | Contact field |
ZipCode | body | string | Contact field |
Ext1 | body | string | Contact field |
Ext2 | body | string | Contact field |
Ext3 | body | string | Contact field |
Ext4 | body | string | Contact field |
Ext5 | body | string | Contact field |
Ext6 | body | string | Contact field |
Ext7 | body | string | Contact field |
Ext8 | body | string | Contact field |
Ext9 | body | string | Contact field |
Ext10 | body | string | Contact field |
Ext11 | body | string | Contact field |
Ext12 | body | string | Contact field |
Ext13 | body | string | Contact field |
Ext14 | body | string | Contact field |
Ext15 | body | string | Contact field |
Ext16 | body | string | Contact field |
Ext17 | body | string | Contact field |
Ext18 | body | string | Contact field |
Ext19 | body | string | Contact field |
Ext20 | body | string | Contact field |
Ext21 | body | string | Contact field |
Ext22 | body | string | Contact field |
Ext23 | body | string | Contact field |
Ext24 | body | string | Contact field |
Ext25 | body | string | Contact field |
Date1 | body | date | Contact field |
Date2 | body | date | Contact field |
Date3 | body | date | Contact field |
Date4 | body | date | Contact field |
Date5 | body | date | Contact field |
Num1 | body | integer | Contact field |
Num2 | body | integer | Contact field |
Num3 | body | integer | Contact field |
Num4 | body | integer | Contact field |
Num5 | body | integer | Contact field |
IsDeleted | body | boolean | If true - contact will be deleted. If false - contact will be restored if deleted (their status will be the last status they were on ActiveTrail). |
The request body is a JSON object (MailingListContactDTO).
Full reference, request and response samples
Remove member from mailing list
DELETE https://webapi.mymarketing.co.il/api/mailinglist/{id}/members/{memberId}
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | integer | MailingList id. Can be found using the endpoint "Get account's mailing lists" or in the UI (go to Contacts->Mailing Lists->click on the mailing lists's name -> you'll find the id in the URL) Required. |
memberId | path | integer | Contact id. Can be found using the "Get all mailing list's members..." endpoint 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.