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

# Switch environment mode

> Switch between live and test mode. Issues a new JWT with the updated mode claim and refreshes the cookie.



## OpenAPI

````yaml /openapi.json post /api/v1/auth/mode
openapi: 3.0.0
info:
  title: Dexxify API
  description: >-
    Crypto Infrastructure API for Africa (Wallets, Payouts, Offramp, Onramp,
    KYC, KYB)
  version: '1.0'
  contact:
    name: Dexxify
    url: https://www.dexxify.com
    email: dexxifyhq@gmail.com
servers: []
security: []
tags: []
paths:
  /api/v1/auth/mode:
    post:
      tags:
        - Authentication
      summary: Switch environment mode
      description: >-
        Switch between live and test mode. Issues a new JWT with the updated
        mode claim and refreshes the cookie.
      operationId: AuthController_switchMode
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SwitchModeDto'
      responses:
        '200':
          description: Environment mode switched successfully.
        '400':
          description: Validation failed or the request body/params were malformed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
        '401':
          description: Missing, invalid, or expired authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
components:
  schemas:
    SwitchModeDto:
      type: object
      properties:
        mode:
          type: string
          description: Target environment mode
          enum:
            - live
            - test
          example: live
      required:
        - mode
    ErrorResponseDto:
      type: object
      properties:
        success:
          type: boolean
          example: false
        status:
          type: number
          example: 400
        message:
          type: string
          example: Validation failed.
        errors:
          type: object
          example:
            - amount must not be less than 0
        timestamp:
          type: string
          example: '2026-09-17T12:00:00.000Z'
      required:
        - success
        - status
        - message
        - timestamp

````