Listing inbound messages

Read the last 100 inbound SMS your account has received with GET /api/messages.

Listing inbound messages

Read the most recent inbound messages your account has received. This is the pull alternative to the inbound webhook, use it to poll for messages or to backfill what your webhook may have missed.

GEThttps://sms.hep.gg/api/messagesAuth required
List the last 100 inbound messages for your account, newest first.

Request

No body and no query parameters. The account is resolved from your API key, sent as the raw key in the Authorization header (no Bearer prefix).

curl
curl https://sms.hep.gg/api/messages \
  -H "Authorization: $SMS_KEY"

Response

On success you get 200 with a JSON array of up to 100 inbound message records, ordered newest first (by created_at descending). There is no pagination; the cap is a fixed 100 rows.

200 OK
[
  {
    "id": "a1b2c3d4-...",
    "userID": "your-hepgg-user-id",
    "sender": "+447700900000",
    "shortcode": "order",
    "content": "large pepperoni",
    "webhook_status": 200,
    "created_at": "2026-05-29T10:15:00.000Z"
  }
]
Record fields
id
stringoptional
The unique id of the inbound message.
userID
stringoptional
Your hep.gg user id.
sender
stringoptional
The phone number the message came from, in E.164 format.
shortcode
stringoptional
The shortcode that routed the message to your account.
content
stringoptional
The message text with the leading shortcode word removed. Empty string if the sender sent only the shortcode.
webhook_status
integeroptional
The HTTP status your webhook returned for this message, or null if you have no webhook configured or delivery failed before a status was received.
created_at
timestampoptional
When the message was received.

Empty result

When your account has no inbound messages, this endpoint returns 404 with a response string rather than an empty array:

404 Not Found
{
  "response": "No received messages with your short code or previous short codes."
}

Treat 404 as "no messages yet", not as an error.

Errors

Authentication failures return the same 401 / 403 responses as the rest of the API; see Errors and status codes on the sending page.