> ## 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.

# Le mie chiavi

> Le tue chiavi API e WebSocket. Passa `api=true` e/o `websocket=true`; `restrictions=true` aggiunge i permessi.

Endpoint universale per ottenere un elenco di token (`API` e `WebSocket`) e i relativi diritti/restrizioni.

### Autorizzazione

L'intestazione `erlcrussia-api-key` **non è strettamente necessaria** se si utilizza una chiave WebSocket. Puoi passare:

* `erlcrussia-api-key` - per l'autorizzazione e il funzionamento con chiavi API HTTP (`?api=true`).
* `erlcrussia-websocket-key` - per l'autorizzazione e il funzionamento con le chiavi WebSocket (`?websocket=true`).
* O entrambe le rubriche contemporaneamente.

### Parametri della query

| Parametro | Digitare | Descrizione |
| :- | :- | :- |
| `api` | `boolean` | Richiedi chiavi API HTTP (`true`). |
| `websocket` | `boolean` | Richiedi chiavi WebSocket (`true`). |
| `restrictions` | `boolean` | Abilita le restrizioni per il tipo di chiave precedente (`true`). |

> [!TIP]
>
> Il parametro `restrictions=true` è associato al parametro di tipo precedente. Ad esempio:
>
> * `?api=true&restrictions=true` - restituirà le chiavi API con le relative restrizioni.
> * `?api=true&websocket=true&restrictions=true`: restituirà le chiavi API senza restrizioni e le chiavi WebSocket con restrizioni.
> * `?api=true&restrictions=true&websocket=true&restrictions=true` - restituirà entrambi i tipi di chiavi con restrizioni.

Il segreto completo viene restituito solo alla creazione o rotazione. Gli elenchi delle chiavi IA, la rinomina e l’eliminazione restituiscono una maschera. GET /keys rivela solo la chiave chiamante; le altre, anche proprie, sono mascherate. teamId è l’ID del team associato o null.


## OpenAPI

````yaml it/openapi/it-api-v3-openapi.yaml GET /keys
openapi: 3.1.0
info:
  title: ER:LC Russia API V3
  description: >-
    API ER:LC Russia per server, utenti, CDN, reindirizzamenti, abbonamenti e
    chiavi di accesso.
  version: 3.0.0
servers:
  - url: https://api.erlcrussia.com/v3
    description: Server di produzione (com)
  - url: https://api.erlcrussia.xyz/v3
    description: Server di backup (xyz)
security: []
tags:
  - name: ER:Server LC
    description: Ottenere status, online, elenchi di giocatori e staff del server ER:LC.
  - name: 'ER: Squadre LC'
    description: >-
      Invio e accodamento di comandi del server di gioco (:h, :m, :kick, :ban,
      ecc.).
  - name: Economia
    description: >-
      Interazione con il sistema economico (utenti, imprese, mafie, negozi,
      pubblicità).
  - name: API statistiche
    description: >-
      Statistiche di acquisizione ad alte prestazioni dei server Discord e dei
      server di gioco (online, partecipanti, bot).
  - name: API di verifica
    description: Ricerca e confronto di account Discord ID e Roblox ID.
  - name: Risorse CDN
    description: >-
      Carica, gestisci, esegui statistiche e cancella la cache dei file di
      archiviazione di oggetti CDN MinIO/Edge.
  - name: Cartelle CDN
    description: >-
      Struttura gerarchica e ordinamento delle cartelle della libreria
      multimediale CDN.
  - name: API di punizione
    description: >-
      Gestisci il saldo e la cronologia delle transazioni dei punti dei
      giocatori.
  - name: API degli abbonamenti
    description: >-
      Catalogo dei piani, ordini FunPay, maturazione dei vantaggi e attivazione
      degli abbonamenti.
  - name: API di autorizzazione
    description: >-
      Accedi tramite Discord e Roblox OAuth2, gestisci le sessioni utente e
      collega gli account.
  - name: 'API di gestione: chiavi WebSocket'
    description: >-
      Gestione delle chiavi di accesso al gateway WebSocket e agli abbonamenti
      ai canali.
  - name: 'API di gestione: webhook'
    description: >-
      Registrazione, convalida dell'accessibilità e monitoraggio dei webhook
      personalizzati.
  - name: API di controllo - Pannello
    description: >-
      Gestione utenti, abbonamenti, tariffe, saldo manuale e statistiche di
      sistema.
  - name: API di stato
    description: >-
      Monitoraggio delle prestazioni del servizio, connessioni a PostgreSQL e
      Redis.
  - name: AI Audio
  - name: AI Studio
  - name: 'API di amministrazione: server'
  - name: API di gestione - Server
  - name: 'API di gestione: token'
  - name: Amministrazione AI
  - name: Amministrazione delle monete elettroniche
  - name: CDN
  - name: CDN V3
  - name: Chiavi API
  - name: Domini CDN
  - name: File privati e libreria
  - name: L'organizzazione reindirizza la V3
  - name: Webhook personalizzati
  - name: Рекламные кампании V3
paths:
  /keys:
    get:
      tags:
        - Chiavi API
      summary: Le mie chiavi
      description: >-
        Le tue chiavi API e WebSocket. Passa `api=true` e/o `websocket=true`;
        `restrictions=true` aggiunge i permessi.


        Il segreto completo viene restituito solo alla creazione o rotazione.
        Gli elenchi delle chiavi IA, la rinomina e l’eliminazione restituiscono
        una maschera. GET /keys rivela solo la chiave chiamante; le altre, anche
        proprie, sono mascherate. teamId è l’ID del team associato o 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: >-
            Elenco delle chiavi richieste (array o oggetto quando si richiedono
            API e websocket contemporaneamente).
          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: 'Richiesta errata (400): parametri di richiesta non validi.'
      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: 'Non autorizzato (401): il token API manca o non è valido.'
      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: 'Errore interno del server (500): errore interno del server.'
      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: Codice errore numerico ER:LC Russia API.
        message:
          type: string
          example: Forbidden
          description: Messaggio di errore di sistema in inglese.
  securitySchemes:
    ApiKeyHeader:
      type: apiKey
      in: header
      name: erlcrussia-api-key
      description: >-
        Chiave API personalizzata. Memorizzare sul server; non includere
        JavaScript lato client.
    WebSocketKeyHeader:
      type: apiKey
      in: header
      name: erlcrussia-websocket-key
      description: Intestazione della chiave WebSocket singola erlcrussia-websocket-key.

````

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