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
| Method | Endpoint | What it does |
|---|---|---|
GET | /api/ | Get account's sms campaigns (including operational sms) |
GET | /api/ | Get SMS campaign by id |
PUT | /api/ | Update SMS campaign (whether it was sent or not) |
POST | /api/ | Create and return a new SMS campaign |
GET | /api/ | Calculating the estimated number of messages for a given campaign |
GET | /api/ | Get SMS message by id |
PUT | /api/ | Update operational SMS messages |
POST | /api/ | Create and return a new operational SMS message |
GET | /api/ | Get 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)
| Parameter | In | Type | Description |
|---|---|---|---|
isIncludeNotSent | query | boolean | True - will include campaigns that weren't sent False (also the default) - will not include campaigns that weren't sent |
fromDate | query | date | Start of the date range, by the date the campaign was last updated. Format: yyyy-mm-dd. |
toDate | query | date | End of the date range, by the date the campaign was last updated. Format: yyyy-mm-dd. |
searchTerm | query | string | Search by campaign name/partial name |
filterType | query | integer | Filter 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 |
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 SMS campaign by id
GET https://webapi.mymarketing.co.il/api/smscampaign/Campaign/{id}
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | integer | SMS 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
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | integer | SMS 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. |
id | body | integer | SMS 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. |
name | body | string | SMS campaign name. Internal use only. Required. |
from_name | body | string | From 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. |
content | body | string | SMS content. Required. |
segment | body | ApiSmsCampaignSegment | Campaign segmentation and sending restrictions Required. |
scheduling | body | ApiSmsCampaignTimeZoneScheduling | Scheduling the SMS campaign Required. |
is_link_tracking | body | boolean | Is 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
| Parameter | In | Type | Description |
|---|---|---|---|
unsubscribe_text | body | string | Unsubscribe text. Required even if unsubscribed link is not used. (If you set the "can_unsubscribe" to 'false' - the text would not appear) Required. |
can_unsubscribe | body | boolean | If set as 'true' - an unsubscription link would be added. If set as 'false' - a link won't be added. |
name | body | string | SMS campaign name. Internal use only. Required. |
from_name | body | string | From 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. |
content | body | string | SMS content. Required. |
segment | body | ApiSmsCampaignSegment | Campaign segmentation and sending restrictions Required. |
scheduling | body | ApiSmsCampaignTimeZoneScheduling | Scheduling the SMS campaign Required. |
is_link_tracking | body | boolean | Is 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
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | integer | SMS 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}
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | integer | Operational 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
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | integer | Operational SMS id. Can be found in the UI (go to Mobile -> SMS -> SMS list -> filter table by 'Transactional SMS' -> inspect/F12) Required. |
id | body | integer | The sms campaign |
name | body | string | Operational campaign name. Internal use only. Required. |
from_name | body | string | From 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_id | body | integer | SMS 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) |
content | body | string | SMS 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
| Parameter | In | Type | Description |
|---|---|---|---|
details | body | ApiSMSCampaignDetails | SMS Campaign details |
scheduling | body | ApiSmsCampaignScheduling | Scheduling the SMS campaign |
mobiles | body | Collection of ApiSMSMobile | The 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
| Parameter | In | Type | Description |
|---|---|---|---|
searchTerm | query | string | search by response |
campaignId | query | integer | SMS 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) |
fromDate | query | date | The 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) |
toDate | query | date | The 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) |
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) |
page | query | integer | Get 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.