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

# Create Game Report

> Create a ticket from an in-game player report

<Warning>
  **Requires Premium or Enterprise subscription**
</Warning>

## Overview

Create a ticket from an in-game player report. Used by game servers to report players directly to the tickets system.

**Important Notes:**

* Game reports are marked with `GameReport: true`
* Includes `GameData` with place and server information
* Discord notifications include a special game report indicator
* Cannot receive staff replies (game reports are view-only)
* `authorAvatarUrl` is required

## Request Body

<ParamField body="subject" type="string" required>
  Report subject
</ParamField>

<ParamField body="category" type="string" required>
  Category ID
</ParamField>

<ParamField body="message" type="string" required>
  Report details
</ParamField>

<ParamField body="priority" type="string">
  Priority level: `low`, `medium`, `high`, `urgent` (default: `medium`)
</ParamField>

<ParamField body="authorUserId" type="integer" required>
  Reporter's UserId
</ParamField>

<ParamField body="authorUsername" type="string">
  Reporter's username
</ParamField>

<ParamField body="authorDisplayName" type="string">
  Reporter's display name
</ParamField>

<ParamField body="authorAvatarUrl" type="string" required>
  Reporter's avatar URL
</ParamField>

<ParamField body="placeId" type="string" required>
  Place ID where the report originated
</ParamField>

<ParamField body="serverId" type="string">
  Server ID where the report originated (optional)
</ParamField>

## Response

<ResponseField name="success" type="boolean">
  Whether the request was successful
</ResponseField>

<ResponseField name="data" type="object">
  <Expandable title="properties">
    <ResponseField name="TicketId" type="string">
      The generated ticket ID
    </ResponseField>

    <ResponseField name="_id" type="string">
      MongoDB document ID
    </ResponseField>

    <ResponseField name="WorkspaceId" type="string">
      The workspace ID
    </ResponseField>

    <ResponseField name="Subject" type="string">
      Ticket subject
    </ResponseField>

    <ResponseField name="Category" type="string">
      Category ID
    </ResponseField>

    <ResponseField name="Department" type="string">
      Assigned department ID
    </ResponseField>

    <ResponseField name="Status" type="string">
      Ticket status (always "open" for new tickets)
    </ResponseField>

    <ResponseField name="Priority" type="string">
      Ticket priority
    </ResponseField>

    <ResponseField name="Author" type="object">
      Author information
    </ResponseField>

    <ResponseField name="GameReport" type="boolean">
      Always true for game reports
    </ResponseField>

    <ResponseField name="GameData" type="object">
      PlaceId and ServerId information
    </ResponseField>

    <ResponseField name="CreatedAt" type="string">
      Creation timestamp
    </ResponseField>

    <ResponseField name="UpdatedAt" type="string">
      Last update timestamp
    </ResponseField>
  </Expandable>
</ResponseField>

