SMS Campaign

SMS Marketing is sending promotional broadcast or transactional messages for marketing purposes to your contact lists through SMS.

You can automate workflows for effective communications like time-sensitive offers, updates and alerts to the people of have consented to receive messages from your business.

Here are the advantages of sending SMS Campaigns:

It builds customer loyalty, nurtures leads, and increases direct sales. It improves brand awareness every time a recipient clicks on your sms. It automates sending bulk sms which are time-consuming processes. You can also observe in real time how the SMS campaign is performing.

If you’re not using campaign in your sms marketing efforts, you’re undermining your campaign’s full potential. The following description will help you get a better understanding of some of the functionalities.

Showing

  • This API endpoint allows you to get all campaign list.
  • You can send GET request and campaign filter to /campaign API.
  • Taximail API will return all campaign list such as campaign_count and an array of campaigns data.

GET https://api.taximail.com/v2/campaign

Parameter Type Description Required
campaign_mode enum {Sent, Outbox, Draft, Paused, Scheduled, Repeatly, PendingApproval} Status of campaigns to retrieve. Yes
order_by enum {campaign_name, create_date, sent_success_date} Specify the column which is used to sort the result-set.

Defaults to create_date.
order_type enum {asc, desc} To sort the records in a ascending or descending order.

Defaults to desc.
page integer Specify the page number for reading result.

Defaults to 1.
limit integer The number of items to return per page, up to a maximum of 100.

Defaults to 25.

Example Request

GET v2/campaign HTTP/1.1
Host: api.taximail.com
Authorization: "Bearer YOUR_SESSION_ID"

Example Result

{
    "status": "success",
    "code": 200,
    "data": {
              "campaign_count": 3,
              "max_page": 1,
              "campaigns": [
                    {
                          "campaign_id": 1620,
                          "campaign_status": "Sent",
                          "campaign_name": "My Campaign A",
                          "ab_mode": "F",
                          "email_id": 1764,
                          "date_time": "2015-12-08 11:48:04",
                          "sent_count": 2000,
                          "preview_campaign": "http://corporate-name.th.listmng.com/b/16/1620",
                          "opened": 20
                    },
                    {
                          "campaign_id": 1621,
                          "campaign_status": "Sent",
                          "campaign_name": "My Campaign B",
                          "ab_mode": "F",
                          "email_id": 1765,
                          "date_time": "2015-12-08 11:48:04",
                          "sent_count": 3000,
                          "preview_campaign": "http://corporate-name.th.listmng.com/b/16/1621",
                          "opened": 20
                    },
                    {
                          "campaign_id": 1622,
                          "campaign_status": "Sent",
                          "campaign_name": "My Campaign C",
                          "ab_mode": "F",
                          "email_id": 1766,
                          "date_time": "2015-12-08 11:48:04",
                          "sent_count": 10000,
                          "preview_campaign": "http://corporate-name.th.listmng.com/b/16/1622",
                          "opened": 20
                    }
              ]
        }
}

Fields

Name Type Description
status enum {success, error} Returns the status of the result.
code integer Returns the response code of the result.
err_msg string When error occur, returns the error's detail of the result.
data.campaign_count integer The summary campaign.
data.max_page integer The max page campaign request.
data.campaigns array The array of campaign data.

Response Code

Code Result Description
200 success Response to a successful request.
400 error The request is malformed or missing some required parameters.
401 error Unauthorized or the session_id expired.

Creating

  • This API endpoint allows you to create a new campaign.
  • You can send POST request to /campaign API.
  • Taximail API will return the new campaign_id and new email_id.

POST https://api.taximail.com/v2/campaign

Parameter Type Description Required
campaign_name string The campaign's name. Yes
campaign_mode string Set value "sms" to create campaign mode sms. Yes

Example Request

POST v2/campaign HTTP/1.1
Host: api.taximail.com
Authorization: "Bearer YOUR_SESSION_ID"

campaign_name=example
campaign_mode=sms

Example Result

{
    "status": "success",
    "code": 201,
    "data": {
              "campaign_id": 315,
              "sms_content_id": 123
       }
}

Fields

