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

# My keys

> Your API and WebSocket keys. Pass `api=true` and/or `websocket=true`; `restrictions=true` adds permissions.

Universal endpoint for obtaining a list of tokens (`API` and `WebSocket`) and their rights/restrictions.

### Authorization

The `erlcrussia-api-key` header is **not strictly required** if you are using a WebSocket key. You can pass:

* `erlcrussia-api-key` - for authorization and working with HTTP API keys (`?api=true`).
* `erlcrussia-websocket-key` - for authorization and working with WebSocket keys (`?websocket=true`).
* Or both headings at the same time.

### Query parameters

| Parameter | Type | Description |
| :- | :- | :- |
| `api` | `boolean` | Request HTTP API keys (`true`). |
| `websocket` | `boolean` | Request WebSocket keys (`true`). |
| `restrictions` | `boolean` | Enable restrictions for the previous key type (`true`). |

> [!TIP]
>
> The `restrictions=true` parameter is bound to the preceding type parameter. For example:
>
> * `?api=true&restrictions=true` - will return API keys with their restrictions.
> * `?api=true&websocket=true&restrictions=true` - will return API keys without restrictions and WebSocket keys with restrictions.
> * `?api=true&restrictions=true&websocket=true&restrictions=true` - will return both types of keys with restrictions.

The full secret is returned only on creation or rotation. AI key lists, renaming and deletion return a masked token. GET /keys reveals only the calling key; all sibling keys, including your own, are masked. teamId is the bound team ID or null.


## OpenAPI

````yaml en/openapi/en-api-v3-openapi.yaml GET /keys
openapi: 3.1.0
info:
  title: ER:LC Russia API V3
  description: >-
    ER:LC Russia API for servers, users, CDN, redirects, subscriptions, and
    access keys.
  version: 3.0.0
servers:
  - url: https://api.erlcrussia.com/v3
    description: Production server (com)
  - url: https://api.erlcrussia.xyz/v3
    description: Backup server (xyz)
security: []
tags:
  - name: ER:LC Server
    description: Obtaining status, online, lists of players and staff of the ER:LC server.
  - name: ER:LC Teams
    description: Sending and queuing in-game server commands (:h, :m, :kick, :ban, etc.).
  - name: Economics
    description: >-
      Interaction with the economic system (users, businesses, mafias, stores,
      advertising).
  - name: Statistics API
    description: >-
      High-performance obtaining statistics of discord servers and game servers
      (online, participants, bots).
  - name: Verification API
    description: Search and comparison of Discord ID and Roblox ID accounts.
  - name: CDN Assets
    description: >-
      Load, manage, statistic and clear MinIO/Edge CDN object storage file
      cache.
  - name: CDN Folders
    description: Hierarchical structure and sorting of CDN media library folders.
  - name: Punishment API
    description: Manage the balance and transaction history of players' points.
  - name: Subscriptions API
    description: >-
      Catalog of plans, FunPay orders, accrual of benefits and activation of
      subscriptions.
  - name: Authorization API
    description: >-
      Login via Discord and Roblox OAuth2, manage user sessions and link
      accounts.
  - name: Management API - WebSocket Keys
    description: Managing access keys to the WebSocket gateway and channel subscriptions.
  - name: Management API - Webhooks
    description: Registration, accessibility validation and monitoring of custom webhooks.
  - name: Control API - Panel
    description: >-
      Management of users, subscriptions, tariffs, manual balance and system
      statistics.
  - name: State API
    description: >-
      Monitoring the performance of the service, connections to PostgreSQL and
      Redis.
  - name: AI Audio
  - name: AI Studio
  - name: AI administration
  - name: API Keys
  - name: Admin API - Servers
  - name: Administration of E-Coins
  - name: CDN
  - name: CDN Domains
  - name: CDN V3
  - name: Custom Webhooks
  - name: Management API - Servers
  - name: Management API - Tokens
  - name: Organization redirects V3
  - name: Private files and library
  - name: Рекламные кампании V3
