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

# Remove From Custom Role

> Remove a user from a custom role slot in a session

Remove a user from a custom role they currently hold. The slot will be made vacant again. This is an administrative action. The target 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/remove \
  -H "apikey: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "TargetUserId": "714760171",
    "RoleName": "Trainer"
  }'
```

## Parameters

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

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

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

## Response

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

## Errors

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


## OpenAPI

````yaml PATCH /sessions/{sessionId}/custom-roles/remove
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/remove:
    patch:
      tags:
        - Sessions
      summary: Remove From Custom Role
      description: >-
        Remove a user from a custom role slot (administrative action). 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:
                - TargetUserId
                - RoleName
              properties:
                TargetUserId:
                  type: string
                  description: Roblox user ID of the user to remove
                RoleName:
                  type: string
                  description: Name of the custom role to remove the user from
      responses:
        '200':
          description: User removed from custom role successfully
        '400':
          description: Validation error (user not in role)
        '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.

````