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

# Enable virtual key

> Reverses disable: the key returns to `active` exactly as it was, including any rotation grace that was running. Idempotent.



## OpenAPI

````yaml POST /api/gateway/v1/virtual-keys/{id}/enable
openapi: 3.1.0
info:
  title: LangWatch API
  version: 1.0.0
  description: LangWatch openapi spec
servers:
  - url: https://app.langwatch.ai
security:
  - project_api_key: []
paths:
  /api/gateway/v1/virtual-keys/{id}/enable:
    post:
      tags:
        - Virtual Keys
      summary: Enable virtual key
      description: >-
        Reverses disable: the key returns to `active` exactly as it was,
        including any rotation grace that was running. Idempotent.
      operationId: postApiGatewayV1Virtual-keysByIdEnable
      parameters:
        - schema:
            type: string
          in: path
          name: id
          required: true
      responses:
        '200':
          description: Enabled
          content:
            application/json:
              schema:
                type: object
                properties:
                  virtual_key:
                    type: object
                    properties:
                      id:
                        type: string
                      organization_id:
                        type: string
                      name:
                        type: string
                      description:
                        type:
                          - string
                          - 'null'
                      status:
                        type: string
                        enum:
                          - active
                          - disabled
                          - revoked
                      purpose:
                        type: string
                        enum:
                          - user
                          - langy
                      display_prefix:
                        type: string
                      principal_user_id:
                        type:
                          - string
                          - 'null'
                      trace_project_id:
                        type:
                          - string
                          - 'null'
                      external_id:
                        type:
                          - string
                          - 'null'
                      metadata:
                        type: object
                        additionalProperties:
                          type: string
                      scopes:
                        type: array
                        items:
                          type: object
                          properties:
                            scope_type:
                              type: string
                              enum:
                                - organization
                                - team
                                - project
                            scope_id:
                              type: string
                          required:
                            - scope_type
                            - scope_id
                      routing_policy_id:
                        type:
                          - string
                          - 'null'
                      routing_mode:
                        type: string
                        enum:
                          - none
                          - fallback_all
                          - policy
                      config: {}
                      revision:
                        type: string
                      created_at:
                        type: string
                      updated_at:
                        type: string
                      last_used_at:
                        type:
                          - string
                          - 'null'
                      revoked_at:
                        type:
                          - string
                          - 'null'
                    required:
                      - id
                      - organization_id
                      - name
                      - description
                      - status
                      - purpose
                      - display_prefix
                      - principal_user_id
                      - trace_project_id
                      - external_id
                      - metadata
                      - scopes
                      - routing_policy_id
                      - routing_mode
                      - revision
                      - created_at
                      - updated_at
                      - last_used_at
                      - revoked_at
                required:
                  - virtual_key
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                      code:
                        type: string
                      message:
                        type: string
                      meta:
                        type: object
                        additionalProperties: {}
                      trace_id:
                        type: string
                      span_id:
                        type: string
                    required:
                      - type
                      - code
                      - message
                required:
                  - error
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                      code:
                        type: string
                      message:
                        type: string
                      meta:
                        type: object
                        additionalProperties: {}
                      trace_id:
                        type: string
                      span_id:
                        type: string
                    required:
                      - type
                      - code
                      - message
                required:
                  - error
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                      code:
                        type: string
                      message:
                        type: string
                      meta:
                        type: object
                        additionalProperties: {}
                      trace_id:
                        type: string
                      span_id:
                        type: string
                    required:
                      - type
                      - code
                      - message
                required:
                  - error
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                      code:
                        type: string
                      message:
                        type: string
                      meta:
                        type: object
                        additionalProperties: {}
                      trace_id:
                        type: string
                      span_id:
                        type: string
                    required:
                      - type
                      - code
                      - message
                required:
                  - error
components:
  securitySchemes:
    project_api_key:
      type: apiKey
      in: header
      name: X-Auth-Token
      description: >-
        Project API key for sending traces and accessing project-scoped
        resources. Format: sk-lw-... (no underscore). Obtain one by creating a
        project via the Admin API or the LangWatch UI.

````