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

# Logout

> Deletes the session from KV storage and clears the `jwt` and `session_id` cookies.



## OpenAPI

````yaml /openapi.json post /api/logout
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/logout:
    post:
      tags:
        - Session
      summary: Logout
      description: >-
        Deletes the session from KV storage and clears the `jwt` and
        `session_id` cookies.
      operationId: logout
      responses:
        '200':
          description: Logged out
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResponse'
      security:
        - sessionCookie: []
components:
  schemas:
    SuccessResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
  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.

````