Create, update, find and delete contacts, import up to 1,000 contacts per call, resolve merge conflicts, and read a contact's groups, mailing lists, activity, bounces, statistics and subscription history.

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/contactsGet account's contacts list
GET/api/contacts/{id}Get contact details by contact id
GET/api/contacts/GetWithSmsStateGet account's contacts list, with each contact's SMS status as well as its email status
POST/api/contactsCreate and return a new contact
POST/api/contacts/ImportImport contacts to a group
PUT/api/contacts/{id}Update contact details
DELETE/api/contacts/{id}Delete the given Contact
GET/api/contacts/mergesGet contacts in merge conflict
GET/api/contacts/merges/{id}Get a specific merge conflict information
PUT/api/contacts/merges/{id}Resolve the given conflict
DELETE/api/contacts/merges/{id}Delete a merge conflict
GET/api/contacts/{id}/groupsGet contact's groups
GET/api/contacts/{id}/activityGet contact's activity on any email that was sent to them
GET/api/contacts/{id}/errorsGet contact's bounces
GET/api/contacts/Subscription/AllContactsGet contacts' status and the source of their status (if known)
GET/api/contacts/Subscription/UnsubscribersGet all unsubscribers and the source of their status (if known)
GET/api/contacts/Subscription/SubscribersGet all subscribers and the source of their status (if known)
GET/api/contacts/Subscription/CustomersStatusGet statistics of contacts' statuses from specific dates
GET/api/contacts/unsubscribers/smsGets all contacts that are unsubscribed from getting sms messages
GET/api/contacts/{id}/Statistics/Campaign/{campaignId}Gets contact's statistics for specific campaign
GET/api/contacts/{id}/Statistics/OperationMessage/{messageId}Gets customer statistics for specific operation message
GET/api/contacts/{id}/Statistics/SmsOperationMessage/{messageId}Gets contact's statistics for specific sms operational message
GET/api/contacts/{id}/mailinglistsGet contact's mailing lists

Endpoint details

Get account's contacts list

GET https://webapi.mymarketing.co.il/api/contacts

Get account's contacts list. 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
customer_statesqueryCustomerStatesFilter by contact status. A contact matches if its email or SMS status is one of them. Values: ALL, ACTIVE, INACTIVE, CUSTOMER_REQUEST, BOUNCED, SPAM_COMPLIENT, QUARANTINED.
search_termquerystringSearch by email/sms. please note: you cannot search for emails that contain the plus sign.
from_datequerydateStart of the date range. Format: mm-dd-yyyy.
to_datequerydateEnd 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

Get contact details by contact id

GET https://webapi.mymarketing.co.il/api/contacts/{id}
ParameterInTypeDescription
idpathintegerContact id. Can be found using the endpoint "Get account's contacts list...." Required.

Full reference, request and response samples

Get account's contacts list, with each contact's SMS status as well as its email status

GET https://webapi.mymarketing.co.il/api/contacts/GetWithSmsState

Get account's contacts list, with each contact's SMS status (sms_state) as well as its email status (state). You can filter by status (it's enough that the email or the SMS status matches), by search term and by the date the status changed (by default, the last 3 months). If no contact matches, the response is an empty list, not 404.

ParameterInTypeDescription
customer_statesqueryCustomerStatesFilter by contact status. A contact matches if its email or SMS status is one of them. Values: ALL, ACTIVE, INACTIVE, CUSTOMER_REQUEST, BOUNCED, SPAM_COMPLIENT, QUARANTINED.
search_termquerystringSearch by email/sms. please note: you cannot search for emails that contain the plus sign.
from_datequerydateStart of the date range.
to_datequerydateEnd of the date range.
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

Create and return a new contact

POST https://webapi.mymarketing.co.il/api/contacts

Create and return a new contact. Please note: if the contact does not exist in the account they will be added but won't be linked to any group - making it impossible to send him email/sms.

ParameterInTypeDescription
subscribe_ipbodystringThe 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).
double_optinbodyDoubleOptinSee 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.
first_namebodystringContact field
last_namebodystringContact field
anniversarybodydateContact field
birthdaybodydateContact field
citybodystringContact field
faxbodystringContact field
phone1bodystringContact field
phone2bodystringContact field
streetbodystringContact field
zip_codebodystringContact field
ext1 … num5bodystring / date / numberCustom contact fields (35 fields). Same meaning as the contact fields in ActiveTrail.
is_deletedbodybooleanIf 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 (PostContactContainer).

