> ## Documentation Index
> Fetch the complete documentation index at: https://actianvectorai-ml-crtx-1153-academy-tutorial-rewrites.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Set auth enabled

> Enables or disables authentication enforcement for the server. When auth is disabled, endpoints that normally require access tokens or JWT authorization can be called without credentials.

Requires an admin JWT in the `Authorization` header.




## OpenAPI

````yaml patch /auth/enabled
openapi: 3.0.3
info:
  title: Actian VectorAI DB - Authentication API
  description: Access token and admin user management for VectorAI DB.
  version: 1.0.0
  contact:
    name: Actian Corporation
    url: https://www.actian.com
servers:
  - url: http://localhost:6573
    description: Local development server (REST API)
  - url: https://api.vectorai.actian.com
    description: Production server
security:
  - bearerAuth: []
tags:
  - name: Access Tokens
    description: Create, list, rotate, and delete access tokens.
  - name: Admin User
    description: Create and manage the admin user, login, and authentication settings.
paths:
  /auth/enabled:
    patch:
      tags:
        - Admin User
      summary: Set auth enabled
      description: >
        Enables or disables authentication enforcement for the server. When auth
        is disabled, endpoints that normally require access tokens or JWT
        authorization can be called without credentials.


        Requires an admin JWT in the `Authorization` header.
      operationId: set_auth_enabled
      parameters:
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
          description: Admin JWT. Format `Bearer <admin-jwt>`.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - enabled
              properties:
                enabled:
                  type: boolean
                  description: >-
                    Set to `true` to enable authentication, `false` to disable
                    it.
      responses:
        '200':
          description: >-
            Auth setting updated. The `result` field reflects the current
            auth-enabled state after the update.
          content:
            application/json:
              schema:
                type: object
                properties:
                  usage:
                    type: object
                    nullable: true
                  time:
                    type: number
                    format: double
                    description: Time spent to process this request, in seconds.
                  status:
                    type: string
                  result:
                    type: boolean
                    description: The current auth-enabled state after the update.
              examples:
                enabled:
                  value:
                    usage: {}
                    time: 0
                    status: ok
                    result: true
        '400':
          description: Missing `enabled` field.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                missing_field:
                  value:
                    status: error
                    message: 'Missing required field: enabled'
      x-codeSamples:
        - lang: cURL
          label: Enable authentication
          source: |
            curl -X PATCH http://localhost:6575/auth/enabled \
              -H "Content-Type: application/json" \
              -H 'Authorization: Bearer <admin-jwt>' \
              -d '{
                "enabled": true
              }'
        - lang: cURL
          label: Disable authentication
          source: |
            curl -X PATCH http://localhost:6575/auth/enabled \
              -H "Content-Type: application/json" \
              -H 'Authorization: Bearer <admin-jwt>' \
              -d '{
                "enabled": false
              }'
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        status:
          type: string
          description: Error status indicator.
        message:
          type: string
          description: Human-readable error description.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Admin JWT obtained from the login endpoint.

````