Create, send, schedule, update and delete email campaigns, to groups or to individual contacts.

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/campaignsGet account's email campaigns
GET/api/campaigns/{id}Get campaign by id
POST/api/campaignsCreate and return a new campaign for specific groups
PUT/api/campaigns/{id}Update a given campaign
GET/api/campaigns/{id}/detailsGet campaign details
PUT/api/campaigns/{id}/detailsUpdate campaign details
GET/api/campaigns/{id}/templateGet campaign template
PUT/api/campaigns/{id}/templateUpdate campaign template
GET/api/campaigns/{id}/designGet campaign design
PUT/api/campaigns/{id}/designUpdate campaign design
GET/api/campaigns/{id}/segmentGet campaign sending settings (groups and sending restrictions)
PUT/api/campaigns/{id}/segmentUpdate campaign sending settings (groups and sending restrictions)
GET/api/campaigns/{id}/schedulingGet campaign schedule
PUT/api/campaigns/{id}/schedulingUpdate campaign schedule
DELETE/api/campaigns/{id}Delete campaign
GET/api/campaigns/SentCampaignsReturn a list of sent campaigns
POST/api/campaigns/ContactsCreate and return a new campaign for specific contacts

Endpoint details

Get account's email campaigns

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

Get account's email campaigns. You can get campaigns filtered by various parameters including date and limited to a number of campaigns (you will get campaigns that were last updated in the last 3 months by default)

ParameterInTypeDescription
mailing_list_idqueryintegerMailing list id. Use it only if you have mailing lists in 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).
content_category_idqueryintegerCategory id. Can be found using the endpoint "Get the account's categories."
search_termquerystringcampaign's name/partial name
send_typequeryCampaignSendTypeCampaign sent types
from_datequerydateStart of the date range, by the date the campaign was last updated. Format: yyyy-mm-dd.
to_datequerydateEnd of the date range, by the date the campaign was last updated. 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 campaign by id

GET https://webapi.mymarketing.co.il/api/campaigns/{id}
ParameterInTypeDescription
idpathintegerCampaign id. 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

Create and return a new campaign for specific groups

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

Create and return a new campaign for specific groups. The campaign can be a regular, A/B split or e-commerce campaign.

ParameterInTypeDescription
schedulingbodyApiCampaignSchedulingWhen to send the campaign. Set is_sent to true and scheduled_date_utc to the send time (the current time sends it right away); set is_sent to false to only create the campaign. Required.
cartsbodyApiEcommerceDataListYour e-commerce data. This section has to be enabled for your account: contact ActiveTrail Support.
pairsbodyCollection of Paircan be used whether you chose to use the "content" or "template" parameters. The KEY can be any value (text type) you want. If the value is found in the template/content, it will be replaced with the corresponding VALUE. please note: if you send the email to a number of emails at the same time - the key and value cannot be personalized to each customer
segmentbodyApiCampaignRestrictionsSegmentCampaign restrictions. If you use A/B testing, the restriction would work both on version A and version B (but not on the winning campaign)
send_testbodystringEmail addresses you'd like to send a test email, should be separated by comma(,).
detailsbodyApiCampaignDetails Required.
designbodyApiCampaignDesign Required.
templatebodyApiCampaignTemplate
a_b_settingsbodyApiABSettings

The request body is a JSON object (ApiCampaignPost).

Full reference, request and response samples

Update a given campaign

PUT https://webapi.mymarketing.co.il/api/campaigns/{id}

Update a given campaign. Please note: only campaigns that are in a draft mode can be updated.

ParameterInTypeDescription
idpathintegerCampaign id Required.
send_testbodystringEmail addresses you'd like to send a test email, should be separated by comma(,).
detailsbodyApiCampaignDetails Required.
designbodyApiCampaignDesign Required.
templatebodyApiCampaignTemplate
a_b_settingsbodyApiABSettings
cartsbodyApiEcommerceDataList
pairsbodyCollection of Pair

The request body is a JSON object (ApiCampaignPut).

Full reference, request and response samples

Get campaign details

GET https://webapi.mymarketing.co.il/api/campaigns/{id}/details
ParameterInTypeDescription
idpathintegerCampaign id. 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

Update campaign details

PUT https://webapi.mymarketing.co.il/api/campaigns/{id}/details

Update campaign details. Please note: only campaigns that are in draft mode can be updated

ParameterInTypeDescription
idpathintegerCampaign id. 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.
namebodystringThe campaign's name. Internal use only. Required.
subjectbodystringCampaign Subject Required.
user_profile_idbodyintegerUser profile ID. Required only in a Post endpoint. The email address of which the message will be sent from. Can be found using the endpoint "Get the account emails sending profiles" or in the UI (go to Emails -> Sending Profiles -> inspect/F12)
google_analytics_namebodystringIntegrate your campaigns with google analytics. The campaign must be in English with no special characters or spaces. please note: if already have utm on your links - the integration will not work and the link might not be reachable
content_category_idbodyintegerCatalog the campaigns to categories. Categories IDs can be found using the endpoint "Get the account's categories". If you remove the parameter, the catagory would automatically be the default category
preheaderbodystringShort summary text that follows the subject line when viewing an email from the inbox. If you use A/B testing - it will be identical to both versions
predictive_deliverybodybooleanSpecify if predictive delivery is enabled. If you don't have predictive delivery feature in your account - remove this parameter

