SMS
Get Message Details
Get the delivery status and details of a specific message
Endpoint
GET /api/sms/messages/{message_id}Path parameters
| Field | Type | Description |
|---|---|---|
message_id | string (UUID) | The message_id returned when the message was sent |
Example
curl "https://sms.lamah.com/api/sms/messages/a3a7b9a2-9d3f-4a7e-9b4e-13b1e9b1f2aa" \
-H "Authorization: Bearer YOUR_API_TOKEN"Response
The endpoint returns an array containing the message object:
[
{
"short_message": "Your appointment is confirmed for Tuesday at 4:30 PM.",
"message_type": "sms",
"send_type": "single",
"contact_group_id": null,
"message_consumption": 1,
"request_id": "b9e8a1f2-4c60-4b0b-9f51-0c4f2f6c9e7a",
"status": "approved",
"receiver": [
{
"number": "00218912345678",
"sent_at": "2024-01-15T10:30:02Z",
"delivered_at": "2024-01-15T10:30:15Z",
"status": "delivered",
"delivery_report": null,
"provider_id": "0198faa2-8ddd-72c7-afce-32d980bd60fe",
"consumption": 1,
"smpp_message_ids": ["4f2a91c0"],
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:15Z"
}
]
}
]Response array item fields
| Field | Type | Description |
|---|---|---|
short_message | string | The message content |
message_type | string | Always sms for SMS messages |
send_type | string | single or multiple |
contact_group_id | string|null | Contact group UUID if applicable |
message_consumption | integer | SMS parts consumed for this message |
request_id | string|null | The ingest request this message came from |
status | string | Approval status: pending, approved, or rejected |
receiver | array | List of receipt objects (one per recipient) |
The top-level status is the approval status — whether the message cleared moderation. Per-recipient delivery status lives on each receiver entry.
Receipt object fields
| Field | Type | Description |
|---|---|---|
number | string | Recipient phone number |
sent_at | string|null | ISO 8601 timestamp when message was sent |
delivered_at | string|null | ISO 8601 timestamp when message was delivered |
status | string | Delivery status for this recipient |
delivery_report | string|null | Raw delivery report if available |
provider_id | string | UUID of the network operator used |
consumption | integer | SMS parts charged for this recipient |
smpp_message_ids | array|null | Operator-side message identifiers |
created_at | string | ISO 8601 creation timestamp |
updated_at | string | ISO 8601 last update timestamp |
Messages still in the queue
Sends are ingested asynchronously, so a message_id returned seconds ago may not have a stored message yet. In that window the endpoint returns a reduced object with an empty receiver array:
[
{
"short_message": "Your appointment is confirmed for Tuesday at 4:30 PM.",
"message_type": "sms",
"send_type": "single",
"contact_group_id": null,
"message_consumption": 1,
"status": "queued",
"receiver": []
}
]status | Meaning |
|---|---|
queued | Accepted and waiting to be processed |
processing | Currently being processed |
failed | Ingest failed — balance is refunded |
Queued state is retained for 24 hours. After that, a request that was never processed returns 404.
Delivery statuses
Values that can appear in a receipt's status:
| Status | Description |
|---|---|
pending | Stored, not yet dispatched |
queued | Queued for dispatch to the operator |
enroute | Accepted by the operator and in transit |
accepted | Accepted by the operator |
sent | Handed to the network |
delivered | Confirmed delivery to recipient |
scheduled | Scheduled for later delivery |
failed | Failed due to a technical issue |
rejected | Rejected by the network |
undeliverable | Recipient unreachable |
expired | Not delivered before the message's deadline. The charge for this recipient has been refunded — see Message validity |
deleted | Cancelled at the operator |
unknown | Operator reported an unrecognised state |
Error responses
404 Not Found
Returned both when the ID does not exist and when it belongs to another project — the API does not distinguish the two.
{ "message": "Message not found" }422 Unprocessable Entity — Malformed ID
{
"message": "The message id field must be a valid UUID.",
"errors": {
"message_id": ["The message id field must be a valid UUID."]
}
}401 Unauthorized
{ "message": "Invalid or missing token." }