Deprecated: The v1 API is deprecated. All responses include deprecation headers.
Send a single SMS message to a phone number.
Request
Recipient phone number. E.164 format recommended (e.g., +14155551234). The legacy field name to is still accepted as a fallback.
Message body text. Standard SMS limit is 160 characters per segment.
The ID of your sending list/phone number. Find this in the dashboard under Lists.
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
Unique identifier for the queued message
Alias for message_id. Included for consistency with v2 conventions.
Message status. Will be queued on success.
Number of SMS segments the message was split into based on character count and encoding.
Whether the message body uses GSM-7 encoding (true) or UCS-2 (false). GSM-7 allows 160 characters per segment; UCS-2 allows 70.
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
| Code | Description |
|---|
missing_to | Recipient phone number (to_msisdn) not provided |
missing_body | Message body not provided |
missing_from | Sending number ID not provided |
invalid_phone | Phone number format is invalid |
list_not_found | Sending list ID doesn’t exist or isn’t active |
missing_api_key | No API key in request headers |
invalid_api_key | API key is invalid or revoked |
For best results, use E.164 format for phone numbers:
| Format | Example | Accepted |
|---|
| E.164 | +14155551234 | ✅ Recommended |
| With country code | 14155551234 | ✅ |
| National | 4155551234 | ⚠️ 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.