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

MethodEndpointWhat it does
GET/api/mailinglistGet account's mailing lists
GET/api/mailinglist/{Id}Get MailingList by id
POST/api/mailinglistCreate and return a new Mailing List
DELETE/api/mailinglist/{id}Delete MailingList
GET/api/mailinglist/{id}/membersGet all mailing list's members
POST/api/mailinglist/{id}/membersAdd a member to a mailing list
DELETE/api/mailinglist/{id}/members/{memberId}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}
ParameterInTypeDescription
IdpathintegerMailingList 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
ParameterInTypeDescription
NamebodystringName 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}
ParameterInTypeDescription
idpathintegerMailingList 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)

ParameterInTypeDescription
idpathintegerMailingList 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.
CustomerStatesqueryCustomerStatesFilter by contact status. Values: ALL, ACTIVE, INACTIVE, CUSTOMER_REQUEST, BOUNCED, SPAM_COMPLIENT, QUARANTINED.
FromDatequerydateStart of the date range. Format: mm-dd-yyyy.
ToDatequerydateEnd of the date range. Format: mm-dd-yyyy.
PagequeryintegerGet a specific page (number of pages is limited) (Range: inclusive between 1 and 2147483647)
LimitqueryintegerLimit 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
ParameterInTypeDescription
idpathintegerMailinglist 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.
GroupIdsbodyCollection of integerThe 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.
SubscribeIpbodystringThe Subscribe Ip
statusbodyApiStatusTypesThe contact's email status. Values: None (0), Subscribed (1), Unsubscribed (2), Pending (3).
sms_statusbodyApiStatusTypesThe contact's SMS status. Values: None (0), Subscribed (1), Unsubscribed (2), Pending (3).
DoubleOptinbodyDoubleOptinSee DoubleOptin
EmailbodystringRequired if SMS is null. please note: mandatory in the endpoint "Create a new contact" and in "Send an email operational message to individual contacts"
SMSbodystringRequired if email is null.
FirstNamebodystringContact field
LastNamebodystringContact field
AnniversarybodydateContact field
BirthdaybodydateContact field
CitybodystringContact field
FaxbodystringContact field
Phone1bodystringContact field
Phone2bodystringContact field
StreetbodystringContact field
ZipCodebodystringContact field
Ext1bodystringContact field
Ext2bodystringContact field
Ext3bodystringContact field
Ext4bodystringContact field
Ext5bodystringContact field
Ext6bodystringContact field
Ext7bodystringContact field
Ext8bodystringContact field
Ext9bodystringContact field
Ext10bodystringContact field
Ext11bodystringContact field
Ext12bodystringContact field
Ext13bodystringContact field
Ext14bodystringContact field
Ext15bodystringContact field
Ext16bodystringContact field
Ext17bodystringContact field
Ext18bodystringContact field
Ext19bodystringContact field
Ext20bodystringContact field
Ext21bodystringContact field
Ext22bodystringContact field
Ext23bodystringContact field
Ext24bodystringContact field
Ext25bodystringContact field
Date1bodydateContact field
Date2bodydateContact field
Date3bodydateContact field
Date4bodydateContact field
Date5bodydateContact field
Num1bodyintegerContact field
Num2bodyintegerContact field
Num3bodyintegerContact field
Num4bodyintegerContact field
Num5bodyintegerContact field
IsDeletedbodybooleanIf 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}
ParameterInTypeDescription
idpathintegerMailingList 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.
memberIdpathintegerContact 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.