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

> Create a new session

Create a new session with optional scheduling and duration parameters.

## Request

```bash theme={null}
curl -X POST https://api.series.hr/sessions/create \
  -H "apikey: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "Title": "Training Session",
    "Host": "714760171",
    "Scheduled": "2024-01-20T15:00:00Z",
    "Duration": 60,
    "CustomRoles": [
      {
        "name": "Trainer",
        "slots": 2,
        "minRank": 50,
        "permissions": {
          "ChangeSessionStatus": false,
          "PassOrFailAttendees": true,
          "ModifyAttendance": true
        }
      }
    ]
  }'
```

## Parameters

<ParamField body="Title" type="string" required>
  Session title
</ParamField>

<ParamField body="Scheduled" type="string" required>
  ISO 8601 scheduled start time
</ParamField>

<ParamField body="Duration" type="integer" required>
  Session duration in minutes (must be a positive integer)
</ParamField>

<ParamField body="Host" type="string">
  Roblox user ID of the host (optional, must be a workspace member)
</ParamField>

<ParamField body="Description" type="string">
  Detailed session description (optional)
</ParamField>

<ParamField body="CoHost" type="string">
  Roblox user ID of the co-host (optional)
</ParamField>

<ParamField body="Supervisor" type="string">
  Roblox user ID of the supervisor (optional)
</ParamField>

<ParamField body="Claimable" type="boolean">
  Whether users can claim attendance (default: false)
</ParamField>

<ParamField body="CustomRoles" type="array">
  Array of custom role definitions **(Premium/Enterprise only)**. Each role object has:

  * `name` (string, required): Role name (must be unique, cannot be "Host", "CoHost", or "Supervisor")
  * `slots` (integer, required): Number of slots (1-10)
  * `minRank` (integer, optional): Minimum rank requirement (default: 0)
  * `permissions` (object, optional): Role permissions
    * `ChangeSessionStatus` (boolean): Can start/delay/cancel/end the session
    * `PassOrFailAttendees` (boolean): Can mark attendees as passed/failed
    * `ModifyAttendance` (boolean): Can manage the attendance list
</ParamField>

## Response

<ResponseField status={201} name="201">
  ```json theme={null}
  {
    "success": true,
    "data": {
      "sessionId": "session_abc123",
      "Title": "Training Session",
      "Host": "714760171",
      "Scheduled": "2024-01-20T15:00:00Z",
      "Duration": 3600,
      "createdAt": "2024-01-15T10:30:00Z"
    }
  }
  ```
</ResponseField>


## OpenAPI

````yaml POST /sessions/create
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/create:
    post:
      tags:
        - Sessions
      summary: Create Session
      description: Create a new session for tracking activity and attendance.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - Title
                - Scheduled
                - Duration
              properties:
                Title:
                  type: string
                  description: Session title
                  example: Training Session
                Description:
                  type: string
                  description: Detailed session description
                Host:
                  type: string
                  description: >-
                    Roblox user ID of the host (optional, must be a workspace
                    member)
                  example: '714760171'
                CoHost:
                  type: string
                  description: Roblox user ID of co-host (optional)
                Supervisor:
                  type: string
                  description: Roblox user ID of supervisor (optional)
                Scheduled:
                  type: string
                  format: date-time
                  description: Session start time in ISO 8601 format
                Duration:
                  type: integer
                  minimum: 1
                  description: Duration in minutes (positive integer)
                Claimable:
                  type: boolean
                  description: 'Whether users can claim attendance (default: false)'
                CustomRoles:
                  type: array
                  description: Custom role definitions (Premium/Enterprise only)
                  items:
                    type: object
                    required:
                      - name
                      - slots
                    properties:
                      name:
                        type: string
                        description: >-
                          Role name (must be unique, cannot be
                          Host/CoHost/Supervisor)
                      slots:
                        type: integer
                        minimum: 1
                        maximum: 10
                        description: Number of slots for this role
                      minRank:
                        type: integer
                        minimum: 0
                        description: Minimum rank requirement
                      permissions:
                        type: object
                        properties:
                          ChangeSessionStatus:
                            type: boolean
                          PassOrFailAttendees:
                            type: boolean
                          ModifyAttendance:
                            type: boolean
      responses:
        '200':
          description: Session created
        '400':
          description: Validation error
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.

````