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

# Add a URL

> Adds a URL for game events. Only a URL that verifies the signature is accepted, and it is enabled right away. A key bound to a server can only subscribe to that server.



## OpenAPI

````yaml en/openapi/en-api-v3-openapi.yaml POST /webhooks/add-url
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:
  /webhooks/add-url:
    post:
      tags:
        - Custom Webhooks
      summary: Add a URL
      description: >-
        Adds a URL for game events. Only a URL that verifies the signature is
        accepted, and it is enabled right away. A key bound to a server can only
        subscribe to that server.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                url:
                  type: string
                serverIds:
                  type: array
                  items:
                    type: string
            example:
              url: https://my-bot.example.com/erlc-events
              serverIds:
                - '12345678'
      responses:
        '201':
          description: The webhook has been successfully registered.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
                  urls:
                    type: array
                    items:
                      type: object
                      properties:
                        url:
                          type: string
                        isActive:
                          type: boolean
                        serverIds:
                          type: array
                          items:
                            type: string
                  is_active:
                    type: boolean
                  discord_id:
                    type: string
              example:
                success: true
                message: Webhook URL added successfully
                urls:
                  - url: https://my-bot.example.com/erlc-events
                    isActive: true
                    serverIds:
                      - '12345678'
                is_active: true
                discord_id: '123456789012345678'
        '400':
          description: >-
            The URL failed the check: it must answer 2xx to a correctly signed
            request and 4xx to a forged one. The reason is in `reason`, the URL
            answer in `status`.
          content:
            application/json:
              example:
                code: 5051
                message: Webhook Verification Failed
                reason: forged_accepted
                status: 200
        '403':
          description: It is prohibited to bind a webhook to this server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: >-
                      Вам запрещено привязывать вебхук к серверу '999999'.
                      Разрешенный сервер для вашего ключа '12345678'
                  forbidden_server_id:
                    type: string
                    example: '999999'
                  allowed_server_id:
                    type: string
                    example: '12345678'
      security:
        - ApiKeyHeader: []
components:
  securitySchemes:
    ApiKeyHeader:
      type: apiKey
      in: header
      name: erlcrussia-api-key
      description: >-
        Custom API key. Store on the server; do not include client-side
        JavaScript.

````

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