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

# Exchange refresh token for new pair



## OpenAPI

````yaml https://api.crosmos.dev/openapi.json post /api/v1/auth/refresh
openapi: 3.1.0
info:
  title: Crosmos API
  version: 0.1.0
servers:
  - url: /
security: []
paths:
  /api/v1/auth/refresh:
    post:
      tags:
        - auth
      summary: Exchange refresh token for new pair
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RefreshRequest'
      responses:
        '200':
          description: New token pair
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenPair'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
components:
  schemas:
    RefreshRequest:
      type: object
      properties:
        refresh_token:
          type: string
          minLength: 1
          maxLength: 512
        active_org_id:
          type: string
          nullable: true
          format: uuid
      required:
        - refresh_token
    TokenPair:
      type: object
      properties:
        user_id:
          type: string
          format: uuid
        email:
          type: string
          format: email
        name:
          type: string
        access_token:
          type: string
        refresh_token:
          type: string
        token_type:
          type: string
          enum:
            - bearer
        active_org_id:
          type: string
          nullable: true
          format: uuid
      required:
        - user_id
        - email
        - name
        - access_token
        - refresh_token
        - token_type
        - active_org_id
    ErrorBody:
      type: object
      properties:
        detail:
          type: string
      required:
        - detail

````