## Example

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.series.hr/tickets/create-game-report \
    -H "apikey: YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "subject": "Rule violation report",
      "category": "reports",
      "message": "Player was exploiting",
      "priority": "high",
      "authorUserId": 123456789,
      "authorUsername": "reporter123",
      "authorDisplayName": "Reporter Name",
      "authorAvatarUrl": "https://tr.rbxcdn.com/avatar-url",
      "placeId": "123456789",
      "serverId": "game-server-id-123"
    }'
  ```

  ```typescript TypeScript theme={null}
  const response = await fetch('https://api.series.hr/tickets/create-game-report', {
    method: 'POST',
    headers: {
      'apikey': 'YOUR_API_KEY',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      subject: 'Rule violation report',
      category: 'reports',
      message: 'Player was exploiting',
      priority: 'high',
      authorUserId: 123456789,
      authorUsername: 'reporter123',
      authorDisplayName: 'Reporter Name',
      authorAvatarUrl: 'https://tr.rbxcdn.com/avatar-url',
      placeId: '123456789',
      serverId: 'game-server-id-123'
    })
  });

  const data = await response.json();
  ```

  ```lua Lua (Roblox) theme={null}
  local HttpService = game:GetService("HttpService")

  local response = HttpService:RequestAsync({
      Url = "https://api.series.hr/tickets/create-game-report",
      Method = "POST",
      Headers = {
          ["apikey"] = "YOUR_API_KEY",
          ["Content-Type"] = "application/json"
      },
      Body = HttpService:JSONEncode({
          subject = "Rule violation report",
          category = "reports",
          message = "Player was exploiting",
          priority = "high",
          authorUserId = 123456789,
          authorUsername = "reporter123",
          authorDisplayName = "Reporter Name",
          authorAvatarUrl = "https://tr.rbxcdn.com/avatar-url",
          placeId = "123456789",
          serverId = "game-server-id-123"
      })
  })

  local data = HttpService:JSONDecode(response.Body)
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      'https://api.series.hr/tickets/create-game-report',
      headers={
          'apikey': 'YOUR_API_KEY',
          'Content-Type': 'application/json'
      },
      json={
          'subject': 'Rule violation report',
          'category': 'reports',
          'message': 'Player was exploiting',
          'priority': 'high',
          'authorUserId': 123456789,
          'authorUsername': 'reporter123',
          'authorDisplayName': 'Reporter Name',
          'authorAvatarUrl': 'https://tr.rbxcdn.com/avatar-url',
          'placeId': '123456789',
          'serverId': 'game-server-id-123'
      }
  )

  data = response.json()
  ```
</CodeGroup>

## Response Example

```json theme={null}
{
  "success": true,
  "data": {
    "TicketId": "TICKET-1234567890-ABCD",
    "_id": "...",
    "WorkspaceId": "a7d5339a-5531-4336-99c6-6f3249c9ac20",
    "Subject": "Rule violation report",
    "Category": "reports",
    "Department": "moderation-dept",
    "Status": "open",
    "Priority": "high",
    "Author": {
      "UserId": 123456789,
      "Username": "reporter123",
      "DisplayName": "Reporter Name",
      "AvatarUrl": "https://..."
    },
    "GameReport": true,
    "GameData": {
      "PlaceId": 123456789,
      "ServerId": "game-server-id-123"
    },
    "CreatedAt": "2025-01-15T10:30:00.000Z",
    "UpdatedAt": "2025-01-15T10:30:00.000Z"
  }
}
```

## Error Responses

<AccordionGroup>
  <Accordion title="400 - Validation Error">
    ```json theme={null}
    {
      "success": false,
      "error": {
        "code": 400,
        "message": "Validation error: Subject is required"
      }
    }
    ```
  </Accordion>

  <Accordion title="403 - Premium Required">
    ```json theme={null}
    {
      "success": false,
      "error": {
        "code": 403,
        "message": "Tickets module requires a Premium or Enterprise subscription"
      }
    }
    ```
  </Accordion>

  <Accordion title="403 - Module Not Enabled">
    ```json theme={null}
    {
      "success": false,
      "error": {
        "code": 403,
        "message": "Tickets module is not enabled for this workspace"
      }
    }
    ```
  </Accordion>
</AccordionGroup>

## Rate Limit

**25 requests per second** per API key


## OpenAPI

````yaml POST /tickets/create-game-report
openapi: 3.0.0
info:
  title: Series API
  version: 1.0.0
  description: >-
    Series API — a free REST API by Sailboat Games, LLC that lets Roblox
    communities programmatically manage workspaces, staff, sessions, time-off
    and activity data.
  contact:
    name: Sailboat Games, LLC.
    email: admin@sailboatgames.com
servers:
  - url: https://api.series.hr
    description: Production API
security:
  - ApiKeyAuth: []
paths:
  /tickets/create-game-report:
    post:
      tags:
        - Tickets
      summary: Create game report
      description: >-
        Create a ticket from an in-game player report. Requires Premium or
        Enterprise subscription.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - subject
                - category
                - message
                - authorUserId
                - authorAvatarUrl
                - placeId
              properties:
                subject:
                  type: string
                  description: Report subject
                category:
                  type: string
                  description: Category ID
                message:
                  type: string
                  description: Report details
                priority:
                  type: string
                  enum:
                    - low
                    - medium
                    - high
                    - urgent
                  default: medium
                authorUserId:
                  type: integer
                  description: Reporter's UserId
                authorUsername:
                  type: string
                  description: Reporter's username
                authorDisplayName:
                  type: string
                  description: Reporter's display name
                authorAvatarUrl:
                  type: string
                  description: Avatar URL of the reporter
                placeId:
                  type: string
                  description: Place ID where the report originated
                serverId:
                  type: string
                  description: Server ID where the report originated
      responses:
        '201':
          description: Game report ticket created successfully
        '400':
          description: Invalid request body
        '401':
          description: API key is required
        '403':
          description: Tickets module not enabled or Premium required
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: apikey
      description: >-
        Pass your API key in the `apikey` header. Alternatively, the `x-api-key`
        header is also accepted.

````