The request body is a JSON object (ApiCampaignDetails).

Full reference, request and response samples

Get campaign template

GET https://webapi.mymarketing.co.il/api/campaigns/{id}/template
ParameterInTypeDescription
idpathintegerCampaign id. 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

Update campaign template

PUT https://webapi.mymarketing.co.il/api/campaigns/{id}/template

Update campaign template. Please note: only campaigns that are in draft mode can be updated

ParameterInTypeDescription
idpathintegerCampaign id. 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.
idbodyintegerTemplate 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). Only required if you don't use the "content" parameter.

The request body is a JSON object (ApiCampaignTemplate).

Full reference, request and response samples

Get campaign design

GET https://webapi.mymarketing.co.il/api/campaigns/{id}/design
ParameterInTypeDescription
idpathintegerCampaign id. 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

Update campaign design

PUT https://webapi.mymarketing.co.il/api/campaigns/{id}/design

Update campaign design. Please note: only campaigns that are in draft mode can be updated

ParameterInTypeDescription
idpathintegerCampaign id. 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.
contentbodystringCampaign content. Can be a simple text or HTML. Required only if you create a new A/B testing (email campaign - version A). If you don't - only required if you don't use the "template" parameter.
language_typebodySystemLanguageTypeSet your campaign language type - using "UTF-8" is recommended
header_footer_language_typebodySystemLanguageTypeSet your campaign language type - using "UTF-8" is recommended
is_add_print_emailbodybooleanAdd a 'print email' button
is_auto_css_inlinerbodybooleanAn option to set the CSS inline in the HTML content

The request body is a JSON object (ApiCampaignDesign).

Full reference, request and response samples

Get campaign sending settings (groups and sending restrictions)

GET https://webapi.mymarketing.co.il/api/campaigns/{id}/segment
ParameterInTypeDescription
idpathintegerCampaign id Required.

Full reference, request and response samples

Update campaign sending settings (groups and sending restrictions)

PUT https://webapi.mymarketing.co.il/api/campaigns/{id}/segment

Update campaign sending settings (groups and sending restrictions). Please note: only campaigns that are in draft mode can be updated

ParameterInTypeDescription
idpathintegerCampaign id. 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.
limit_amountbodyintegerLimit the number of emails
limit_per_hourbodyintegerLimit the number of emails to send per hour
last_days_not_receivedbodyintegerSend only to users who have not received an email in the specified number of days
groups_excluded_idsbodyCollection of integerDo not send the email to users that are in those groups. IDs 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)
not_opened_campaign_idsbodyCollection of integerRestrict the sending of the campaign to users who have not opened the following emails. 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)
not_received_campaign_idsbodyCollection of integerRestrict to users that did not receive the following emails. 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)
group_idsbodyCollection of integerList of group IDs that will receive the campaign. 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.
mailing_list_idbodyintegerMailing list Id. Required if you have mailing lists on your account - if not, remove this parameter. 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)

The request body is a JSON object (ApiCampaignRestrictionsSegment).

Full reference, request and response samples

Get campaign schedule

GET https://webapi.mymarketing.co.il/api/campaigns/{id}/scheduling
ParameterInTypeDescription
idpathintegerCampaign id. 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

Update campaign schedule

PUT https://webapi.mymarketing.co.il/api/campaigns/{id}/scheduling

Update campaign schedule. Please note: only campaigns that are in draft mode can be updated

ParameterInTypeDescription
idpathintegerCampaign id. 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.
is_sentbodybooleanWhether or not to send the campaign. Required.
scheduled_date_utcbodydateThe date the campaign will be/was sent. If you use the post endpoint - date cannot be in past time. Required.

The request body is a JSON object (ApiCampaignScheduling).

Full reference, request and response samples

Delete campaign

DELETE https://webapi.mymarketing.co.il/api/campaigns/{id}
ParameterInTypeDescription
idpathintegerCampaign id. 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

Return a list of sent campaigns

GET https://webapi.mymarketing.co.il/api/campaigns/SentCampaigns

No parameters.

Full reference, request and response samples

Create and return a new campaign for specific contacts

POST https://webapi.mymarketing.co.il/api/campaigns/Contacts

Create and return a new campaign for specific contacts. The campaign can be a regular, A/B split or e-commerce campaign.

ParameterInTypeDescription
campaignbodyApiCampaignUpdateContainer
campaign_contactsbodyApiCampaignContact

The request body is a JSON object (ApiCampaignContactPost).

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.