SMS

Send SMS

You can elect to pass us the recipient numbers from your database each time you make a call, or you can elect to store recipient data in a contact list and submit only the list_id to trigger the send. This is best for large databases. To add a list please refer to the add-list call.

post/send-sms.json

Request

  • Base URL
    https://api.transmitsms.com
  • Auth
    HTTP basic

Request body application/x-www-form-urlencoded

messagestring required

Message Content Can be up to 612 alphanumeric characters. A part is 160 characters for a single SMS or 153 characters per part for multi-part SMS. If the message contains Unicode UTF8 encoded characters such as emoji’s or non latin character sets, then a single part is 70 characters or 67 characters for multiple parts. More information on message length and encoding: <a href="https://support.transmitsms.com/support/solutions/articles/44001940835-sms-message-length-and-character-count">SMS message length and character count</a>

tostring required

Recipient Number/s Single number or set of up to 500 comma separated numbers to send the SMS to. Invalid numbers will be ignored. Number must be defined in E.164 international format. You can use countrycode parameter to format numbers that are in local format.

list_idinteger

Recipient list This ID is the numerical reference to one of your recipient lists. It is found in the URL and displayed on a destination list page in your account. A list ID can also be created using the add-list call.

countrycodestring

Format the to number in international format. 2 letter ISO 3166 format country code or country name. Automatically formats numbers to international format required for reliable SMS delivery. eg. In Australia 0422222222 will become 6142222222 when set to AU or Australia. If not set to numbers must be defined in E.164 international format.

COUNTRYCOUNTRY CODELOCALINTERNATIONAL
Australiaau049157015661491570156
New Zealandnz021267012964212670129
United Kingdomgb075001769644750017696
United Statesus251355114512513551145
fromstring

Sender ID Usually a dedicated virtual mobile number (VMN) or short code found in the NUMBERS section of your account. If no value is set here, it will default to the shared Sender ID for the country you are sending to. Can also be an 11 character alphanumeric sender if available for the destination country. You will need to click on the Add Sender ID button found in the NUMBERS section of your account in order to request the use of an Alphanumeric Sender ID. Sender ID functionality varies by country. <a href="https://portal.transmitsms.com/s/article/Global-Sender-ID-Information">Global Sender ID Information</a> Mobile and dedicated VMN's should be in international format. Alphanumeric senders (cannot be replied to) can have a maximum of 11 characters. No spaces. If opt out is required, using Custom Sender ID, use parameter [unsub-reply-link] in message to insert opt out link.

send_atstring date-time

Schedule a message at a specific time. Must be in ISO8601 format YYYY-MM-DD HH:MM:SS utilising UTC Timezone. Eg. 2020-04-27 06:00:00

validityinteger

Expire a message send if it is undeliverable Specify the maximum time to attempt to deliver. In minutes, 0 (zero) or not set implies maximum validity period. If a message is not delivered and not failed it is given a PENDING status in the system. These messages can be requested to be expired by the carrier after a certain time. This will return a DLR with a soft-bounce value. If no value is set, messages that remain in a PENDING state will be expired by the system automatically after 72hrs. <a href="https://support.transmitsms.com/support/solutions/articles/44001940868-what-does-a-message-with-a-pending-status-mean-">What does a message with a pending status mean?</a>

replies_to_emailstring

Send Replies to this Email Specify an email address to send responses to this message. Email will come from the email address @transmitsms.com eg. 0456789010@transmitsms.com NOTE: If expectation is for replies to this email to be returned to the recipient as SMS then the email address must be authorised to send messages in your account under the 'EMAIL SMS' section. Emails can also be authorised using the add-email call. <a href="https://support.transmitsms.com/support/solutions/articles/44001940840-how-to-set-up-email-sms">How to set up Email SMS</a>

tracked_link_urlstring

Converts this URL into a unique shortened tracking link Converts this URL to unique tapth.is/xxxxxx tracking link for each contact. Inserted into message with variable [tracked-link]. Only one [tracked-link] can be defined per message.

link_hits_callbackstring

Send a link hit notification to this callback URL A URL on your system which we can call to notify you of a hit on your [tracked-link]. If required, this parameter can be different for each message sent. Will override the default DLR Callback URL if set in the SETTINGS section of your account.

dlr_callbackstring

Send a delivery notification to this callback URL A URL on your system which we can call to notify you of Delivery Receipts. If required, this parameter can be different for each message sent. Will override the default DLR Callback URL if set in the SETTINGS section of your account.

reply_callbackstring

Send a reply notification to a callback URL A URL on your system which we can call to notify you of incoming messages. If required, this parameter can be different for each message sent. Will override the default Reply Callback URL if set in the SETTINGS section of your account.

Example request

{
  "message": "Hello, world!",
  "to": "61478038915",
  "list_id": 12345,
  "countrycode": "US",
  "from": "Sender123",
  "send_at": "2024-04-24T12:00:00Z",
  "validity": 1440,
  "replies_to_email": "example@example.com",
  "tracked_link_url": "https://example.com",
  "link_hits_callback": "https://callback.example.com/linkhit",
  "dlr_callback": "https://callback.example.com/delivery",
  "reply_callback": "https://callback.example.com/reply"
}

Response

OK

message_idinteger

Numeric ID assigned to the message sent. This can be used in conjunction with other calls to retrieve information and reporting about the message sent.

send_atstring date-time

Date and time that message was sent from your account Returned in ISO8601 format YYYY-MM-DD HH:MM:SS in UTC Timezone.

recipientsinteger

Recipient count. Count of number of recipients message was sent to either in list or to parameter.

costnumber

Total cost of all messages. Returned as value per account currency to 3 decimal places 0.000

smsinteger

Total number of message parts delivered. If the message is longer than 160 characters this will return count of all parts. Eg. if a 180 character message is delivered to 2 recipients. Value returned will be 4.

Example response

{
  "message_id": 339683245,
  "send_at": "2020-06-18T02:42:06Z",
  "recipients": 1,
  "cost": 0.087,
  "sms": 1,
  "error": {
    "code": "SUCCESS",
    "description": "OK"
  }
}

Changes

No recorded changes to this operation across all 2 revisions of this API.