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

# Get anon key

> Admin-only endpoint to retrieve the project's opaque anon key (`anon_...`). The anon key is a non-secret client identifier that maps requests to the `anon` role - safe to embed in frontend bundles; row level security is the security boundary. Rotatable via POST /api/secrets/anon-key/rotate.



## OpenAPI

````yaml https://raw.githubusercontent.com/InsForge/InsForge/main/openapi/metadata.yaml get /api/metadata/anon-key
openapi: 3.0.3
info:
  title: Insforge Metadata API
  version: 1.0.0
servers: []
security: []
paths:
  /api/metadata/anon-key:
    get:
      tags:
        - Admin
      summary: Get anon key
      description: >-
        Admin-only endpoint to retrieve the project's opaque anon key
        (`anon_...`). The anon key is a non-secret client identifier that maps
        requests to the `anon` role - safe to embed in frontend bundles; row
        level security is the security boundary. Rotatable via POST
        /api/secrets/anon-key/rotate.
      responses:
        '200':
          description: Anon key
          content:
            application/json:
              schema:
                type: object
                properties:
                  anonKey:
                    type: string
              example:
                anonKey: >-
                  anon_1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcd
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Anon key not initialized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    ErrorResponse:
      type: object
      required:
        - error
        - message
        - statusCode
      properties:
        error:
          type: string
          description: Error code for programmatic handling
        message:
          type: string
          description: Human-readable error message
        statusCode:
          type: integer
          description: HTTP status code
        nextAction:
          type: string
          description: Suggested action to resolve the error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````