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

# Logout a specific device

> Revokes the token associated with a device_id.



## OpenAPI

````yaml api-reference/openapi.yaml post /api/v1/auth/logout-device
openapi: 3.0.3
info:
  title: Flowxi API Documentation
  version: 1.0.0
servers:
  - url: https://api.flowxi.app
security:
  - bearerAuth: []
tags:
  - name: Health
    description: Service healthcheck.
  - name: Registration
    description: Registration flows (magic link + email OTP).
  - name: Auth
    description: Login and session management.
  - name: Two-factor authentication
    description: TOTP 2FA endpoints (login verification + manage 2FA).
  - name: Devices
    description: Session/device listing and revocation.
  - name: Me
    description: Profile of the authenticated user (Sanctum session).
paths:
  /api/v1/auth/logout-device:
    post:
      tags:
        - Devices
      summary: Logout a specific device
      description: Revokes the token associated with a device_id.
      operationId: postApiV1AuthLogoutDevice
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - device_id
              properties:
                device_id:
                  type: string
                  example: device-uuid-123
      responses:
        '200':
          description: Device logged out.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogoutOkResponse'
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '404':
          description: Device not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                code: DEVICE_NOT_FOUND
                message: Device not found.
        '422':
          $ref: '#/components/responses/ValidationFailed'
      security:
        - bearerAuth: []
components:
  schemas:
    LogoutOkResponse:
      allOf:
        - $ref: '#/components/schemas/ApiOkBase'
      example:
        code: LOGOUT_SUCCESS
        message: Logged out.
    ApiError:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: Machine-readable error code.
          example: UNAUTHENTICATED
        message:
          type: string
          description: Localized, user-facing message.
          example: Unauthenticated.
    ApiOkBase:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          example: OK
        message:
          type: string
          example: OK
    ValidationError:
      type: object
      required:
        - code
        - message
        - errors
      properties:
        code:
          type: string
          example: VALIDATION_FAILED
        message:
          type: string
          example: Validation failed.
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
      example:
        code: VALIDATION_FAILED
        message: Validation failed.
        errors:
          email:
            - The email field is required.
  responses:
    Unauthenticated:
      description: Unauthenticated.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          example:
            code: UNAUTHENTICATED
            message: Unauthenticated.
    ValidationFailed:
      description: Validation failed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidationError'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Sanctum

````