# Get SMS messages

Retrieve a paginated list of sent and received SMS messages. Filter by direction, sending mode, and search string.

Endpoint: GET /whatsapp-api-service/SMSSendReceiveMessages/getSMSSendReceiveMessagesForCurrentLoginUser
Version: 3.0.0
Security: apikeyAuth

## Security:

  - `apikeyAuth` (unknown)
    apiKey in header Authorization

## Query parameters:

  - `page` (integer)
    Zero-based page index.

  - `size` (integer)
    Number of records per page.

  - `searchString` (string | null)
    Filter by phone number or message content.

  - `direction` (string | null)
    Filter by message direction (OUTGOING or INCOMING).

  - `mode` (string | null)
    Filter by sending mode (DIRECT for standalone SMS, FALLBACK for WhatsApp-to-SMS fallback).

## Response 200:

  - `200` (unknown)
    Paginated list of SMS messages matching the specified filters

## Response 200 fields (application/json):

  - `content` (array)

  - `content.id` (string)
    Example: a3b4c5d6-e7f8-9012-a3b4-c5d6e7f89012

  - `content.createdTime` (string)
    Example: 2026-01-15T10:30:00Z

  - `content.gstid` (string)
    Example: sms-gst-56789

  - `content.receiver` (string)
    Example: 27821234567

  - `content.text` (string)
    Example: Your verification code is 12345.

  - `content.sent` (boolean)
    Example: true

  - `content.delivered` (boolean)
    Example: true

  - `content.failed` (boolean)
    Example: false

  - `content.messageStatus` (string)
    Example: DELIVERED

  - `content.messageStatusCode` (string)
    Example: 0

  - `content.messageCost` (string)
    Example: 0.15

  - `content.smsCTDId` (string)
    Example: sms-ctd-001

  - `content.timeSentToPayless` (string)
    Example: 2026-01-15T10:30:00Z

  - `content.timeSentSMS` (string)
    Example: 2026-01-15T10:30:01Z

  - `content.timeDeliveredSMS` (string)
    Example: 2026-01-15T10:30:05Z

  - `content.messageType` (string)
    Enum: "DIRECT", "FALLBACK"

  - `content.messageDirection` (string)
    Enum: "OUTGOING", "INCOMING"

  - `totalElements` (integer)
    Example: 100

  - `totalPages` (integer)
    Example: 10

  - `size` (integer)
    Example: 10

  - `number` (integer)
    Example: 0

## Response 401:

  - `401` (unknown)
    Authentication failed — the API key sent in the `Authorization` header is missing,
invalid, or has been revoked.
**Verify your API key before changing anything else.** Check the key currently active
on your account either in the eCommunicate web UI (API key settings), or by calling
`POST /payless4messaging-service/WhatsApp/authenticate/retrieveApiKey` with your
account credentials — that endpoint needs no existing key, so it works while every
other call is returning `401`. Compare the result with the value your integration is
sending: pass the key on its own (no `Bearer` prefix), trimmed of whitespace, as a
36-character UUID.
Do not retry a `401` — it will fail identically until the key is corrected. See the
[Authentication guide](/guides/authentication#troubleshooting-a-401).

## Response 401 fields (application/json):

  - `status` (string)
    Example: ERROR

  - `message` (string)
    Example: Unauthorized user

  - `requestId` (string)
    Example: c3a1f8e2-4b6d-11ee-be56-0242ac120002

  - `timestamp` (string)
    Example: 2026-01-15T10:30:00Z