Name Type Description
status enum {success, error} Returns the status of the result.
code integer Returns the response code of the result.
err_msg string When error occur, returns the error's detail of the result.
data.campaign_id integer The campaign_id of the newly created campaign.
data.email_id array The email_id of the new email content record in campaign.

Response Code

Code Result Description
200 success Response to a successful request.
400 error The request is malformed or missing some required parameters.
401 error Unauthorized or the session_id expired.

Campaign detail

  • This API endpoint allows you to get campaign's detail.
  • You can send GET request to campaign/{campaign_id} API.
  • Taximail API will return campaign object such as campaign_trigger_type , campaign_name , campaign_info_status , custom_campaign_trigger and etc.

GET https://api.taximail.com/v2/campaign/{campaign_id}

Parameter Type Description Required
select_mode enum {Edit, Overview, Opens, Clicks,
Browser, Unsubscriptions}
The mode for campaign detail. Yes
limit_date integer Day period of select mode campaign data.

Default to 30.

Example Request

GET v2/campaign/315 HTTP/1.1
Host: api.taximail.com
Authorization: "Bearer YOUR_SESSION_ID"

Example Result

{
    "status": "success",
    "code": 200,
    "data": {
              "campaign_trigger_type": "default",
              "campaign_ref_tag": "campaign_a",
              "custom_campaign_trigger": {
                     "campaign_trigger_open_click": "none",
                     "campaign_trigger_bounce": "",
                     "campaign_trigger_drop": "",
                     "campaign_endpoint_url": "",
                     "campaign_trigger_format": "json"
              },
              "split_testing": "F",
              "split_test_status": "F",
              "campaign_name": "Campaign A",
              "campaign_status": "Sent",
              "send_mode": "Immediate",
              "campaign_info_status": "Sent"
       }
}

Fields

Name Type Description
status enum {success, error} Returns the status of the result.
code integer Returns the response code of the result.
err_msg string When error occur, returns the error's detail of the result.
data.campaign_trigger_type string The webhooks type.
data.campaign_ref_tag string The reference tag each campaign.
data.custom_campaign_trigger object Return object of webhooks data.
data.split_testing string Return A/B split testing mode.
data.split_test_status string Return status of A/B split testing mode.
data.campaign_name string The campaign's name.
data.campaign_status string The campaign's status.
data.send_mode string The campaign's send mode.
data.campaign_info_status string The campaign's info status.

Response Code

Code Result Description
201 success The new resource was created successfully.
400 error The request is malformed or missing some required parameters.
401 error Unauthorized or the session_id expired.
404 error The campaign not found.

Updating

  • This API endpoint, allows you to update a campaign.
  • You can PUT the object data such as campaign_name , campaign_status and other to campaign/{campaign_id} API.

PUT https://api.taximail.com/v2/campaign/{campaign_id}

Parameter Type Description Required
campaign_name string The campaign's name. Yes
campaign_status enum {Draft, Ready} Set the campaign status. Yes
high_priority boolean Taximail will send their first.
lists_and_segments string Target subscriber lists and segments. Each segment and list is seperated by comma.

Ex. "827:0,827:5"
Yes
schedule_type enum {Not Scheduled,
Immediate, Future,
Recursive}
Type of the schedule.
send_date date Date to send campaign.

Use in case Scheduled equal Future
Yes
send_time time Time to send campaign.

Use in case Scheduled equal Future
Yes
rec_mode enum {everyday, monday,
tuesday, wednesday,
thursday, friday, saturday,
sunday, date_of_month}
Recursive mode.

Use in case Scheduled equal Recusive
Yes
rec_date integer Date to send campaign.

Use in rec_mode equal date_of_month
Yes
rec_time time Time to send campaign.

Use in case Scheduled equal Recusive
Yes
trigger_type enum {default, custom} Type of trigger data, if default is use trigger data from Webhooks in Settings.
trigger_format enum {json, xml} Trigger data format.

Use in trigger_type equal custom
Yes
trigger_open_click enum {none, unique, full} Send webhooks type.

Use in trigger_type equal custom
Yes
trigger_url string Webhooks url.

