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

# List Tickets

> Retrieve a paginated list of tickets with optional filtering

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

## Overview

Retrieve a paginated list of tickets with optional filtering by status, author, department, and search query.

**For staff users:** Use `staffUserId` parameter to filter tickets by your department access permissions.

## Query Parameters

<ParamField query="page" type="integer">
  Page number for pagination (default: 1)
</ParamField>

<ParamField query="status" type="string">
  Filter by status: `open`, `in-progress`, `resolved`, `closed`
</ParamField>

<ParamField query="author" type="string">
  Filter by author UserId
</ParamField>

<ParamField query="department" type="string">
  Filter by department ID
</ParamField>

<ParamField query="search" type="string">
  Search by subject, author username, or display name
</ParamField>

<ParamField query="staffUserId" type="integer">
  UserId for permission filtering (staff only). Filters tickets by department access.
</ParamField>

## Response

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

<ResponseField name="data" type="object">
  <Expandable title="properties">
    <ResponseField name="Tickets" type="array">
      Array of ticket objects
    </ResponseField>

    <ResponseField name="Pagination" type="object">
      Pagination info including CurrentPage, TotalPages, TotalCount, etc.
    </ResponseField>
  </Expandable>
</ResponseField>

## Example

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://api.series.hr/tickets/list?page=1&status=open" \
    -H "apikey: YOUR_API_KEY"
  ```

  ```typescript TypeScript theme={null}
  const response = await fetch('https://api.series.hr/tickets/list?page=1&status=open', {
    headers: {
      'apikey': 'YOUR_API_KEY'
    }
  });

  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/list?page=1&status=open",
      Method = "GET",
      Headers = {
          ["apikey"] = "YOUR_API_KEY"
      }
  })

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

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

  response = requests.get(
      'https://api.series.hr/tickets/list?page=1&status=open',
      headers={'apikey': 'YOUR_API_KEY'}
  )

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

## Response Example

```json theme={null}
{
  "success": true,
  "data": {
    "Tickets": [
      {
        "_id": "...",
        "TicketId": "TICKET-1234567890-ABCD",
        "Subject": "Help with ranking",
        "Category": "support",
        "Department": "support-dept",
        "Status": "open",
        "Priority": "medium",
        "ClaimedBy": 987654321,
        "ClaimedByName": "Staff Member",
        "Author": {
          "UserId": 123456789,
          "Username": "player123",
          "DisplayName": "Player Name",
          "AvatarUrl": "https://..."
        },
        "CreatedAt": "2025-01-15T10:30:00.000Z",
        "UpdatedAt": "2025-01-15T10:30:00.000Z",
        "GameReport": false
      }
    ],
    "Pagination": {
      "CurrentPage": 1,
      "TotalPages": 5,
      "TotalCount": 42,
      "TicketsPerPage": 10,
      "HasNextPage": true,
      "HasPreviousPage": false
    }
  }
}
```

## Error Responses

<AccordionGroup>
  <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 GET /tickets/list
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/list:
    get:
      tags:
        - Tickets
      summary: List tickets
      description: >-
        Retrieve a paginated list of tickets with optional filtering by status,
        author, department, and search query. Requires Premium or Enterprise
        subscription.
      parameters:
        - name: page
          in: query
          schema:
            type: integer
            default: 1
          description: Page number for pagination
        - name: status
          in: query
          schema:
            type: string
            enum:
              - open
              - in-progress
              - resolved
              - closed
          description: Filter by ticket status
        - name: author
          in: query
          schema:
            type: string
          description: Filter by author UserId
        - name: department
          in: query
          schema:
            type: string
          description: Filter by department ID
        - name: search
          in: query
          schema:
            type: string
          description: Search by subject, author username, or display name
        - name: staffUserId
          in: query
          schema:
            type: integer
          description: UserId for permission filtering (staff only)
      responses:
        '200':
          description: Tickets list returned successfully
        '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.

````