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

# Create address

> Creates a new temporary inbox and returns its JWT. Protected by Cloudflare Turnstile on the public instance — raw API calls without a valid `cf_token` will fail. For automation, pre-create the address in the web UI and reuse the JWT (see Authentication). Self-hosted instances with Turnstile disabled can call this directly.



## OpenAPI

````yaml /openapi.json post /api/new_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/new_address:
    post:
      tags:
        - Addresses
      summary: Create address
      description: >-
        Creates a new temporary inbox and returns its JWT. Protected by
        Cloudflare Turnstile on the public instance — raw API calls without a
        valid `cf_token` will fail. For automation, pre-create the address in
        the web UI and reuse the JWT (see Authentication). Self-hosted instances
        with Turnstile disabled can call this directly.
      operationId: createAddress
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: >-
                    Requested local part (before @). May be rejected if
                    blocklisted or custom names are disabled — handle errors and
                    fall back to random generation.
                domain:
                  type: string
                  description: Address domain
                  example: tempinbox.dev
                cf_token:
                  type: string
                  description: Cloudflare Turnstile token (required on the public instance)
      responses:
        '200':
          description: >-
            Address created. Also sets `jwt` and `session_id` cookies for
            browser clients.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NewAddressResponse'
        '429':
          $ref: '#/components/responses/RateLimited'
      security: []
components:
  schemas:
    NewAddressResponse:
      type: object
      properties:
        address:
          type: string
          example: swift-cloud-7x4@tempinbox.dev
        jwt:
          type: string
          example: eyJhbGciOiJIUzI1NiJ9...
  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.

````