Use in trigger_type equal custom
Yes
campaign_ref_tag string Reference name for tracking, send with trigger data.
enable_google_analytics boolean Enable or Disable to track with Google Analytics.
google_custom_tag string Reference name for tracking with Google Analytics, if enabled Google Analytics.

Example Request

PUT v2/campaign/315 HTTP/1.1
Host: api.taximail.com
Authorization: "Bearer YOUR_SESSION_ID"

campaign_name=MyCampaign&campaign_status=Ready&high_priority=false&lists_and_segments=191%3A0&schedule_type=Future&send_date=2016-12-30&send_time=13%3A00%3A00&trigger_type=custom&trigger_format=json&trigger_open_click=unique&trigger_url=https%3A%2F%2Fmy.webservice.com%2Fcallback_trigger&campaign_ref_tag=my_campaign&enable_google_analytics=false

Example Result

{
  "status": "success",
  "code": 200
}

Fields

Name Type Description
status enum {success, error} Returns the status of the result.
code integer Returns the response code of the result.
err_msg string When error occur, returns the error's detail of the result.

Response Code

Code Result Description
200 success Response to a successful request.
400 error The request is malformed or missing some required parameters.
Please setting default campaign trigger.
Your email content is not complete.
Missing recipient / segment.
401 error Unauthorized or the session_id was expired.
404 error The campaign not found.
503 error Can't change campaign status.
Can't update campaign.
Can't send campaign because invalid campaign setting or email content is not complete.

Deleting

  • This API endpoint, allows you to delete a campaign.
  • You can send a DELETE request to campaign/{campaign_id} API.
  • Here, the campaign is deleted one by one.

DELETE https://api.taximail.com/v2/campaign/{campaign_id}

Example Request

DELETE v2/campaign/315 HTTP/1.1
Host: api.taximail.com
Authorization: "Bearer YOUR_SESSION_ID"

Example Result

{
    "status": "success",
    "code": 200
}

Fields

Name Type Description
status enum {success, error} Returns the status of the result.
code integer Returns the response code of the result.
err_msg string When error occur, returns the error's detail of the result.

Response Code

Code Result Description
200 success Response to a successful request.
401 error Unauthorized or the session_id expired.
404 error The campaign not found.

Multipart SMS messages

If the message length sent through SMS API, exceeds the SMS character limit of 160 characters in the case of 7bit encoding (or 70 characters for UCS-2 encoding), the message will split to multiple separate SMS and sent to the sender separately.

For messages on the phone, a special header (UDH) is set for each message, it states the order and message each part belongs to. This special UDH shortens the length of each combined 7-bit message to 153 characters (67 characters for UCS-2).

GSM Encoding : The Latin-based languages such as Chinese, Spanish, and Greek use GSM character encoding. Each GSM character accounts for 7 bits, thus allowing a maximum of 160 characters per SMS. The Languages not based on Latin use a different encoding process called Unicode. It is commonly known as Unicode Transformation Format (UTF-16).

Unicode Encoding : Each UTF-16 character accounts for 16 bits per character, it allows a maximum of 70 characters per text. Depending on how many UTF-16 characters are used, this will make a small change on the final character count.

It's important to use this calculator and make sure that you don't exceed the limit and pay more than you planned.

Number of SMS GSM Characters Unicode Characters
1 160 70
2 306 (160 + 146), deducted 14 134 (70 + 64), deducted 6
3 459 (160 + 146 + 153), deducted 7 (one of the 2 messages) 201 (70 + 64 + 67), deducted 3 (half of text 2)
4 612 (160 + 146 + 153 + 153), deducted 7 (half of text 2) 268 (70 + 64 + 67 + 67), deducted 3 (half of text 2)
5 765 (160 + 146 + 153 + 153 + 153), deducted 7 (half of text 2) 335 (70 + 64 + 67 + 67 + 67), deducted 3 (half of text 2)
Title
Title SEO [Optional]
Description SEO [Optional]
Friendly URL [Optional]
IFRAME Content [Optional]
Priority
Markdown
We use cookies
This website uses cookies to enhance your browsing experience on our website, to show you personalized content and targeted ads, to analyze our website traffic, and to understand where our visitors are coming from. You can manage your preferences by clicking Change Preferences. Learn more about this on Cookie policy
Change Preferences
Accept All