> ## 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.

# Switch active address

> Switches the active inbox for the session. Updates the `jwt` cookie to the JWT for the selected address and rotates the `session_id` for security.



## OpenAPI

````yaml /openapi.json post /api/switch_address
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/switch_address:
    post:
      tags:
        - Session
      summary: Switch active address
      description: >-
        Switches the active inbox for the session. Updates the `jwt` cookie to
        the JWT for the selected address and rotates the `session_id` for
        security.
      operationId: switchAddress
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - address
              properties:
                address:
                  type: string
                  example: swift-cloud-7x4@tempinbox.dev
      responses:
        '200':
          description: Switched
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  address:
                    type: string
        '429':
          $ref: '#/components/responses/RateLimited'
      security:
        - sessionCookie: []
components:
  responses:
    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.
    sessionCookie:
      type: apiKey
      in: cookie
      name: session_id
      description: HMAC-signed browser session cookie. Browser clients only.

````