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

# List emails

> Returns emails for the authenticated address, newest first. For polling, call with `limit=1&offset=0` until `count > 0`, with 2–5 seconds between polls. Responses at `offset=0` are cached for up to 60 seconds.



## OpenAPI

````yaml /openapi.json get /api/mails
openapi: 3.1.0
info:
  title: TempInbox API
  description: >-
    REST API for TempInbox (tempinbox.dev) — create temporary email inboxes,
    receive mail, and automate email verification workflows. Receive-only:
    outbound sending is not supported. Rate limits apply per IP, per path;
    exceeded requests return 429.
  version: 1.0.0
  contact:
    url: https://tempinbox.dev
servers:
  - url: https://tempinbox.dev
    description: Public instance
security:
  - bearerAuth: []
paths:
  /api/mails:
    get:
      tags:
        - Mails
      summary: List emails
      description: >-
        Returns emails for the authenticated address, newest first. For polling,
        call with `limit=1&offset=0` until `count > 0`, with 2–5 seconds between
        polls. Responses at `offset=0` are cached for up to 60 seconds.
      operationId: listMails
      parameters:
        - name: limit
          in: query
          required: true
          schema:
            type: integer
            maximum: 100
            example: 20
          description: Number of emails to return (max 100)
        - name: offset
          in: query
          required: true
          schema:
            type: integer
            example: 0
          description: Pagination offset
      responses:
        '200':
          description: Email list
          content:
            application/json:
              schema:
                type: object
                properties:
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/MailListItem'
                  count:
                    type: integer
                    example: 1
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  schemas:
    MailListItem:
      type: object
      properties:
        id:
          type: integer
          example: 42
        uuid:
          type: string
          format: uuid
          example: 550e8400-e29b-41d4-a716-446655440000
        source:
          type: string
          example: noreply@example.com
        address:
          type: string
          example: swift-cloud-7x4@tempinbox.dev
        metadata:
          type: string
          description: JSON string — parse before reading fields like subject
          example: '{"subject":"Your verification code is 847291"}'
        created_at:
          type: string
          format: date-time
          example: '2026-05-28T10:00:00Z'
        message_id:
          type: string
          example: <abc123@example.com>
  responses:
    Unauthorized:
      description: >-
        Missing or invalid JWT. JWTs are address-bound — a deleted address
        invalidates its JWT.
      content:
        text/plain:
          schema:
            type: string
    RateLimited:
      description: >-
        Per-IP, per-path rate limit exceeded. Back off exponentially; poll no
        faster than every 2–3 seconds.
      content:
        text/plain:
          schema:
            type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Address-bound JWT. Returned by POST /api/new_address, or copy it from
        the browser (DevTools → Application → Cookies → jwt) for automation.

````