SMS YANU documentation home

Look up messages

Read one message with its timeline, list messages and cancel scheduled ones.

Get one message

GET https://api.smsyanu.com/v1/messages/{id}
{
  "id": "6f1c2b9e-1d2a-4c55-9a0e-2b7f0c1d3e4f",
  "phone": "+265990000000",
  "text": "Your order 1042 is ready for collection.",
  "sender_id": "YANU",
  "country": "MW",
  "segments": 1,
  "status": "delivered",
  "error_code": null,
  "error_message": null,
  "retry_count": 0,
  "created_at": "2026-11-05T08:30:00+00:00",
  "submitted_at": "2026-11-05T08:30:01+00:00",
  "delivered_at": "2026-11-05T08:30:06+00:00",
  "failed_at": null,
  "timeline": [
    { "event": "accepted", "status": "queued", "detail": "API request received", "at": "2026-11-05T08:30:00+00:00" },
    { "event": "submitted", "status": "submitted", "detail": "Gateway accepted", "at": "2026-11-05T08:30:01+00:00" },
    { "event": "delivered", "status": "delivered", "detail": "Delivered", "at": "2026-11-05T08:30:06+00:00" }
  ]
}

A message that is not yours, or does not exist, returns HTTP 404.

List messages

GET https://api.smsyanu.com/v1/messages?limit=20&page=0&status=delivered
QueryMeaning
pagePage number, starting at 0.
limit1 to 100. Default 20.
statusOnly messages with this status.
toOnly messages to this number.
date_from, date_toISO date or date and time.
environmentlive, test or all (live keys only).

Cancel a scheduled message

POST https://api.smsyanu.com/v1/messages/{id}/cancel

Only messages with status scheduled can be cancelled. The charge goes back to your balance.

To be confirmed

The list response shape (paging fields) and the timeline event names are not final.

On this page