Name
Send a priority SMS
A transactional message (a code, an alert) to a mobile number in Colombia. It goes out first and carries the priority charge.
HTTP method and path
/ api/ v6/ sms/ priorityhttps:
What happens when you run it
- Sends a message to a third party.
- The call is charged to your organization.
What it does
Sends one message to one destination through the priority queue: the one that goes out before everything else. It is for what cannot wait (verification codes, security alerts, transaction notices), and that is why it skips the marketing time window, the do-not-contact registry and the opt-outs. In exchange, it carries your rate’s priority charge, once per message, and your contract binds you to use it only for that.
Availability and prerequisites
- Published and available in the production API v6.
- Every path starts at
https:./ / developers. hablame. co - You need a Hablame API key to call it.
Authentication and permissions
- Send your API key in the
Authorizationheader with the Bearer scheme.
Who can call it: An API key with the sms service enabled.
Limits and operational notes
Usage limit: 2,000 requests per second.
- In addition, each IP has its own window of 2,400 requests per second for this route, separate from the marketing one and from the other routes (
429 RATE_DDOS_EXCEEDED).
Path parameters
This endpoint has no path parameters.
Query parameters
This endpoint has no query parameters.
HTTP headers
| Name | Type | Description and rules |
|---|---|---|
AuthorizationRequired | string | Your API key with the Bearer scheme. Example: |
Content-TypeRequired | string | Type of the body you send. Fixed value: |
Idempotency-KeyOptional | string | Optional and recommended idempotency key (1 to 255 characters from Pattern: |
Request body
Content type:application/jsonRequired
Only these four fields are accepted.
| Name | Type | Description and rules |
|---|---|---|
toRequired | string | Mobile number in Colombia: the ten digits ( Maximum length: |
textRequired | string | The message. The platform splits it: one SMS carries up to 160 GSM-7 characters (153 per part when split) or 70 in Unicode (67 per part). Example: |
clientRefOptional | string | Your reference, optional: up to 36 characters (the length of a UUID). It is stored with the message and returned in the query. Do not write personal data (names, IDs, phone numbers): it is kept with the message record, which Hablame keeps for 5 years. Maximum length: |
fromOptional | string | Optional: the sender you want it to go out with, one of the ones allowed for your organization. Without it, it goes out with the default one of your list (or one from it), or with the Hablame shared code if your organization has no list. If you ask for one that is not on your list, your organization’s rule decides: it goes out with one from the list or it is rejected with Example: |
certifiedOptional | boolean | Optional, Default value: |
{
"to": "3001234567",
"text": "Tu código es 482913. Vence en 5 minutos.",
"clientRef": "login-2026-000123"
}Successful responses
202
Received and charged. With the same Idempotency-Key and the same body, it is the first response: no other one was sent or charged.
{
"success": true,
"data": {
"id": "0192f0c4-7a1b-7c3d-8e9f-001122334455",
"status": "accepted",
"segments": 1,
"encoding": "GSM-7",
"cost": { "amountMicro": 30000000, "currency": "COP" }
},
"meta": {
"requestId": "5d0f3a9c7b2e41a8",
"clientIp": "203.0.113.10",
"timestamp": "2026-10-26T10:30:00-05:00",
"responseTimeMs": 8.2
}
}The example values are illustrative.
Response fields
| Name | Type | Description and rules |
|---|---|---|
successAlways present | boolean | |
dataAlways present | object | A received message (4-G). |
data.Always present | string | Message identifier (UUID v7). Use it to query. Example: |
data.Always present | string | Always Fixed value: |
data.Always present | integer | Parts the message goes out in: the ones charged. Example: |
data.Always present | string | The alphabet: GSM-7 or Unicode (UCS-2). |
data.Always present | object | What was charged (or reserved, in a bulk send), in micros of your organization’s currency: 1 unit = 1,000,000 micros. |
data.Always present | integer | Amount in micros. Example: |
data.Always present | string | ISO 4217 currency code. Example: |
metaAlways present | object | Response metadata. |
meta.Always present | string | Unique request identifier (16 hexadecimal characters). It matches the Example: |
meta.Always present | string | IP the API saw your request come from. Useful if your API key only accepts certain networks. Example: |
meta.Always present | string | Date and time the response was built (ISO 8601 with offset). Format: |
meta.Always present | number | Time (ms) the server took to process the request. Example: |
Error codes
Every error response has the same shape: success set to false and an error object whose code says what happened. They are grouped here by kind, with the codes this endpoint can return.
Shape of an error response
| Name | Type | Description and rules |
|---|---|---|
successAlways present | boolean | Fixed value: |
metaAlways present | object | Response metadata. |
meta.Always present | string | Unique request identifier (16 hexadecimal characters). It matches the Example: |
meta.Always present | string | IP the API saw your request come from. Useful if your API key only accepts certain networks. Example: |
meta.Always present | string | Date and time the response was built (ISO 8601 with offset). Format: |
meta.Always present | number | Time (ms) the server took to process the request. Example: |
errorAlways present | object | |
error.Always present | string | Stable UPPER_SNAKE_CASE identifier. Clients branch on this value. Example: |
error. | integer | Legacy v5 numeric code, only when a bridge exists. Omitted for codes born in v6. Example: |
error.Always present | string | URL to the error documentation. Format: |
error.Always present | string | Human readable text, in English. It is for the developer log, not the end user: do not parse it. |
error.Always present | array<object> | Structured context (validation issues, affected resource). Empty array when there is no extra context. |
Validation
- 400Invalid body (malformed JSON or a field that does not exist), or the
Idempotency-Keyis missing or has another shape. - 422The
Idempotency-Keywas already used with another body (IDEMPOTENCY_KEY_REUSED), the reference does not fit (SMS_INVALID_CLIENT_REF), your organization has no rate (SMS_NO_TARIFF), or the number or the text cannot be sent: empty (SMS_EMPTY_DESTINATION,SMS_EMPTY_TEXT), a number over 20 characters (SMS_DESTINATION_TOO_LONG) or without digits (SMS_DESTINATION_NO_DIGITS), a number from a country not enabled for your account (SMS_FOREIGN_DESTINATION) or a text that does not fit in 255 parts (SMS_TOO_LONG), or thefromis not among the allowed ones (SMS_SENDER_NOT_ALLOWED). Not charged. - 413The body is over 128 KiB (
SMS_PAYLOAD_TOO_LARGE). Nothing was sent or charged.
The idempotency key does not match the format.
The key already exists, but with a different body.
The body is not valid for this send.
The body is too large.
The
clientRefcannot be stored.The destination number is missing.
The destination number is longer than 20 characters.
The message text is missing.
422SMS_TOO_LONG
The text does not fit in 255 parts.
The destination number has no digits.
The destination country is not enabled for your account.
Your organization has no SMS rate in its currency.
The sender is not among the ones allowed for your organization.
Authentication
- 401Invalid or missing credentials.
No Bearer token was sent, and every call requires one.
Message the API returns: Authentication is required. Send your API key as `Authorization: Bearer <token>`.
The API key is not recognized: wrong format, revoked or expired.
Message the API returns: The provided API key is invalid or has expired. Please verify the value sent in the `Authorization: Bearer` header.
Permissions
- 403The API key does not have the SMS service (
sms) or SMS is turned off for your organization (AUTH_SERVICE_NOT_ALLOWED), the key cannot be used from the request network, the organization is suspended or not active (ACCOUNT_NOT_ACTIVE; if the send sees the suspension first,SMS_ACCOUNT_NOT_ACTIVE), your organization is not enabled for the SMS API v6 yet (SMS_ORGANIZATION_NOT_ENABLED) or the sending account could not be identified (SMS_ACCOUNT_NOT_IDENTIFIED). A suspended organization, or one with SMS turned off, can still query its messages. This request was not sent or charged; if it is the retry of a send that got a503or a timeout, the first one may have been received and charged: do not resend it through another route and, once it is resolved, retry with the same key.
The key is not allowed to use the service behind this endpoint.
Message the API returns: This API key is not authorized to use the requested service.
The key only works from certain networks and your IP is not one of them.
Message the API returns: This API key cannot be used from this IP address. The address we saw is in `meta.clientIp`: call from one of the networks allowed for the key, or use a key that allows this one.
Your organization is suspended or closed.
Message the API returns: The organization associated with this API key is not active. Please contact support.
SMS is not active for your organization.
403SMS_ORGANIZATION_NOT_ENABLED
Your organization is not enabled for the SMS API v6 yet.
The send’s account could not be identified.
Usage limits
- 429Your organization’s quota (
RATE_TPS_EXCEEDED) or your IP’s (RATE_DDOS_EXCEEDED) was exceeded. WaitRetry-After.
You exceeded your organization quota for this endpoint.
Message the API returns: You have exceeded the allowed request rate for this endpoint. Please wait before retrying.
Unusually high volume from your source IP.
Message the API returns: Too many requests from this IP within a short window. Please wait before retrying.
Resource not found
This endpoint does not declare responses of this kind.
Internal errors and availability
- 503The send could not be received or confirmed in time (
SERVICE_UNAVAILABLE). A503does not mean it was not sent: if the wait ran out or it could not be confirmed, the send may have been received and charged. Retry afterRetry-Afterwith the sameIdempotency-Keyand the same body: if it had already been received, you get its202without a new charge; if not, it is received on that attempt, only once. With another key or through another route it is another send and it is charged. - 500The message could not be built (
INTERNAL_SERVER_ERROR). Retry with the sameIdempotency-Keyand the same body: if it had already been received, you get its202without a new charge.
Something went wrong on our side.
Message the API returns: Internal Server Error
Generic 503: a service we depend on is not responding.
Other responses
- 402No balance, or a spend limit of your organization does not let it through (
SMS_INSUFFICIENT_FUNDSin both cases: if it is a limit, adjust it in the limits; topping up does not fix it). Nothing was sent or charged. - 409The first request with that
Idempotency-Keyis still in progress (IDEMPOTENCY_IN_PROGRESS): waitRetry-Afterand retry with the same key.
The first request with that key is still in progress.
There is no balance for the send.
Special considerations
- Supports the
Idempotency-Keyheader: if a request is cut off and you repeat it with the same key, it is not duplicated. The details are in the idempotency guide.
Only for transactional messages
This route is only for transactional messages: the ones a person expects because they did something (a code to sign in, a purchase alert, an appointment notice). A promotion through here does not honor what the person asked for and goes against your contract.
Marketing? Use the other route
For promotions and one-by-one informational messages there is POST /: the same body and the same quota, without the priority charge and honoring the marketing controls.
A 202 is not a delivery
The 202 says the send was received and charged: stored on disk and replicated before answering you. It does not say it reached the phone. How each message ended (delivered, failed or blocked) reaches you in the sms. notification, if you have a webhook that receives it, and it is queried with GET /, in its delivery block.
Retry with the same key
If the response does not reach you (a timeout) or a 503 arrives, the send may have been received and charged: do not assume it was lost. Retry with the same Idempotency-Key and the same body: if the first one had already been received, you get its response without sending or charging another one. With a new key or through another route, the retry is another send and it is charged. 409 IDEMPOTENCY_IN_PROGRESS and 429 ask you to wait and retry with the same key. A 4xx rejection says nothing was sent or charged in THAT request. If it arrives when retrying after a 503 or a timeout, it says nothing about the first attempt, which may have been received and charged: for example, a 403 because your organization was suspended or the key lost the service. Do not resend it through another route. Once it is resolved, retry with the same key: within its validity you get the first one’s 202 if it had been received.