Skip to content

Endpoints

Endpoints

Name

Get a bulk send’s progress

A bulk send’s status (`status`) and its counters: admitted, processed, refunded and handed to output.

HTTP method and path

GET/api/v6/sms/bulk/{batchId}

https://developers.hablame.co/api/v6/sms/bulk/{batchId}

What happens when you run it

  • Read only: it does not change your organization’s data.
  • The call is not charged.

What it does

It reads only the bulk send record, not each message: it costs the same for 10 destinations as for 100,000. The progress counters (settled, refunded, released, quarantined) move as the platform processes the bulk send, and refunded says how much went back to your balance. A bulk send from another organization answers 404, just like one that does not exist.

Branch on status, the bulk send status: accepted (received, not processed yet), pending (in progress, nothing handed to output yet), in_progress (being handed to output), waiting_for_window (waiting for the marketing window to open: it was already counted and goes out when it opens), waiting_for_capacity (network traffic is heavy and the bulk send goes out more slowly or waits a moment: it was already counted and continues on its own, do not send it again), completed (output finished and everything admitted went out), partially_sent (output finished and part of it did not go out: no route, no tariff or under review), failed (output finished and nothing went out) and not_accepted (the bulk send was not admitted and nothing was charged; reason says why, for example no_balance). The last four are final: they no longer change on their own. quarantined set to true means the bulk send is under review on our side: you do not need to do anything or send it again.

stage is the internal detail of the record (accepted, expanding, finished, quarantine, rejected, abandoned): it helps when diagnosing with support, but its values may change without notice. Do not branch on stage; use status. To see each message of the bulk send, list the day’s messages with GET /api/v6/sms/messages: each one brings its batchId and its index.

Live

To follow a bulk send without asking again and again, request the same route with Accept: text/event-stream: the response is a Server-Sent Events stream that sends you a snapshot every time something changes, at most one per second. Each snapshot event brings in data the same object as data of the JSON response, and its identifier in id. Opening the stream counts against its own limit, 120 per minute per organization, and does not spend this route’s 10 queries per second.

  • The stream closes on its own after 25 seconds. EventSource opens it again after 2 s (retry: 2000) with Last-Event-ID: if nothing changed, the snapshot is not repeated.
  • Without changes a comment (: ping) arrives every 10 s so the connection is not dropped.
  • If there is nothing to show yet when you open it (a 404) or it cannot be queried (503), the response is the same JSON error as the query, with its Retry-After: ask the JSON route until it appears.
  • If it can no longer be queried midway, event: interrupted arrives with data: {"status":503,"retryAfter":2} and the stream closes: wait those seconds and go back to the JSON route.
  • Each organization can have up to 10 streams open at once on each server; one more gets 429 RATE_TPS_EXCEEDED.
curl -N https://developers.hablame.co/api/v6/sms/bulk/bat_3f1c0a9b2d7e4c58a6b1e0f9d2c3b4a5 \
  -H "Authorization: Bearer $HABLAME_API_KEY" \
  -H "Accept: text/event-stream"

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.

Create your API key

Authentication and permissions

  • Send your API key in the Authorization header with the Bearer scheme.

Who can call it: An API key with the sms service enabled.

Limits and operational notes

Usage limit: 10 requests per second.

  • Opening the live stream (Accept: text/event-stream) counts separately: 120 per minute per organization, without spending this quota.

Path parameters

NameTypeDescription and rules
batchIdRequiredstring

The batchId returned by the bulk send.

Pattern:^bat_[0-9a-f]{32}$Example:bat_3f1c0a9b2d7e4c58a6b1e0f9d2c3b4a5

Query parameters

This endpoint has no query parameters.

HTTP headers

NameTypeDescription and rules
AuthorizationRequiredstring

Your API key with the Bearer scheme.

Example:Bearer hk_TU_API_KEY

AcceptOptionalstring

With text/event-stream the same route opens the live progress of the bulk send (see “Live”, above). With any other value, or without it, it answers the usual JSON.

Allowed values:application/json text/event-streamDefault value:application/json

Last-Event-IDOptionalstring

Only with the stream: the id of the last snapshot you received. If the snapshot did not change when you reconnect, it is not sent again. EventSource sends it on its own.

Pattern:^[0-9a-f]{16}$Example:9f3c1a7be0d24c58

Request body

This endpoint takes no request body.

Successful responses

200