Full reference, request and response samples

Import contacts to a group

POST https://webapi.mymarketing.co.il/api/contacts/Import

Import contacts to a group. Limited to 1000 contacts per call.

ParameterInTypeDescription
mailing_listbodyintegerMailing list id. Delete it if you don't have mailing lists on your account. 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)
groupbodyintegerGroup id. Required. 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)
contactsbodyCollection of ApiImportContactContacts - imports contacts is limited to 1000

The request body is a JSON object (ImportContactsContainer).

Full reference, request and response samples

Update contact details

PUT https://webapi.mymarketing.co.il/api/contacts/{id}
ParameterInTypeDescription
idpathintegerContact id. Can be found using the endpoint "Get account's contacts list...." Required.
subscribe_ipbodystringThe 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).
double_optinbodyDoubleOptinSee 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.
first_namebodystringContact field
last_namebodystringContact field
anniversarybodydateContact field
birthdaybodydateContact field
citybodystringContact field
faxbodystringContact field
phone1bodystringContact field
phone2bodystringContact field
streetbodystringContact field
zip_codebodystringContact field
ext1 … num5bodystring / date / numberCustom contact fields (35 fields). Same meaning as the contact fields in ActiveTrail.
is_deletedbodybooleanIf 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 (UpdateContactContainer).

Full reference, request and response samples

Delete the given Contact

DELETE https://webapi.mymarketing.co.il/api/contacts/{id}
ParameterInTypeDescription
idpathintegerContact id. Can be found using the endpoint "Get account's contacts list...." Required.

Full reference, request and response samples

Get contacts in merge conflict

GET https://webapi.mymarketing.co.il/api/contacts/merges

Get contacts in merge conflict You can get the list filtered by conflict status (active, inactive, deleted, etc.) by the conflict's occurrence date (from/to date, the default is three months back) and limited to a number of conflicts

ParameterInTypeDescription
StateTypequeryTypesStateTypes
from_datequerydateStart of the date range.
to_datequerydateEnd of the date range.
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

Get a specific merge conflict information

GET https://webapi.mymarketing.co.il/api/contacts/merges/{id}
ParameterInTypeDescription
idpathintegerMerge conflict id. Can be found via the endpoint "Get contacts in merge conflict...." Required.

Full reference, request and response samples

Resolve the given conflict

PUT https://webapi.mymarketing.co.il/api/contacts/merges/{id}
ParameterInTypeDescription
idpathstringMerge conflict id. Can be found via the endpoint "Get contacts in merge conflict...." Required.
idbodyintegerContact field
pending_customerbodyApiImportContact
pending_customerbodyApiMergeContactDetails of the pending customer to be merged.
exist_email_customerbodyContactContainerItemDetails of the existing customer with email to be merged.
exist_sms_customerbodyContactContainerItemDetails of the existing customer with SMS to be merged.
merge_state_typebodyMergeContactStateTypeType of merge state.please note: you can only solve merge conflicts if their status is Active

The request body is a JSON object (PostMergeConflictContainer).

Full reference, request and response samples

Delete a merge conflict

DELETE https://webapi.mymarketing.co.il/api/contacts/merges/{id}
ParameterInTypeDescription
idpathintegerMerge conflict id. Can be found via the endpoint "Get contacts in merge conflict...." Required.

Full reference, request and response samples

Get contact's groups

GET https://webapi.mymarketing.co.il/api/contacts/{id}/groups
ParameterInTypeDescription
idpathintegerContact id. Can be found using the endpoint "Get account's contacts list...." Required.