paths:
  /keys:
    get:
      tags:
        - API Keys
      summary: My keys
      description: >-
        Your API and WebSocket keys. Pass `api=true` and/or `websocket=true`;
        `restrictions=true` adds permissions.


        The full secret is returned only on creation or rotation. AI key lists,
        renaming and deletion return a masked token. GET /keys reveals only the
        calling key; all sibling keys, including your own, are masked. teamId is
        the bound team ID or null.
      parameters:
        - name: api
          in: query
          description: Запросить список HTTP API токенов
          schema:
            type: boolean
          example: true
        - name: websocket
          in: query
          description: Запросить список WebSocket токенов
          schema:
            type: boolean
          example: true
        - name: restrictions
          in: query
          description: Включить ограничения прав (указывается после api или websocket)
          schema:
            type: boolean
          example: true
      responses:
        '200':
          description: >-
            List of requested keys (array or object when requesting api and
            websocket simultaneously).
          content:
            application/json:
              schema:
                type: object
                properties:
                  api:
                    type: array
                    items:
                      type: object
                      properties:
                        teamId:
                          type: string
                        id:
                          type: string
                        key:
                          type: string
                        apiKey:
                          type: string
                        userId:
                          type: string
                        serverId:
                          type: string
                        isActive:
                          type: boolean
                        createdAt:
                          type: string
                          format: date-time
                        restrictions:
                          type: object
                          properties:
                            endpoints:
                              type: array
                              items:
                                type: string
                            versions:
                              type: array
                              items:
                                type: string
                            queryParams:
                              type: array
                              items:
                                type: string
                            actions:
                              type: array
                              items: {}
                  websocket:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        key:
                          type: string
                        apiKey:
                          type: string
                        userId:
                          type: string
                        serverId:
                          type: string
                        isActive:
                          type: boolean
                        createdAt:
                          type: string
                          format: date-time
                        restrictions:
                          type: object
                          properties:
                            channels:
                              type: array
                              items:
                                type: string
                            blockedIPs:
                              type: array
                              items: {}
              example:
                api:
                  - teamId: team_7f3a
                    id: '15'
                    key: a8Fk2LmQ9zXc7VbN3sDf6GhJ1kLp0QwErTyUiOpAsDfGhJkL
                    apiKey: a8Fk2LmQ9zXc7VbN3sDf6GhJ1kLp0QwErTyUiOpAsDfGhJkL
                    userId: '123456789012345678'
                    serverId: '12345678'
                    isActive: true
                    createdAt: '2026-10-21T12:00:00Z'
                    restrictions:
                      endpoints:
                        - erlc.server
                      versions:
                        - v3
                      queryParams:
                        - query:Players
                      actions: []
                websocket:
                  - id: '4'
                    key: ws_K3j...hJkL
                    apiKey: ws_K3j...hJkL
                    userId: '123456789012345678'
                    serverId: '12345678'
                    isActive: true
                    createdAt: '2026-10-21T12:00:00Z'
                    restrictions:
                      channels:
                        - players
                      blockedIPs: []
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - ApiKeyHeader: []
        - WebSocketKeyHeader: []
        - ApiKeyHeader: []
          WebSocketKeyHeader: []
components:
  responses:
    BadRequestError:
      description: Bad Request (400) - invalid request parameters.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            missing_params:
              summary: Missing Parameters (5002)
              value:
                code: 5002
                message: Missing Parameters
            invalid_json:
              summary: Invalid JSON (5034)
              value:
                code: 5034
                message: Invalid Json
            invalid_param:
              summary: Invalid Param Name (5004)
              value:
                code: 5004
                message: Invalid Param Name
    UnauthorizedError:
      description: Unauthorized (401) — the API token is missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            missing_token:
              summary: Missing Token (5007)
              value:
                code: 5007
                message: Missing Token
            invalid_token:
              summary: Invalid Token (5008)
              value:
                code: 5008
                message: Invalid Token
    InternalServerError:
      description: Internal Server Error (500) - internal server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            internal:
              summary: Internal Error (5017)
              value:
                code: 5017
                message: Internal Error
  schemas:
    ErrorResponse:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: integer
          example: 5009
          description: Numeric error code ER:LC Russia API.
        message:
          type: string
          example: Forbidden
          description: System error message in English.
  securitySchemes:
    ApiKeyHeader:
      type: apiKey
      in: header
      name: erlcrussia-api-key
      description: >-
        Custom API key. Store on the server; do not include client-side
        JavaScript.
    WebSocketKeyHeader:
      type: apiKey
      in: header
      name: erlcrussia-websocket-key
      description: Single WebSocket key header erlcrussia-websocket-key.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.