Name
Get a campaign
A campaign with the added-up progress of its bulk sends and the list of each one.
HTTP method and path
/ api/ v6/ sms/ campaigns/ {campaignId}https:
What happens when you run it
- Read only: it does not change your organization’s data.
- The call is not charged.
What it does
The same as the list brings, plus batches: each bulk send of the campaign in the order it arrived, with its status and its counters. A bulk send that was not admitted (not_accepted, for example with no balance) appears with its reason and adds nothing to the totals. A campaign from another organization answers 404, just like one that does not exist.
Each message and its events do not bring campaignId yet: GET / and the sms. webhook bring their bulk send’s batchId. To group messages by campaign, keep the campaignId each bulk send’s 202 returned, or read it here in batches: a bulk send’s campaign never changes.
Live
To follow a campaign without asking again and again, request the same route with Accept:: 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:) with2000 Last-Event-ID: if nothing changed, the snapshot is not repeated. - Without changes a comment (
:) arrives every 10 s so the connection is not dropped.ping - 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 itsRetry-After: ask the JSON route until it appears. - If it can no longer be queried midway,
event:arrives withinterrupted data:and the stream closes: wait those seconds and go back to the JSON route.{"status": 503, "retryAfter": 2} - 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/campaigns/cmp_9d4b2e7a1c3f5086b2a4d6e8f0a1b3c5 \
-H "Authorization: Bearer $HABLAME_API_KEY" \
-H "Accept: text/event-stream"retry: 2000
id: 9f3c1a7be0d24c58
event: snapshot
data: {"status":"in_progress","progress":{"settled":41250,"refunded":0,"released":40000,"quarantined":0,"outputDone":false}}
: ping
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: 10 requests per second.
- It shares the bulk send query’s quota.
- Opening the live stream (
Accept:) counts separately: 120 per minute per organization, without spending this quota.text/ event-stream
Path parameters
| Name | Type | Description and rules |
|---|---|---|
campaignIdRequired | string | The Pattern: |
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: |
AcceptOptional | string | With Allowed values: |
Last-Event-IDOptional | string | Only with the stream: the Pattern: |
Request body
This endpoint takes no request body.
Successful responses
200
The campaign, with its bulk sends. With Accept:, the live stream: each snapshot brings this same object.
{
"success": true,
"data": {
"campaignId": "cmp_9d4b2e7a1c3f5086b2a4d6e8f0a1b3c5",
"status": "in_progress",
"quarantined": false,
"createdAt": "2026-11-19T10:00:00.000-05:00",
"lastBatchAt": "2026-11-19T10:02:00.000-05:00",
"batchCount": 2,
"notAcceptedBatches": 0,
"recipients": 150000,
"accepted": 149990,
"rejected": 10,
"segments": 149990,
"encodings": { "gsm7": 149990, "ucs2": 0 },
"cost": { "amountMicro": 4499700000000, "currency": "COP" },
"refunded": { "amountMicro": 0, "currency": "COP" },
"progress": { "settled": 120000, "refunded": 0, "released": 100000, "quarantined": 0, "outputDone": false },
"batches": [
{
"batchId": "bat_3f1c0a9b2d7e4c58a6b1e0f9d2c3b4a5",
"status": "in_progress",
"quarantined": false,
"receivedAt": "2026-11-19T10:00:00.000-05:00",
"recipients": 100000,
"accepted": 99995,
"progress": { "settled": 99995, "refunded": 0, "released": 100000, "quarantined": 0, "outputDone": false }
},
{
"batchId": "bat_7a2e4c6b8d0f1a3c5e7b9d1f3a5c7e9b",
"status": "pending",
"quarantined": false,
"receivedAt": "2026-11-19T10:02:00.000-05:00",
"recipients": 50000,
"accepted": 49995,
"progress": { "settled": 20005, "refunded": 0, "released": 0, "quarantined": 0, "outputDone": false }
}
]
},
"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 campaign: the sum of its bulk sends, with each one. |
data.Always present | string | Campaign identifier. Example: |
data.Always present | string | The campaign status, from its bulk sends’: while one goes on, it goes on (and says the most advanced one). With all of them finished: Allowed values: |
data.Always present | boolean |
|
data.Always present | string | When its first bulk send was received, in Colombia time. Format: |
data.Always present | string | When its last bulk send was received, in Colombia time. Format: |
data.Always present | integer | Its bulk sends, admitted or not. |
data.Always present | integer | The ones not admitted ( |
data.Always present | integer | Destinations of its admitted bulk sends. |
data.Always present | integer | Admitted destinations. |
data.Always present | integer | Destinations rejected on receipt, without charge. |
data.Always present | integer | Parts of everything admitted. |
data.Always present | object | How many admitted messages go in each alphabet. |
data.Always present | integer | In GSM-7. |
data.Always present | integer | In Unicode. |
data.Always present | object | What its admitted bulk sends reserved, in micros of your organization’s currency. |
data.Always present | integer | Amount in micros. Example: |
data.Always present | string | ISO 4217 currency code. Example: |
data.Always present | object | What went back to your balance: what could not be charged. |
data.Always present | integer | Amount in micros. Example: |
data.Always present | string | ISO 4217 currency code. Example: |
data.Always present | object | The progress counters, added up. |
data.Always present | integer | Messages already recorded. |
data.Always present | integer | Messages that are not charged (no identified carrier or no rate). |
data.Always present | integer | Messages handed to output towards the carriers. |
data.Always present | integer | Messages under review on our side. |
data.Always present | boolean |
|
data.Always present | array<object> | Its bulk sends, in the order they arrived. Each one is followed with |
data.Always present | string | Bulk send identifier. |
data.Always present | string | Its status, the one of |
data. | string | Why it was not admitted, in a |
data.Always present | boolean |
|
data.Always present | string | When it was received, in Colombia time. Format: |
data.Always present | integer | Destinations it carried. |
data.Always present | integer | Admitted destinations. |
data.Always present | object | Its counters, as in the bulk send query. |
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
This endpoint does not declare responses of this kind.
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), 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 this403.
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.
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
- 429Request limit 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 campaign of your organization with that
campaignIdyet: a just-opened one takes a few seconds to appear.
There is no campaign with that
campaignId(yet).
Internal errors and availability
- 503It could not be queried right now (
SERVICE_UNAVAILABLE). Nothing changed in your sends: retry the same query afterRetry-After.
Generic 503: a service we depend on is not responding.
Other responses
This endpoint does not declare responses of this kind.
Special considerations
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).