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
| Method | Endpoint | What it does |
|---|---|---|
GET | /api/ | Get account's contacts list |
GET | /api/ | Get contact details by contact id |
GET | /api/ | Get account's contacts list, with each contact's SMS status as well as its email status |
POST | /api/ | Create and return a new contact |
POST | /api/ | Import contacts to a group |
PUT | /api/ | Update contact details |
DELETE | /api/ | Delete the given Contact |
GET | /api/ | Get contacts in merge conflict |
GET | /api/ | Get a specific merge conflict information |
PUT | /api/ | Resolve the given conflict |
DELETE | /api/ | Delete a merge conflict |
GET | /api/ | Get contact's groups |
GET | /api/ | Get contact's activity on any email that was sent to them |
GET | /api/ | Get contact's bounces |
GET | /api/ | Get contacts' status and the source of their status (if known) |
GET | /api/ | Get all unsubscribers and the source of their status (if known) |
GET | /api/ | Get all subscribers and the source of their status (if known) |
GET | /api/ | Get statistics of contacts' statuses from specific dates |
GET | /api/ | Gets all contacts that are unsubscribed from getting sms messages |
GET | /api/ | Gets contact's statistics for specific campaign |
GET | /api/ | Gets customer statistics for specific operation message |
GET | /api/ | Gets contact's statistics for specific sms operational message |
GET | /api/ | Get 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)
| Parameter | In | Type | Description |
|---|---|---|---|
customer_states | query | CustomerStates | Filter 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_term | query | string | Search by email/sms. please note: you cannot search for emails that contain the plus sign. |
from_date | query | date | Start of the date range. Format: mm-dd-yyyy. |
to_date | 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
Get contact details by contact id
GET https://webapi.mymarketing.co.il/api/contacts/{id}
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | integer | Contact 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.
| Parameter | In | Type | Description |
|---|---|---|---|
customer_states | query | CustomerStates | Filter 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_term | query | string | Search by email/sms. please note: you cannot search for emails that contain the plus sign. |
from_date | query | date | Start of the date range. |
to_date | query | date | End of the date range. |
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
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.
| Parameter | In | Type | Description |
|---|---|---|---|
subscribe_ip | 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). |
double_optin | 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. |
first_name | body | string | Contact field |
last_name | 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 |
zip_code | body | string | Contact field |
ext1 … num5 | body | string / date / number | Custom contact fields (35 fields). Same meaning as the contact fields in ActiveTrail. |
is_deleted | 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 (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.
| Parameter | In | Type | Description |
|---|---|---|---|
mailing_list | body | integer | Mailing 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) |
group | body | integer | Group 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) |
contacts | body | Collection of ApiImportContact | Contacts - 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}
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | integer | Contact id. Can be found using the endpoint "Get account's contacts list...." Required. |
subscribe_ip | 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). |
double_optin | 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. |
first_name | body | string | Contact field |
last_name | 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 |
zip_code | body | string | Contact field |
ext1 … num5 | body | string / date / number | Custom contact fields (35 fields). Same meaning as the contact fields in ActiveTrail. |
is_deleted | 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 (UpdateContactContainer).
Full reference, request and response samples
Delete the given Contact
DELETE https://webapi.mymarketing.co.il/api/contacts/{id}
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | integer | Contact 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
| Parameter | In | Type | Description |
|---|---|---|---|
StateType | query | TypesStateTypes | |
from_date | query | date | Start of the date range. |
to_date | query | date | End of the date range. |
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
Get a specific merge conflict information
GET https://webapi.mymarketing.co.il/api/contacts/merges/{id}
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | integer | Merge 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}
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | string | Merge conflict id. Can be found via the endpoint "Get contacts in merge conflict...." Required. |
id | body | integer | Contact field |
pending_customer | body | ApiImportContact | |
pending_customer | body | ApiMergeContact | Details of the pending customer to be merged. |
exist_email_customer | body | ContactContainerItem | Details of the existing customer with email to be merged. |
exist_sms_customer | body | ContactContainerItem | Details of the existing customer with SMS to be merged. |
merge_state_type | body | MergeContactStateType | Type 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}
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | integer | Merge 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
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | integer | Contact 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
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | integer | Contact 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
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | integer | Contact 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)
| Parameter | In | Type | Description |
|---|---|---|---|
from_date | query | date | Start of the date range. Format: yyyy-mm-dd. |
to_date | query | date | End of the date range. Format: yyyy-mm-dd. |
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
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)
| Parameter | In | Type | Description |
|---|---|---|---|
from_date | query | date | Start of the date range. Format: yyyy-mm-dd. |
to_date | query | date | End of the date range. Format: yyyy-mm-dd. |
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
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)
| Parameter | In | Type | Description |
|---|---|---|---|
from_date | query | date | Start of the date range. Format: yyyy-mm-dd. |
to_date | query | date | End of the date range. Format: yyyy-mm-dd. |
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
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)
| Parameter | In | Type | Description |
|---|---|---|---|
from_date | query | date | The first date the contacts you want were created |
to_date | query | date | The 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}
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | integer | Contact id. Can be found using the endpoint "Get account's contacts list...." Required. |
campaignId | path | integer | Can 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}
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | integer | Required. |
messageId | path | integer | 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}
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | integer | Contact id. Can be found using the endpoint "Get account's contacts list...." Required. |
messageId | path | integer | After 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
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | integer | Contact 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.