---
title: "List the messages"
method: GET
path: "/messages"
tags: ["Messages"]
---

# List the messages

`GET /messages`

## Request

- Base URL: `https://api.hypamoon.com/api/v1`
- URL: `https://api.hypamoon.com/api/v1/messages`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://app.hypamoon.com/oauth/authorize`, token URL `https://api.hypamoon.com/oauth/token`, scopes: `messages:read`)

The SMS messages the project sent through the API, newest first, with their status. Follow next_cursor while has_more is true.

## Query parameters

- `limit` integer
- `cursor` string

## Response `200`

A page of messages.

- MessageList
  - `data` Message[], required
    - `id` string, uuid, required: The id of the message.
    - `to` string, required: The recipient, in E.164.
    - `from` string, required: The sender the recipient sees: an alphanumeric name of up to 11 characters.
    - `body` string, required: The text as it was sent, after typographic quotes and dashes were made SMS-safe.
    - `segments` integer, required: How many SMS segments the text took. A segment is 160 GSM-7 or 70 UCS-2 characters (153 and 67 when split).
    - `encoding` 'gsm7' | 'ucs2' | 'null', nullable, required: gsm7, or ucs2 when the text has a character outside GSM-7 (an emoji, for example), which makes every segment shorter.
    - `status` 'queued' | 'sent' | 'delivered' | 'failed', required: queued: accepted. sent: handed to the mobile network. delivered: the phone confirmed it. failed: it did not arrive; see error.
    - `error` string, nullable, required: With status failed: a short code, like delivery_failed or sending_failed. Otherwise null.
    - `reference` string, nullable, required: Your own id for this message, as you sent it (an order number, for example).
    - `created_at` string, date-time, required: When we accepted the message.
    - `status_updated_at` string, date-time, nullable, required: When the status last changed.
    - `test` boolean, required: true for a message sent with a test key to a test number. It never reaches a phone.
  - `has_more` boolean, required: Whether there is another page.
  - `next_cursor` string, nullable, required: Pass this as cursor to get the next page.

## Other responses

- `400`: Bad Request: invalid_parameter.
- `401`: Unauthorized: unauthorized, missing_api_key, invalid_api_key, api_key_revoked, project_deleted.
- `403`: Forbidden: project_not_enabled, key_mode_mismatch, missing_scope, verification_required.
- `429`: Too Many Requests: rate_limited.
- `500`: Internal Server Error: internal_error.
- `503`: Service Unavailable: service_unavailable.

---

[API](https://skmtc.dev/hypamoon/apis/hypamoon-api.md) · [All operations](https://skmtc.dev/hypamoon/apis/hypamoon-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hypamoon/apis/hypamoon-api/revisions/9f0b90004c06?raw)
