List Messages

GET

api.ziett.co/c/v1 /messages

Retrieve a paginated history of all messages sent by your organization. This endpoint provides deep visibility into your transactional and marketing traffic, allowing you to audit delivery status, track routing logs, and filter communications across multiple variables.

For finding a single message instantly when you already have its unique tracking identifier, see Get Message.


Request

Required scope: apikey:messages:list

Query Parameters

ParameterTypeDefaultDescription
qstringKeyword search query. Matches partially against recipient phone numbers (target_e164) or exactly against the unique message UUID.
pageinteger1The page index to retrieve. Minimum value is 1.
sizeinteger30Number of records to return per page. Minimum is 1, maximum allowed is 200.
orderenumdescSort direction for the results. Accepted values: asc (oldest first), desc (newest first).
order_byenumcreated_atThe model attribute used to sort results. Accepted values: created_at, updated_at.
statusenum | arrayFilter by specific delivery states. Accepted values: PENDING, SENT, DELIVERED, FAILED, UNDELIVERED. Pass multiple times to match several states (e.g., status=SENT&status=FAILED).
channel_typeenum | arrayFilter by transport medium. Accepted values: SMS, WHATSAPP. Can be passed multiple times.
contact_iduuid | arrayFilter history for one or more specific contacts in your database.
campaign_iduuid | arrayFilter messages generated by a specific batch campaign execution.
sms_remitter_iduuid | arrayFilter by the specific approved Sender ID (Remitter UUID) used to dispatch the traffic.
created_at__gedatetimeLower bound date-time range limit in ISO 8601 format (inclusive). Example: 2026-01-01T00:00:00Z.
created_at__ledatetimeUpper bound date-time range limit in ISO 8601 format (inclusive). Example: 2026-01-31T23:59:59Z.

Examples

import httpx

# Example fetching the first page of failed SMS messages
response = httpx.get(
    "[https://api.ziett.co/c/v1/messages](https://api.ziett.co/c/v1/messages)",
    headers={
        "X-API-KEY": "zk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    },
    params={
        "page": 1,
        "size": 30,
        "status": ["FAILED", "UNDELIVERED"],
        "channel_type": "SMS",
    },
)

print(response.json())

Responses

200 OK — Paginated List Retrieved

The query parameters were successfully evaluated and matched against your historical communication database.

{
  "entries": [
    {
      "id": "019b4b56-e704-7c30-83a0-527df63c3e00",
      "remitter_id": "019b4b56-e704-7c30-83a0-527df63c3e00",
      "campaign_id": null,
      "contact_id": "019b4b56-fa21-7210-91b1-127df63c3eef",
      "channel_type": "SMS",
      "channel_destination": "UNITEL",
      "target_e164": "+244990090990",
      "content": "Your verification code is 482910. It expires in 5 minutes.",
      "status": "DELIVERED",
      "error_code": null,
      "created_at": "2026-05-14T10:30:00.000000+00:00",
      "updated_at": "2026-05-14T10:30:04.000000+00:00"
    }
  ],
  "total": 1420,
  "page": 1,
  "size": 30,
  "pages": 48
}

Envelope Fields

FieldTypeDescription
entriesarray[object]List of message details matching the criteria. See Message Detail Object.
totalintegerThe absolute number of records matching the filters globally.
pageintegerThe current page index returned.
sizeintegerThe number of records processed per page index.
pagesintegerTotal count of accessible pages calculated from total and size.

Message Detail Object

FieldTypeDescription
iduuidUnique tracking identifier for this message.
remitter_iduuidThe identity signature or Sender ID resource used to issue the notification.
campaign_iduuidnull
contact_iduuidnull
channel_typestringThe delivery layout channel choice (SMS, WHATSAPP).
channel_destinationstringResolved network operator carrier or delivery stack handler (e.g., UNITEL, AFRICELL_AO).
target_e164stringInternationalized phone destination number formatted under standard E.164 constraints.
contentstringThe message string content payload dispatched over the network.
statusstringThe final or active structural operational state (PENDING, SENT, DELIVERED, FAILED, UNDELIVERED).
error_codestringnull
created_atdatetimeTimestamp marking when the notification request was ingested and stored.
updated_atdatetimeTimestamp capturing the most recent state or delivery receipt update.

401 Unauthorized — Invalid API Key

The X-API-KEY header is missing, malformed, or the key has been revoked.

{
  "code": "AUTH_INVALID_API_KEY",
  "message": "The provided API key is invalid or has been revoked.",
  "status": 401,
  "trace_id": "a1b2c3d4e5f644358a9e7011c123c831",
  "timestamp": "2026-05-14T10:30:00.000000+00:00",
  "service": "core"
}

422 Unprocessable Entity — Validation Error

One or more query attributes or formats are invalid (e.g., page boundaries out of bounds, malformed date-time string formats).

{
  "code": "VALIDATION_ERROR",
  "message": "One or more fields failed validation.",
  "status": 422,
  "trace_id": "f812a3bc91e044358a9e7011c456d901",
  "timestamp": "2026-05-14T10:30:00.000000+00:00",
  "service": "core",
  "fields": {
    "size": "Ensure this value is less than or equal to 200.",
    "created_at__ge": "Value must conform to a valid ISO 8601 date-time format structure."
  }
}

Rate Limits

This endpoint is limited to 60 requests per minute per API Key. See Rate Limits & Reliability for backoff strategies and retry guidance.