Create, update and send SMS campaigns and operational SMS messages, estimate how many messages a campaign will use, and read replies to your virtual numbers (two-way SMS).

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/smscampaign/CampaignGet account's sms campaigns (including operational sms)
GET/api/smscampaign/Campaign/{id}Get SMS campaign by id
PUT/api/smscampaign/Campaign/{id}Update SMS campaign (whether it was sent or not)
POST/api/smscampaign/CampaignCreate and return a new SMS campaign
GET/api/smscampaign/Campaign/{id}/estimateCalculating the estimated number of messages for a given campaign
GET/api/smscampaign/OperationalMessage/{id}Get SMS message by id
PUT/api/smscampaign/OperationalMessage/{id}Update operational SMS messages
POST/api/smscampaign/OperationalMessageCreate and return a new operational SMS message
GET/api/2waysms/getrepliesGet all the replies for virtual numbers

Endpoint details

Get account's sms campaigns (including operational sms)

GET https://webapi.mymarketing.co.il/api/smscampaign/Campaign

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

ParameterInTypeDescription
isIncludeNotSentquerybooleanTrue - will include campaigns that weren't sent False (also the default) - will not include campaigns that weren't sent
fromDatequerydateStart of the date range, by the date the campaign was last updated. Format: yyyy-mm-dd.
toDatequerydateEnd of the date range, by the date the campaign was last updated. Format: yyyy-mm-dd.
searchTermquerystringSearch by campaign name/partial name
filterTypequeryintegerFilter by campaign's type. Default will get all the campaigns. Types: All types of campaigns - 0 , Regular campaign - 1 , Test campaigns - 2 , Transactional (Operational) messages - 3
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 SMS campaign by id

GET https://webapi.mymarketing.co.il/api/smscampaign/Campaign/{id}
ParameterInTypeDescription
idpathintegerSMS campaign id. Can be found using the endpoint "Get account's sms campaigns.." or in the UI (go to Mobile -> SMS -> SMS list -> inspect/F12) Required.

Full reference, request and response samples

Update SMS campaign (whether it was sent or not)

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

Update SMS campaign (whether it was sent or not). You can also send the updated campaign in the process

ParameterInTypeDescription
idpathintegerSMS campaign ID. Can be found using the endpoint "Get account's sms campaigns.." or in the UI (go to Mobile -> SMS -> SMS list -> inspect/F12). Required both in the path and in the body. Required.
idbodyintegerSMS campaign ID. Can be found using the endpoint "Get account's sms campaigns.." or in the UI (go to Mobile -> SMS -> SMS list -> inspect/F12). Required both in the path and in the body. Required.
namebodystringSMS campaign name. Internal use only. Required.
from_namebodystringFrom name. Required if "sms_sending_profile_id" is not used. The sender name. The name must be up to 11 English letters without special characters or spaces.
contentbodystringSMS content. Required.
segmentbodyApiSmsCampaignSegmentCampaign segmentation and sending restrictions Required.
schedulingbodyApiSmsCampaignTimeZoneSchedulingScheduling the SMS campaign Required.
is_link_trackingbodybooleanIs links are tracked

The request body is a JSON object (ApiSmsCampaignUpdateCampaignContainer).

Full reference, request and response samples

Create and return a new SMS campaign

POST https://webapi.mymarketing.co.il/api/smscampaign/Campaign
ParameterInTypeDescription
unsubscribe_textbodystringUnsubscribe text. Required even if unsubscribed link is not used. (If you set the "can_unsubscribe" to 'false' - the text would not appear) Required.
can_unsubscribebodybooleanIf set as 'true' - an unsubscription link would be added. If set as 'false' - a link won't be added.
namebodystringSMS campaign name. Internal use only. Required.
from_namebodystringFrom name. Required if "sms_sending_profile_id" is not used. The sender name. The name must be up to 11 English letters without special characters or spaces.
contentbodystringSMS content. Required.
segmentbodyApiSmsCampaignSegmentCampaign segmentation and sending restrictions Required.
schedulingbodyApiSmsCampaignTimeZoneSchedulingScheduling the SMS campaign Required.
is_link_trackingbodybooleanIs links are tracked

The request body is a JSON object (ApiSMSCampaignDetailsCampaign).

Full reference, request and response samples

Calculating the estimated number of messages for a given campaign

GET https://webapi.mymarketing.co.il/api/smscampaign/Campaign/{id}/estimate

Calculating the estimated number of messages for a given campaign. Can be used only for campaigns that were not sent yet

ParameterInTypeDescription
idpathintegerSMS campaign id. Can be found using the endpoint "Get account's sms campaigns.." or in the UI (go to Mobile -> SMS -> SMS list -> inspect/F12) Required.

Full reference, request and response samples

Get SMS message by id

GET https://webapi.mymarketing.co.il/api/smscampaign/OperationalMessage/{id}
ParameterInTypeDescription
idpathintegerOperational SMS id. Can be found in the UI (go to Mobile -> SMS -> SMS list -> filter table by 'Transactional SMS' -> inspect/F12) Required.

Full reference, request and response samples

Update operational SMS messages

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

Update operational SMS messages. Only those who were not sent can be updated

ParameterInTypeDescription
idpathintegerOperational SMS id. Can be found in the UI (go to Mobile -> SMS -> SMS list -> filter table by 'Transactional SMS' -> inspect/F12) Required.
idbodyintegerThe sms campaign
namebodystringOperational campaign name. Internal use only. Required.
from_namebodystringFrom name. Required if "sms_sending_profile_id" is not used. The sender name. The name must be up to 11 English letters without special characters or spaces.
sms_sending_profile_idbodyintegerSMS sending profile ID. Required if "from_name" is not used. Can be found using the endpoint "Get the account Sms sending profiles" or in the UI (go to Mobile -> SMS -> Sending Profiles -> inspect/F12)
contentbodystringSMS content. Required.

The request body is a JSON object (ApiSmsCampaignUpdateContainer).

Full reference, request and response samples

Create and return a new operational SMS message

POST https://webapi.mymarketing.co.il/api/smscampaign/OperationalMessage
ParameterInTypeDescription
detailsbodyApiSMSCampaignDetailsSMS Campaign details
schedulingbodyApiSmsCampaignSchedulingScheduling the SMS campaign
mobilesbodyCollection of ApiSMSMobileThe mobile numbers that receive the SMS campaign

The request body is a JSON object (ApiSmsCampaignPostContainer).

Full reference, request and response samples

Get all the replies for virtual numbers

GET https://webapi.mymarketing.co.il/api/2waysms/getreplies
ParameterInTypeDescription
searchTermquerystringsearch by response
campaignIdqueryintegerSMS campaign id. Can be found using the endpoint "Get account's sms campaigns.." or in the UI (go to Mobile -> SMS -> SMS list -> inspect/F12)
fromDatequerydateThe first date the replies you want were created. If not specified, it will be 3 months before 'toDate' (the default value is 3 last months when both fromDate and toDate are not specified)
toDatequerydateThe last date the replies you want were created. If not specified, it will be 3 months after 'fromDate' (the default value is 3 last months when both fromDate and toDate are not specified)
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)
pagequeryintegerGet a specific page (number of pages is limited) (Range: inclusive between 1 and 2147483647)

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.