The bulk send: its status, quarantined, the 202 totals and the progress counters. With Accept: text/event-stream, the live stream: each snapshot brings this same object.

Response example
{
  "success": true,
  "data": {
    "batchId": "bat_3f1c0a9b2d7e4c58a6b1e0f9d2c3b4a5",
    "campaignId": "cmp_9d4b2e7a1c3f5086b2a4d6e8f0a1b3c5",
    "status": "completed",
    "stage": "finished",
    "quarantined": false,
    "receivedAt": "2026-11-04T10:00:00.000-05:00",
    "recipients": 3,
    "accepted": 2,
    "rejected": 1,
    "segments": 2,
    "encodings": { "gsm7": 2, "ucs2": 0 },
    "cost": { "amountMicro": 60000000, "currency": "COP" },
    "refunded": { "amountMicro": 0, "currency": "COP" },
    "progress": { "settled": 2, "refunded": 0, "released": 2, "quarantined": 0, "outputDone": true },
    "completeThrough": "2026-11-04T10:05:00.250-05:00",
    "ingestLagSeconds": 2
  },
  "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

NameTypeDescription and rules
successAlways presentboolean

dataAlways presentobject

A bulk send: its status, the 202 totals and the progress counters.

data.batchIdAlways presentstring

Bulk send identifier.

Example:bat_3f1c0a9b2d7e4c58a6b1e0f9d2c3b4a5

data.campaignIdAlways presentstring

The bulk send’s campaign.

Example:cmp_9d4b2e7a1c3f5086b2a4d6e8f0a1b3c5

data.statusAlways presentstring

The bulk send status: branch on this one.

Allowed values:accepted pending in_progress waiting_for_window waiting_for_capacity completed partially_sent failed not_accepted

data.stageAlways presentstring

The internal detail of the record. Do not branch on it: its values may change.

data.reasonstring

Why it was not admitted, in a not_accepted (for example no_balance).

data.quarantinedAlways presentboolean

true: the bulk send is under review on our side. You do not need to do anything or send it again.

data.receivedAtAlways presentstring

When it was received, in Colombia time.

Format:date-time

data.recipientsAlways presentinteger

Destinations in the request.

data.acceptedAlways presentinteger

Admitted destinations.

data.rejectedAlways presentinteger

Destinations rejected on receipt, without charge.

data.segmentsAlways presentinteger

Parts of everything admitted.

data.encodingsAlways presentobject

How many admitted messages go in each alphabet.

data.encodings.gsm7Always presentinteger

In GSM-7.

data.encodings.ucs2Always presentinteger

In Unicode.

data.costAlways presentobject

What was charged (or reserved, in a bulk send), in micros of your organization’s currency: 1 unit = 1,000,000 micros.

data.cost.amountMicroAlways presentinteger

Amount in micros.

Example:30000000

data.cost.currencyAlways presentstring

ISO 4217 currency code.

Example:COP

data.refundedAlways presentobject

What went back to your balance: what could not be charged (a number without an identified carrier, no rate).

data.refunded.amountMicroAlways presentinteger

Amount in micros.

Example:30000000

data.refunded.currencyAlways presentstring

ISO 4217 currency code.

Example:COP

data.progressAlways presentobject

The progress counters.

data.progress.settledAlways presentinteger

Messages already recorded.

data.progress.refundedAlways presentinteger

Messages that are not charged (no identified carrier or no rate).

data.progress.releasedAlways presentinteger

Messages handed to output towards the carriers.

data.progress.quarantinedAlways presentinteger

Messages under review on our side.

data.progress.outputDoneAlways presentboolean

true once the bulk send output finished.

data.completeThroughstring

The same mark as the message list: it is about the messages sent one by one, not about this bulk send. Being later than receivedAt does not mean its messages are already in the query: what is missing from this bulk send is told by progress. It does not come if it cannot be known.

Format:date-timeExample:2026-11-04T10:00:05.120-05:00

data.ingestLagSecondsinteger

How many seconds there are from completeThrough to now: how long recent messages take to appear. Usually a few seconds. It comes with completeThrough.

Example:3

metaAlways presentobject

Response metadata.

meta.requestIdAlways presentstring

Unique request identifier (16 hexadecimal characters). It matches the X-Request-Id header. Quote it when contacting support.

Example:b9b1704baffab211

meta.clientIpAlways presentstring

IP the API saw your request come from. Useful if your API key only accepts certain networks.

Example:203.0.113.45

meta.timestampAlways presentstring

Date and time the response was built (ISO 8601 with offset).

Format:date-timeExample:2026-06-04T19:43:59+00:00

meta.responseTimeMsAlways presentnumber

Time (ms) the server took to process the request.

Example:4.24

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
NameTypeDescription and rules
successAlways presentboolean

Fixed value:false

metaAlways presentobject

Response metadata.

meta.requestIdAlways presentstring

Unique request identifier (16 hexadecimal characters). It matches the X-Request-Id header. Quote it when contacting support.

Example:b9b1704baffab211

meta.clientIpAlways presentstring

IP the API saw your request come from. Useful if your API key only accepts certain networks.

Example:203.0.113.45

meta.timestampAlways presentstring

Date and time the response was built (ISO 8601 with offset).

Format:date-timeExample:2026-06-04T19:43:59+00:00

meta.responseTimeMsAlways presentnumber

Time (ms) the server took to process the request.

Example:4.24

errorAlways presentobject

error.codeAlways presentstring

Stable UPPER_SNAKE_CASE identifier. Clients branch on this value.

Example:AUTH_REQUIRED

error.legacyCodeinteger

Legacy v5 numeric code, only when a bridge exists. Omitted for codes born in v6.

Example:40002

error.typeAlways presentstring

URL to the error documentation.

Format:uriExample:https://developers.hablame.co/docs/v6/errors/auth-required

error.messageAlways presentstring

Human readable text, in English. It is for the developer log, not the end user: do not parse it.

error.detailsAlways presentarray<object>

Structured context (validation issues, affected resource). Empty array when there is no extra context.

Validation

This endpoint does not declare responses of this kind.

Authentication

  • 401Invalid or missing credentials.
  • 401AUTH_REQUIRED

    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>`.

  • 401AUTH_INVALID_KEY

    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), the key cannot be used from the request network, the organization is not active (ACCOUNT_NOT_ACTIVE: closed or blocked) or the querying account could not be identified (SMS_ACCOUNT_NOT_IDENTIFIED), or your organization is not enabled for the SMS API v6 yet (SMS_ORGANIZATION_NOT_ENABLED). A suspended organization, or one with SMS turned off, can query: it does not get this 403.
  • 403AUTH_SERVICE_NOT_ALLOWED

    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.

  • 403AUTH_IP_NOT_ALLOWED

    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.

  • 403ACCOUNT_NOT_ACTIVE

    Your organization is suspended or closed.

    Message the API returns: The organization associated with this API key is not active. Please contact support.

  • 403SMS_ORGANIZATION_NOT_ENABLED

    Your organization is not enabled for the SMS API v6 yet.

  • 403SMS_ACCOUNT_NOT_IDENTIFIED

    The send’s account could not be identified.

Usage limits

  • 429Request limit exceeded.
  • 429RATE_TPS_EXCEEDED

    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.

Resource not found

  • 404There is no bulk send of your organization with that batchId yet: a just-accepted one takes a few seconds to appear. Do not send it again with another Idempotency-Key.

Internal errors and availability

  • 503It could not be queried right now (SERVICE_UNAVAILABLE). Nothing changed in your sends: retry the same query after Retry-After.

Other responses

This endpoint does not declare responses of this kind.

See it in the error catalog

Special considerations

A just-accepted bulk send may take a few seconds to appear

If you query it right after the 202, you may get 404 SMS_BATCH_NOT_FOUND: it does not mean it was not received. Wait a few seconds and query again with the same batchId. Do not send it again with another Idempotency-Key: that would be another bulk send, sent and charged twice.

Always keep the query as a fallback

A proxy in your network may not let the stream through. If no snapshot arrives, or it drops three times in a row without opening again, continue with the JSON route every few seconds, as before.

It also answers with the organization suspended

If your organization is suspended, or has SMS turned off, queries keep working with your key: you can see your messages, your bulk sends and what people wrote to you. What you cannot do is send: the three sends answer 403 (ACCOUNT_NOT_ACTIVE with the organization suspended, AUTH_SERVICE_NOT_ALLOWED with SMS turned off).

Related documentation

Need help?

Was this page helpful?

See all support channels

Ask for help about this: this endpoint

We build a message with the details that help us look into your case. Read it, complete it and send it yourself: nothing is sent on its own.

The message never carries your API key or passwords.

Your cookie preferences

You decide what we measure. You can change your choice at any time. Rejecting takes no feature away from the documentation.

Privacy policy