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

# Run a command in-game as virtual server management



## OpenAPI

````yaml https://api.erlc.gg/internal/docs/apispec.v2.json post /v2/server/command
openapi: 3.0.1
info:
  title: ER:LC Private Servers API (v2)
  version: 2.0.0
servers:
  - url: https://api.erlc.gg
    description: ER:LC Private Servers API
security: []
paths:
  /v2/server/command:
    post:
      summary: Run a command in-game as virtual server management
      parameters:
        - $ref: '#/components/parameters/AuthorizationHeader'
      requestBody:
        description: Command to be executed
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                command:
                  type: string
                  description: The command to be executed
                  example: ':h Hey everyone!'
      responses:
        '200':
          description: Command executed successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: A message explaining the status of your command
                    example: Success
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: An error message
                    example: Missing command in request body
        '403':
          description: Unauthorized
        '422':
          description: The private server has no players in it
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: An error message
                    example: The private server is currently offline.
                  commandId:
                    type: string
                    description: >-
                      A unique ID assigned to that command execution request,
                      only used when you need to provide it to us for
                      troubleshooting purposes
                    example: ecfd9342-0acd-4485-bf32-e654b4a829fd
        '500':
          description: Problem communicating with Roblox
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: A message explaining the status of your command
                    example: Error communicating with Roblox
                  commandId:
                    type: string
                    description: >-
                      A unique ID assigned to that command execution request,
                      only used when you need to provide it to us for
                      troubleshooting purposes
                    example: ecfd9342-0acd-4485-bf32-e654b4a829fd
      security:
        - ServerKeyAuth: []
components:
  parameters:
    AuthorizationHeader:
      name: Authorization
      in: header
      description: >-
        OPTIONAL. ONLY provide this header if you are creating a public app
        (used in many unique servers). Register your app at
        https://apidocs.erlc.gg/creating-public-applications.
      required: false
      schema:
        type: string
      example: 1b75858cf85cfa6e06ed417c44419fc06f93eab6d69af4eb3f570819a099ddc9e30ad347
  securitySchemes:
    ServerKeyAuth:
      type: apiKey
      in: header
      name: server-key
      description: REQUIRED ON ALL REQUESTS. Get your server key at https://erlc.link/sk

````