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

# Revoke Refresh Token

> Revoke a refresh token.

Use this endpoint to invalidate a refresh token, for example when
logging out or when a token is compromised. This follows the OAuth 2.0
Token Revocation specification (RFC 7009) which uses POST.

Args:
    payload: Request containing the refresh token to revoke
    db: Database session

Raises:
    404: If the refresh token is not found



## OpenAPI

````yaml https://api.openwearables.io/openapi.json post /api/v1/token/revoke
openapi: 3.1.0
info:
  title: Open Wearables API
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/token/revoke:
    post:
      tags:
        - 'External: Token'
      summary: Revoke Refresh Token
      description: |-
        Revoke a refresh token.

        Use this endpoint to invalidate a refresh token, for example when
        logging out or when a token is compromised. This follows the OAuth 2.0
        Token Revocation specification (RFC 7009) which uses POST.

        Args:
            payload: Request containing the refresh token to revoke
            db: Database session

        Raises:
            404: If the refresh token is not found
      operationId: revoke_refresh_token_api_v1_token_revoke_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RefreshTokenRequest'
        required: true
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    RefreshTokenRequest:
      properties:
        refresh_token:
          type: string
          title: Refresh Token
      type: object
      required:
        - refresh_token
      title: RefreshTokenRequest
      description: Request to exchange refresh token for new access token.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````