إرسال
SMS

Get Message Details

Get the delivery status and details of a specific message

Endpoint

GET /api/sms/messages/{message_id}

Path parameters

FieldTypeDescription
message_idstring (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,
    "receiver": [
      {
        "number": "00218912345678",
        "sent_at": "2024-01-15T10:30:02Z",
        "delivered_at": "2024-01-15T10:30:15Z",
        "status": "delivered",
        "delivery_report": null,
        "created_at": "2024-01-15T10:30:00Z",
        "updated_at": "2024-01-15T10:30:15Z"
      }
    ]
  }
]

Response array item fields

FieldTypeDescription
short_messagestringThe message content
message_typestringAlways sms for SMS messages
send_typestringsingle or multiple
contact_group_idstring|nullContact group UUID if applicable
message_consumptionintegerSMS parts consumed for this message
receiverarrayList of receipt objects (one per recipient)

Receipt object fields

FieldTypeDescription
numberstringRecipient phone number
sent_atstringISO 8601 timestamp when message was sent
delivered_atstringISO 8601 timestamp when message was delivered
statusstringDelivery status for this recipient
delivery_reportstring|nullRaw delivery report if available
created_atstringISO 8601 creation timestamp
updated_atstringISO 8601 last update timestamp

Message statuses

StatusDescription
pendingQueued, not yet sent
sentDelivered to the network
deliveredConfirmed delivery to recipient
failedFailed due to a technical issue
expiredMessage expired before delivery
rejectedRejected by the network

Error responses

404 Not Found

{ "message": "Message not found" }

401 Unauthorized

{ "message": "Unauthenticated." }

403 Forbidden

{ "message": "Message does not belong to your project" }

On this page