> ## Documentation Index
> Fetch the complete documentation index at: https://docs.senderkit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List received messages

> Returns received-mail summaries for the workspace and API key
environment, newest first.




## OpenAPI

````yaml https://www.senderkit.com/openapi.yaml get /v1/inbound/messages
openapi: 3.1.0
info:
  title: SenderKit Public API
  version: 1.0.0
  description: >
    Public REST API for SenderKit — send transactional messages (email, SMS,

    push, web push), list message history, and read/render templates.


    ## Authentication

    All endpoints require a Bearer API key:

        Authorization: Bearer sk_live_xxx

    The `sk_live_` / `sk_test_` prefix selects the environment (live vs. test).

    The prefix is only a hint for humans; the secret is the full token. Keys are

    created in the dashboard and shown once at creation.


    ## Sends are asynchronous

    `POST /v1/send` enqueues the message and returns `202` with `status:
    "queued"`.

    Delivery happens out of band; poll `GET /v1/messages` to observe progress.


    ## Rate limits

    All endpoints are rate limited per API key. Sends and reads count against

    separate budgets, so listing messages never competes with sending them.

    A `429` response includes a `Retry-After` header (seconds).
servers:
  - url: https://api.senderkit.com
    description: Production
  - url: http://localhost:3000/api
    description: Local development
security:
  - apiKey: []
tags:
  - name: Context
    description: Inspect the workspace and environment an API key operates in.
  - name: Send
    description: Dispatch messages.
  - name: Messages
    description: Read message history and cancel pending sends.
  - name: Templates
    description: Read and render stored templates.
  - name: Inbound
    description: |
      Provision addresses on your workspace's shared receiving domain and read
      mail sent to them. Requires an API key with the `inbound` scope.
paths:
  /v1/inbound/messages:
    get:
      tags:
        - Inbound
      summary: List received messages
      description: |
        Returns received-mail summaries for the workspace and API key
        environment, newest first.
      operationId: listInboundMessages
      parameters:
        - name: limit
          in: query
          description: Page size (1-100).
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 50
        - name: before
          in: query
          description: |
            Only return messages received before this ISO-8601 timestamp
            (e.g. `2026-07-31T12:00:00Z`). Combine with the last item's
            `receivedAt` to page backwards. Non-ISO-8601 values are rejected
            with a 400 `invalid_request`.
          schema:
            type: string
            format: date-time
        - name: address
          in: query
          description: Filter to messages received on this address's public id.
          schema:
            type: string
      responses:
        '200':
          description: A page of received-message summaries.
          content:
            application/json:
              schema:
                type: object
                required:
                  - messages
                properties:
                  messages:
                    type: array
                    items:
                      $ref: '#/components/schemas/InboundMessageSummary'
        '400':
          description: '`before` is not an ISO-8601 timestamp (`invalid_request`).'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: >-
            The API key is missing the required `inbound` scope
            (`insufficient_scope`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  schemas:
    InboundMessageSummary:
      type: object
      description: A received-message summary, as returned by the list endpoint.
      properties:
        id:
          type: string
          description: Public inbound message ID.
          example: rcv_0a1b2c3d4e5f6g7h
        status:
          $ref: '#/components/schemas/InboundMessageStatus'
        from:
          type:
            - string
            - 'null'
          description: The envelope/header From address.
        subject:
          type:
            - string
            - 'null'
        plusTag:
          type:
            - string
            - 'null'
          description: The `+tag` segment of the local part addressed, if any.
        sizeBytes:
          type: integer
        receivedAt:
          type: string
          format: date-time
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Stable machine-readable error code.
              example: invalid_request
            message:
              type: string
            issues:
              type: array
              description: Present on validation failures (Zod issues).
              items:
                type: object
                additionalProperties: true
            limit:
              type: integer
              description: Present on rate-limit errors.
    InboundMessageStatus:
      type: string
      description: |
        `received` means the message was stored and the webhook/forward
        pipeline ran; `dropped` means it arrived on a verified inbound domain
        but matched no address (mail to an unknown local part); `quota_exceeded`
        means the workspace's inbound quota was hit — the full message row is
        still stored, but the webhook/forward pipeline was skipped.
      enum:
        - received
        - dropped
        - quota_exceeded
  responses:
    Unauthorized:
      description: Missing, malformed, invalid, or revoked API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RateLimited:
      description: Rate limit exceeded.
      headers:
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: API key with an `sk_live_` or `sk_test_` prefix.

````