API docs
Send SMS
Send an SMS to one number at once, or to many numbers as a batch.
/v1/smsSends to one number. When the response arrives, the message has been handed to the operator.
Body
tostringrequired- An 8-digit number.
+976, spaces and dashes are accepted. The supported numbers are listed below. textstringrequired- The message. At most 4 parts.
text_by_carrierobject- A text of its own per operator:
{ "mobicom": "Sain baina uu?" }. That operator's numbers get it instead oftext; the rest gettext. Keys:mobicom,unitel,skytel,gmobile,ondo,lime.
curl -X POST https://api.wesend.mn/v1/sms \
-H "Authorization: Bearer $WESEND_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": "99112233",
"text": "Tanii zahialga batalgaajlaa. #1042"
}'{
"id": "0b9c1a52-6f0e-4d8b-9a3c-2f1e5d7c8a90",
"status": "sent",
"channel": "sms",
"to": "99112233",
"parts": 1,
"rate_multiplier": 1,
"credits": 80,
"batch_id": null,
"error": null,
"sandbox": false,
"created_at": "2026-10-06T08:15:30.000Z",
"sent_at": "2026-10-06T08:15:31.000Z",
"encoding": "latin",
"non_latin_characters": [],
"balance": 4920
}encoding says how the message was billed: latin holds 155 characters a part, unicode holds 65. non_latin_characters lists each character that made it unicode, once, up to 50. When a message written in Latin letters comes back unicode, this is why. See Which characters are Latin, below. Sending Une 10,000₮ 🙂, for instance, answers:
{
"id": "0b9c1a52-6f0e-4d8b-9a3c-2f1e5d7c8a90",
"status": "sent",
"channel": "sms",
"to": "99112233",
"parts": 1,
"rate_multiplier": 1,
"credits": 80,
"batch_id": null,
"error": null,
"sandbox": false,
"created_at": "2026-10-06T08:15:30.000Z",
"sent_at": "2026-10-06T08:15:31.000Z",
"encoding": "unicode",
"non_latin_characters": [
"₮",
"🙂"
],
"balance": 4920
}If the operator does not accept the message, the answer is 502 provider_failed and the credits are refunded. The error's id is the failed message.
Messages to ONDO and Lime numbers, and messages another operator did not accept, go over a different route. That route carries no links, so any link in the text (https://…, www.…, example.mn/…) is removed before delivery. A message that is nothing but a link is not sent and fails with 502 provider_failed.
Supported numbers
The operator is read from the start of the number. An 8-digit number starting with one of these is accepted.
A number with any other start (a landline or a foreign number, for instance) answers 422 unsupported_number. No credits are taken.
Parts and price
A long message counts as several parts. Price = parts × credits per part × holiday multiplier.
One character is enough. If a message written in Latin letters holds a single emoji or ₮, the whole message, not just that character, switches to the non-Latin mode and each part holds 65 characters. A 120-character Latin message is 1 part; add one emoji and it becomes 2 parts, at twice the price.
A message longer than 4 parts answers 422 message_too_long. The error carries encoding and non_latin_characters, so the characters that made it non-Latin are named. An emoji counts as 2 characters.
Which characters are Latin
The Latin mode allows only the ASCII characters of the operators' basic alphabet. A message written in Latin letters is not always in the Latin mode: compare the two lists below.
- Write an amount with
TorMNTinstead of₮, and a smile as:)instead of an emoji. - Check text copied from Word, Google Docs or a phone: they swap a plain
'"-for curly quotes and long dashes by themselves. - The response's
partssays how many parts the message took, andencodingwithnon_latin_characterssays why. A sandbox key checks it without spending credits. The dashboard's Send SMS page points out the non-Latin characters and fixes them in one click.
A different text per operator
Mobicom does not deliver an SMS of 2 or more parts. So a long message to a Mobicom number is cut between words into separate one-part SMS, sent one after another. Each counts as one part, and parts in the answer is how many there are. To send fewer, give Mobicom a short Latin text while the other operators get the Cyrillic one. Each number is priced by the text it gets.
curl -X POST https://api.wesend.mn/v1/sms/bulk \
-H "Authorization: Bearer $WESEND_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": [
"99112233",
"88112233"
],
"text": "Сайн байна уу? Баярлалаа",
"text_by_carrier": {
"mobicom": "Sain baina uu? Bayarlalaa"
}
}'List the operators
/v1/carriersThe operators WeSend sends to and how their numbers start. Each id is a key of text_by_carrier.
curl https://api.wesend.mn/v1/carriers \
-H "Authorization: Bearer $WESEND_API_KEY"{
"data": [
{
"id": "mobicom",
"name": "Mobicom",
"includes": [
{
"name": "KAOS",
"prefixes": [
"505"
]
}
],
"multipart": false,
"links": true,
"prefixes": [
"85",
"94",
"95",
"99",
"5050-5099",
"5550-5599"
]
},
{
"id": "unitel",
"name": "Unitel",
"includes": [
{
"name": "Toki",
"prefixes": [
"5500-5549"
]
}
],
"multipart": true,
"links": true,
"prefixes": [
"80",
"86",
"88",
"89",
"5000-5049",
"5500-5549"
]
},
{
"id": "ondo",
"name": "ONDO",
"includes": [],
"multipart": true,
"links": false,
"prefixes": [
"60",
"66",
"8181"
]
}
]
}Send to many numbers
/v1/sms/bulkSends one text to up to 1,000 numbers. The messages are queued and sent in the background.
Body
tostring[]required- 1 to 1,000 numbers. Duplicates are merged.
textstringrequired- The text every recipient receives.
text_by_carrierobject- A text of its own per operator:
{ "mobicom": "Sain baina uu?" }. That operator's numbers get it instead oftext; the rest gettext. Keys:mobicom,unitel,skytel,gmobile,ondo,lime.
curl -X POST https://api.wesend.mn/v1/sms/bulk \
-H "Authorization: Bearer $WESEND_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": [
"99112233",
"88112233",
"95112233"
],
"text": "Shine baraa irlee! shop.mn"
}'{
"id": "5d2a7c1e-93b4-4f6a-8e0d-b1c2d3e4f5a6",
"status": "processing",
"channel": "sms",
"total": 3,
"sent": 0,
"failed": 0,
"credits": 240,
"sandbox": false,
"created_at": "2026-10-06T08:15:30.000Z",
"completed_at": null,
"encoding": "latin",
"non_latin_characters": [],
"balance": 4680
}encoding and non_latin_characters are those of text. With text_by_carrier, each operator's text has its own in encoding_by_carrier: { "mobicom": { "encoding": "latin", "non_latin_characters": [] } }.
- The whole batch is charged up front. Credits for each message that is not sent are refunded.
- If any number is invalid or unsupported, the whole request answers
400 invalid_requestand lists the bad entries (up to 50) in the error'sinvalidfield. Nothing is sent or charged. - Follow progress with
GET /batches/{id}.