v1

latestOpenAPI 3.0.02026-07-244771176.5 KB
SMS

Send SMS

Send a message from sender to recipient using the values shown in the parameters section.

post/v2/sms

Request body

messagestring required

Body text of the message. The message will be split into multiple parts if required. 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: https://support.transmitsms.com/s/article/44001076957-how-many-characters-can-i-have-in-my-text-message

If opt-out is required, insert parameter [opt-out-link] into the message and a link will be generated.

message_refstring

A reference supplied by your system. This reference will be passed back in webhooks so that you can relate events to messages you sent. For example, being able to relate a Link Hit event to a specific sent message.

senderstring required

Sender is the number (or alphanumeric) that the message appears from on the handset. Sender number must be assigned to your account for the country you are sending to. Contact us to get sender number(s) registered to your account. Sender number functionality varies by country. You can send from an alphanumeric sender if it is available for the destination country. Global SMS delivery list: https://support.transmitsms.com/s/article/page-products-connectivity-global-delivery-list

Alphanumeric senders (which cannot be replied to) have a maximum of 11 characters. Only letters, numbers, underscore, hyphen or space are allowed and they are included in the total character count. (Consecutive underscore, hyphen, space is not allowed.)

recipientstring required

The destination number for delivery. Can be either in local format or in international format. Must be in the same country as the sender. For international format, it should follow E.164 standard. http://en.wikipedia.org/wiki/E.164

Examples of conversions to E.164 format: Australia 0438 333 061 => 61438333061 New Zealand 0212172782 => 64212172782 USA (281) 869-1226 => 12818691226

track_linksboolean

Enable the link tracking feature which replaces links in outbound messages with shortened links. This allows us to track when recipients view links.

Response

The SMS that was sent

idstring required

Unique identifier for the SMS message.

recipientstring required

The destination number for delivery.

recipient_countrystring required

Recipient country code.

senderstring required

The sender number.

sender_countrystring required

Sender country code.

message_refstring required

Reference supplied by your system.

messagestring required

Body text of the SMS message.

statusstring required

Status of the message.

sms_countstring required

Number of SMS parts the message was split into.

is_gsmboolean required

Whether the message uses GSM encoding.

is_sandboxboolean required

Deprecated. Will be removed in a future version.

routed_viastring required

The route used to send the message.

track_linksboolean required

Whether link tracking is enabled.

directionstring required

Direction of the message (IN/OUT).

created_atstring required

Timestamp when the SMS was created.

updated_atstring required

Timestamp when the SMS was last updated.

Example response

{
  "id": "2d2c8fb6-e514-4f5f-9706-0672b0259218",
  "recipient": "61478038915",
  "recipient_country": "AU",
  "sender": "61481074185",
  "sender_country": "AU",
  "message_ref": "ncc1701d",
  "message": "Report to the ready room! Opt-out reply STOP",
  "status": "delivered",
  "sms_count": "1",
  "is_gsm": true,
  "routed_via": "",
  "track_links": true,
  "direction": "OUT",
  "created_at": "2022-03-28T06:12:52.450674000Z",
  "updated_at": "2022-03-28T06:12:52.450674000Z"
}