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

# Quit Custom Role

> Quit a custom role slot in a session

Quit a custom role that the user currently holds. The slot will be made vacant again for other users to claim. The user must be a workspace member.

<Note>Custom roles are a **Premium/Enterprise** feature. This endpoint will return a 403 error for free-tier workspaces.</Note>

## Request

```bash theme={null}
curl -X PATCH https://api.series.hr/sessions/session_abc123/custom-roles/quit \
  -H "apikey: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "UserId": "714760171",
    "RoleName": "Trainer"
  }'
```

## Parameters

<ParamField path="sessionId" type="string" required>
  The session ID
</ParamField>

<ParamField body="UserId" type="string" required>
  The Roblox user ID of the user quitting the role (must be a workspace member)
</ParamField>

<ParamField body="RoleName" type="string" required>
  The name of the custom role to quit
</ParamField>

## Response

<ResponseField status={200} name="200">
  ```json theme={null}
  {
    "success": true,
    "data": {
      "message": "Successfully quit Trainer position",
      "SessionId": "session_abc123",
      "RoleName": "Trainer",
      "UserId": "714760171"
    }
  }
  ```
</ResponseField>

## Errors

| Status | Description                                                                                 |
| ------ | ------------------------------------------------------------------------------------------- |
| 400    | User is not in this role, user is not a workspace member, or session is completed/cancelled |
| 403    | Premium/Enterprise subscription required                                                    |
| 404    | Session or custom role not found                                                            |


## OpenAPI

````yaml PATCH /sessions/{sessionId}/custom-roles/quit
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:
  /sessions/{sessionId}/custom-roles/quit:
    patch:
      tags:
        - Sessions
      summary: Quit Custom Role
      description: >-
        Quit a custom role slot that the user currently holds. Requires Premium
        or Enterprise subscription.
      parameters:
        - name: sessionId
          in: path
          required: true
          schema:
            type: string
          description: The session ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - UserId
                - RoleName
              properties:
                UserId:
                  type: string
                  description: Roblox user ID of the user quitting the role
                RoleName:
                  type: string
                  description: Name of the custom role to quit
      responses:
        '200':
          description: Custom role quit successfully
        '400':
          description: Validation error (user not in role, session ended, etc.)
        '403':
          description: Premium/Enterprise subscription required
        '404':
          description: Session or role not found
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.

````