Skip to main content
POST
/
v1
/
messages
curl -X POST https://app.tracklysms.com/api/v2/messages \
  -H "X-Api-Key: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "to_msisdn": "+14155551234",
    "body": "Hello from Trackly SMS!",
    "from_phone_number_id": "pn_abc123def456"
  }'
{
  "message_id": "msg_xyz789abc123",
  "id": "msg_xyz789abc123",
  "status": "queued",
  "segments": 1,
  "gsm7": true,
  "deprecated": true
}
Deprecated: The v1 API is deprecated. All responses include deprecation headers.
Send a single SMS message to a phone number.

Request

to_msisdn
string
required
Recipient phone number. E.164 format recommended (e.g., +14155551234). The legacy field name to is still accepted as a fallback.
body
string
required
Message body text. Standard SMS limit is 160 characters per segment.
from_phone_number_id
string
required
The ID of your sending list/phone number. Find this in the dashboard under Lists.
metadata
object
Optional metadata to attach to the message for your reference.
The metadata field is accepted but currently silently ignored. It is reserved for future use.

Response

message_id
string
Unique identifier for the queued message
id
string
Alias for message_id. Included for consistency with v2 conventions.
status
string
Message status. Will be queued on success.
segments
integer
Number of SMS segments the message was split into based on character count and encoding.
gsm7
boolean
Whether the message body uses GSM-7 encoding (true) or UCS-2 (false). GSM-7 allows 160 characters per segment; UCS-2 allows 70.
deprecated
boolean
API deprecation flag. Always true for v1 endpoints.
curl -X POST https://app.tracklysms.com/api/v2/messages \
  -H "X-Api-Key: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "to_msisdn": "+14155551234",
    "body": "Hello from Trackly SMS!",
    "from_phone_number_id": "pn_abc123def456"
  }'
{
  "message_id": "msg_xyz789abc123",
  "id": "msg_xyz789abc123",
  "status": "queued",
  "segments": 1,
  "gsm7": true,
  "deprecated": true
}

Error Codes

CodeDescription
missing_toRecipient phone number (to_msisdn) not provided
missing_bodyMessage body not provided
missing_fromSending number ID not provided
invalid_phonePhone number format is invalid
list_not_foundSending list ID doesn’t exist or isn’t active
missing_api_keyNo API key in request headers
invalid_api_keyAPI key is invalid or revoked

Phone Number Format

For best results, use E.164 format for phone numbers:
FormatExampleAccepted
E.164+14155551234✅ Recommended
With country code14155551234
National4155551234⚠️ May fail
Formatted(415) 555-1234⚠️ Stripped
The API will attempt to normalize phone numbers to E.164 format. For reliable delivery, always provide the full number with country code.

Message Queuing

Messages are queued for immediate delivery. The message_id returned can be used to track delivery status via webhooks.
The message is queued, not sent synchronously. Actual delivery depends on carrier availability and may take a few seconds.