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

# Transfer Department

> Transfer a ticket to a different department

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

## Overview

Transfer a ticket to a different department. This automatically unclaims the ticket.

**Important Notes:**

* The ticket is moved to the new department
* The ticket is automatically unclaimed
* System messages are added for transfer and unclaim actions
* The new department must be configured to handle the ticket's category

## Path Parameters

<ParamField path="ticketId" type="string" required>
  Ticket ID
</ParamField>

## Request Body

<ParamField body="departmentId" type="string" required>
  ID of the target department
</ParamField>

<ParamField body="staffUserId" type="integer" required>
  UserId of the staff member transferring the ticket
</ParamField>

## Response

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

<ResponseField name="data" type="object">
  <Expandable title="properties">
    <ResponseField name="message" type="string">
      Success message with department name
    </ResponseField>
  </Expandable>
</ResponseField>

## Example

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://api.series.hr/tickets/TICKET-1234567890-ABCD/transfer" \
    -H "apikey: YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "departmentId": "moderation-dept",
      "staffUserId": 987654321
    }'
  ```

  ```typescript TypeScript theme={null}
  const response = await fetch('https://api.series.hr/tickets/TICKET-1234567890-ABCD/transfer', {
    method: 'POST',
    headers: {
      'apikey': 'YOUR_API_KEY',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      departmentId: 'moderation-dept',
      staffUserId: 987654321
    })
  });

  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/TICKET-1234567890-ABCD/transfer",
      Method = "POST",
      Headers = {
          ["apikey"] = "YOUR_API_KEY",
          ["Content-Type"] = "application/json"
      },
      Body = HttpService:JSONEncode({
          departmentId = "moderation-dept",
          staffUserId = 987654321
      })
  })

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

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

  response = requests.post(
      'https://api.series.hr/tickets/TICKET-1234567890-ABCD/transfer',
      headers={
          'apikey': 'YOUR_API_KEY',
          'Content-Type': 'application/json'
      },
      json={
          'departmentId': 'moderation-dept',
          'staffUserId': 987654321
      }
  )

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

## Response Example

```json theme={null}
{
  "success": true,
  "data": {
    "message": "Ticket transferred to Moderation Department"
  }
}
```

## Error Responses

<AccordionGroup>
  <Accordion title="404 - Department Not Found">
    ```json theme={null}
    {
      "success": false,
      "error": {
        "code": 404,
        "message": "Department not found"
      }
    }
    ```
  </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="404 - Ticket Not Found">
    ```json theme={null}
    {
      "success": false,
      "error": {
        "code": 404,
        "message": "Ticket not found"
      }
    }
    ```
  </Accordion>
</AccordionGroup>

## Rate Limit

**25 requests per second** per API key


## OpenAPI

````yaml POST /tickets/{ticketId}/transfer
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/{ticketId}/transfer:
    post:
      tags:
        - Tickets
      summary: Transfer department
      description: >-
        Transfer a ticket to a different department. Requires Premium or
        Enterprise subscription.
      parameters:
        - name: ticketId
          in: path
          required: true
          schema:
            type: string
          description: Ticket ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - departmentId
                - staffUserId
              properties:
                departmentId:
                  type: string
                  description: ID of the target department
                staffUserId:
                  type: integer
                  description: UserId of the staff member
      responses:
        '200':
          description: Ticket transferred successfully
        '400':
          description: Invalid request
        '401':
          description: API key is required
        '403':
          description: Tickets module not enabled or Premium required
        '404':
          description: Ticket or department not found
      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.

````