SMS
Send a single SMS
https://api.smsedge.com/v1/sms/send-single/Sends one SMS to one phone number and returns the message ID.
The message is accepted and queued. The response comes back with status waiting. Use Get SMS status or the DLR webhook to follow it. Cost and parts are known only after sending.
- Number: send
toin international format. For a number in local format, also sendcountry_id(country ID or ISO code). Unsubscribed and blacklisted numbers are refused. - Sender:
fromis 15 characters max. Use Latin letters, digits, spaces and basic punctuation only. - Length: one part holds 160 GSM-7 characters (153 in a multipart message) or 70 Unicode characters (67 in a multipart message). Use Analyze SMS text to count parts before you send.
- Variables:
{{{name}}},{{{lname}}},{{{email}}}and{{{phone}}}are replaced with the parameters of the same name.{{{optout}}}is replaced with your opt-out link. - Links: with
shorten_url=1the first URL in the text is replaced with a short, click-tracked link. - Scheduling:
delayholds the message for that number of seconds.delay_timein the response shows when it goes out. - Transactional: with
transactional=1the text must not contain a URL.
The response also contains a _timing_trace debug object. Send debug_timing=0 to leave it out.
Body params (form)
fromstringrequiredSender ID shown to the recipient. 15 characters max.
tostringrequiredRecipient phone number, in international format (for example 447700900123).
textstringrequiredMessage text. Can contain the variables {{{name}}}, {{{lname}}}, {{{email}}}, {{{phone}}} and {{{optout}}}.
country_idstringoptionalCountry ID or ISO alpha-2 code of the number. Recommended when the number is in local format. See List countries.
namestringoptionalValue for the {{{name}}} variable.
lnamestringoptionalValue for the {{{lname}}} variable.
emailstringoptionalValue for the {{{email}}} variable.
referencestringoptionalYour own ID for the message, returned in reports. 36 characters max.
shorten_urlintegeroptional1 replaces the first URL in the text with a click-tracked short link. Has no effect if link shortening is turned off for your account.
Default:
1Values:0,1smart_routingintegeroptional1 sends the message through smart routes.
Default:
0Values:0,1preferred_route_idintegeroptionalID of the route to send through. Get IDs from List routes.
transactionalintegeroptional1 marks the message as transactional. The text must then contain no URL.
Default:
0Values:0,1delayintegeroptionalNumber of seconds to wait before sending.
campaign_idintegeroptionalID of one of your campaigns, to attach the message to it.
list_idintegeroptionalID of one of your lists. The number is also added to that list.
genderstringoptionalSaved with the number when list_id is set. Accepts values such as m, male, f, female.
birthdaystringoptionalSaved with the number when list_id is set. Format YYYY-MM-DD.
custom1stringoptionalCustom field saved with the number when list_id is set. custom2 to custom5 work the same way.
debug_timingintegeroptional0 removes the _timing_trace debug object from the response.
Default:
1Values:0,1
Responses
- 200The message is accepted and queued
- 400The message cannot be sent. Other messages: "Cannot normalize number provided", "Country with specified ID or ISO code [XX] was not found", "You're trying to send to an unsubscribed number", "No routing to destination [to]", "Insufficient Balance [token]", "Forbidden value [from]", "From cannot be blank [from]", "URL detected in text for transactional SMS [text]".
- 401The API key is missing, wrong or the account is blocked
- 403The account cannot send now. The other message is "Account waiting activation".
- 404campaign_id is not one of your campaigns
curl -X POST "https://api.smsedge.com/v1/sms/send-single/" \
-H "X-API-KEY: YOUR_API_KEY" \
--data-urlencode "from=MyBrand" \
--data-urlencode "to=447700900123" \
--data-urlencode "text=Hi {{{name}}}, your order has shipped. Track it: https://example.com/track"[
{
"success": true,
"data": {
"id": 48210377,
"created": "2026-11-16 14:10:02",
"updated": null,
"from": "MyBrand",
"to": 447700900123,
"verify_local": 1,
"shorten_url": 1,
"list_id": null,
"reference": "order-10045",
"transactional": 0,
"preferred_route_id": null,
"campaign_id": null,
"delay_time": null,
"country_id": 225,
"country_name": "United Kingdom",
"country_iso": "GB",
"conversion_key": "a1b2c3d4e5",
"conversion_pixel": {
"lead": "http://edgepxl.com/postback.php?type=lead&key=a1b2c3d4e5",
"sale": "http://edgepxl.com/postback.php?type=sale&key=a1b2c3d4e5"
},
"clicked": false,
"text": "Hi John, your order has shipped. Track it: https://example.com/track",
"status": "waiting",
"dlr_status": "unknown"
},
"errors": [],
"response": {
"code": 200,
"description": "OK",
"date": "2026-11-16 14:10:02"
},
"api": {
"version": "v1",
"module": "sms",
"function": "send-single"
},
"user": {
"id": 736
}
}
]All requests need your API key in the X-API-KEY header. See Authentication.