Using Alias To Send SMS
Alias based messaging allows you to send an SMS to a recipient by referencing an alias instead of providing a phone number (MSISDN).
For an alias to be deliverable, a contact with the same alias must already exist in your address book. If no matching contact is found, the message will not be sent.
POST /send/alias
Required Permission
create:AliasSMSYour API key must have this permission enabled to use this endpoint.
Example Request
curl --location 'https://<hostname>/send/alias' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data '{
"recipients": ["john"],
"text": "Hello {{name}} sent at {{time}}",
"originator": "test",
"excludeDuplicates": true,
"excludeOptouts": true,
"shortenUrls": true,
"name": "Alias Campaign",
"spreadHours": 0
}'Replace YOUR_API_KEY with your API key.
Request Parameters
recipients
array
Yes
List of aliases to send messages to.
text
string
Yes
Message content. Supports template placeholders.
originator
string
Yes
Sender ID displayed on the recipient’s handset.
name
string
No
Optional campaign name for reporting.
shortenUrls
boolean
No
Automatically shorten URLs in the message text.
excludeDuplicates
boolean
No
Prevent duplicate aliases within the request.
excludeOptouts
boolean
No
Exclude contacts who have opted out.
spreadHours
number
No
Spread message delivery evenly over the specified number of hours.
scheduleDateTime
string (ISO 8601 datetime)
No
Schedules the message or campaign to be sent at a future date and time. The value must be provided in ISO 8601 format (e.g. 2025-03-01T14:30:00Z). If omitted, the message or campaign is sent immediately.
callbackURL
string (URL)
No
The endpoint where successful responses should be sent. When provided, this overrides the default callback endpoint configured in your API key. If omitted, the configured default callback endpoint is used.
Template Placeholders
Alias-based messages support template placeholders in the message text, such as:
Placeholder values are resolved using the contact data stored in your address book.
Success (HTTP 200)
A successful response confirms that the message has been queued for delivery. Message delivery and delivery receipts are handled asynchronously.
Last updated