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

# Refresh an existing access token

> Refresh an existing access token



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/oauth2/refresh
openapi: 3.1.0
info:
  title: Quidkey API
  version: 1.0.0
  description: API documentation for Quidkey Core Services
servers:
  - url: https://core.quidkey.com
    description: Production
security: []
paths:
  /api/v1/oauth2/refresh:
    post:
      tags:
        - Auth
      summary: Refresh an existing access token
      description: Refresh an existing access token
      requestBody:
        required: true
        description: Request body
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/auth_RefreshTokenRequest'
            example:
              refresh_token: refresh_token_abc123
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/auth_TokenResponse'
              example:
                success: true
                data:
                  access_token: example_access_token_xyz789
                  refresh_token: example_refresh_token_abc123
                  token_type: Bearer
                  expires_in: 900
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/shared_Error400'
              example:
                success: false
                error:
                  message: Invalid input provided
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/shared_Error401'
              example:
                success: false
                error:
                  message: Invalid input provided
components:
  schemas:
    auth_RefreshTokenRequest:
      additionalProperties: false
      type: object
      required:
        - refresh_token
      properties:
        refresh_token:
          description: The refresh token obtained from a previous token request
          examples:
            - refresh_token_abc123
          type: string
    auth_TokenResponse:
      type: object
      required:
        - success
        - data
      properties:
        success:
          description: Indicates if the request was successful
          examples:
            - true
          type: boolean
        data:
          additionalProperties: false
          type: object
          required:
            - access_token
            - token_type
            - expires_in
          properties:
            access_token:
              description: The access token to be used for authenticated requests
              examples:
                - example_access_token_xyz789
              type: string
            refresh_token:
              description: >-
                The refresh token used to obtain a new access token. Returned
                only when a token is first issued (client_credentials,
                magic_code, google_id_token grants); the refresh grant does not
                return a new refresh token, so the original is reused until it
                expires.
              examples:
                - example_refresh_token_abc123
              type: string
            token_type:
              description: The type of token issued
              examples:
                - Bearer
              const: Bearer
              type: string
            expires_in:
              description: The number of seconds until the access token expires
              examples:
                - 900
              type: number
    shared_Error400:
      title: Bad Request Error
      description: 400 Bad Request Error Response
      type: object
      required:
        - success
        - error
      properties:
        success:
          description: Always false for error responses
          examples:
            - false
          const: false
          type: boolean
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              allOf:
                - description: Error code for the specific error type
                  examples:
                    - INVALID_INPUT
                  type: string
                - description: Error code for the specific error type
                  examples:
                    - VALIDATION_ERROR
                  type: string
            message:
              description: Human-readable error message
              examples:
                - Invalid input provided
              type: string
            metadata:
              additionalProperties: true
              description: >-
                Additional error context. For VALIDATION_ERROR, includes a
                per-field `errors` array.
              type: object
              properties:
                errors:
                  type: array
                  items:
                    type: object
                    required:
                      - field
                      - message
                    properties:
                      field:
                        type: string
                      message:
                        type: string
    shared_Error401:
      title: Unauthorized Error
      description: 401 Unauthorized Error Response
      type: object
      required:
        - success
        - error
      properties:
        success:
          description: Always false for error responses
          examples:
            - false
          const: false
          type: boolean
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              allOf:
                - description: Error code for the specific error type
                  examples:
                    - INVALID_INPUT
                  type: string
                - const: UNAUTHORIZED
                  type: string
            message:
              description: Human-readable error message
              examples:
                - Invalid input provided
              type: string

````