Full reference, request and response samples

Get contact's activity on any email that was sent to them

GET https://webapi.mymarketing.co.il/api/contacts/{id}/activity
ParameterInTypeDescription
idpathintegerContact id. Can be found using the endpoint "Get account's contacts list...." Required.

Full reference, request and response samples

Get contact's bounces

GET https://webapi.mymarketing.co.il/api/contacts/{id}/errors
ParameterInTypeDescription
idpathintegerContact id. Can be found using the endpoint "Get account's contacts list...." Required.

Full reference, request and response samples

Get contacts' status and the source of their status (if known)

GET https://webapi.mymarketing.co.il/api/contacts/Subscription/AllContacts

Get contacts' status and the source of their status (if known). You can filter the endpoint by contacts' creation date (from/to date, the default is three months back)

ParameterInTypeDescription
from_datequerydateStart of the date range. Format: yyyy-mm-dd.
to_datequerydateEnd of the date range. Format: yyyy-mm-dd.
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

Get all unsubscribers and the source of their status (if known)

GET https://webapi.mymarketing.co.il/api/contacts/Subscription/Unsubscribers

Get all unsubscribers and the source of their status (if known). You can choose to get all unsubscription between specific dates (from/to date, the default is three months back)

ParameterInTypeDescription
from_datequerydateStart of the date range. Format: yyyy-mm-dd.
to_datequerydateEnd of the date range. Format: yyyy-mm-dd.
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

Get all subscribers and the source of their status (if known)

GET https://webapi.mymarketing.co.il/api/contacts/Subscription/Subscribers

Get all subscribers and the source of their status (if known). You can choose to get all subscriptions between specific dates (from/to date, the default is three months back)

ParameterInTypeDescription
from_datequerydateStart of the date range. Format: yyyy-mm-dd.
to_datequerydateEnd of the date range. Format: yyyy-mm-dd.
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

Get statistics of contacts' statuses from specific dates

GET https://webapi.mymarketing.co.il/api/contacts/Subscription/CustomersStatus

Get statistics of contacts' statuses from specific dates. You can choose to get statistics between specific dates (from/to date, the default is three months back)

ParameterInTypeDescription
from_datequerydateThe first date the contacts you want were created
to_datequerydateThe last date the contacts you want were created

Full reference, request and response samples

Gets all contacts that are unsubscribed from getting sms messages

GET https://webapi.mymarketing.co.il/api/contacts/unsubscribers/sms

No parameters.

Full reference, request and response samples

Gets contact's statistics for specific campaign

GET https://webapi.mymarketing.co.il/api/contacts/{id}/Statistics/Campaign/{campaignId}
ParameterInTypeDescription
idpathintegerContact id. Can be found using the endpoint "Get account's contacts list...." Required.
campaignIdpathintegerCan be found using the endpoint "Get account's email campaigns..." or in the UI (go to Emails->Emails Lists->click on the campaign's preview -> you'll find the id in the URL) Required.

Full reference, request and response samples

Gets customer statistics for specific operation message

GET https://webapi.mymarketing.co.il/api/contacts/{id}/Statistics/OperationMessage/{messageId}
ParameterInTypeDescription
idpathinteger Required.
messageIdpathinteger Required.

Full reference, request and response samples

Gets contact's statistics for specific sms operational message

GET https://webapi.mymarketing.co.il/api/contacts/{id}/Statistics/SmsOperationMessage/{messageId}
ParameterInTypeDescription
idpathintegerContact id. Can be found using the endpoint "Get account's contacts list...." Required.
messageIdpathintegerAfter sending an operational sms - you need to save the id. There will be no other way to find the sms' id that was sent to a specific contact Required.

Full reference, request and response samples

Get contact's mailing lists

GET https://webapi.mymarketing.co.il/api/contacts/{id}/mailinglists
ParameterInTypeDescription
idpathintegerContact id. Can be found using the endpoint "Get account's contacts list...." 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.