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

# Logout admin dashboard session

> Clears the dashboard-only `insforge_admin_refresh_token` cookie.

If a valid admin refresh cookie is present, the request must include the `X-CSRF-Token`
header returned from admin login, admin session exchange, or admin refresh. Missing, expired,
invalid, or wrong-session-type admin refresh cookies are cleared idempotently and still return
success.




## OpenAPI

````yaml https://raw.githubusercontent.com/InsForge/InsForge/main/openapi/auth.yaml post /api/auth/admin/logout
openapi: 3.0.3
info:
  title: Insforge Authentication API
  version: 2.0.0
  description: Authentication endpoints with separated auth and profile tables
servers: []
security: []
paths:
  /api/auth/admin/logout:
    post:
      tags:
        - Admin
      summary: Logout admin dashboard session
      description: >
        Clears the dashboard-only `insforge_admin_refresh_token` cookie.


        If a valid admin refresh cookie is present, the request must include the
        `X-CSRF-Token`

        header returned from admin login, admin session exchange, or admin
        refresh. Missing, expired,

        invalid, or wrong-session-type admin refresh cookies are cleared
        idempotently and still return

        success.
      parameters:
        - name: X-CSRF-Token
          in: header
          schema:
            type: string
          description: CSRF token required when a valid admin refresh cookie is present
      responses:
        '200':
          description: >-
            Logged out successfully. Also returned when the admin refresh cookie
            is missing, expired, invalid, or the wrong session type.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
        '403':
          description: Invalid or missing CSRF token for a valid admin refresh cookie

````