---
title: "Start a class focus session and invite every enrolled student"
method: POST
path: "/class-management/sessions"
tags: ["class-management"]
---

# Start a class focus session and invite every enrolled student

`POST /class-management/sessions`

## Request

- Base URL: `https://api.focusbear.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.focusbear.io/class-management/sessions`
- Auth: HTTP bearer

## Request body

- StartClassSessionDto
  - `name` string
  - `allowed_apps` string[]
  - `allowed_urls` string[]
  - `app_identities` AppIdentityDto[]: Platform identities for `allowed_apps` entries, keyed by `entry`. Optional: the server fills in common apps from the catalog, and on amend an omitted list keeps the stored identities.
    - `entry` string, required: The allowed_apps value this identity describes, verbatim
    - `name` string
    - `common_app_id` string: Id of the GET /common-apps entry this app was picked from
    - `mac_bundle_id` string
    - `windows_identity` WindowsAppIdentityDto
      - `exe` string, required
      - `exes` string[]: Every executable the app ships as, exe included, when it has more than one
      - `publisher` string: Authenticode signer organisation
  - `team_id` string, uuid, required
  - `timezone` string: Client-asserted IANA timezone for the session-window check. Ambiguous UTC/GMT aliases remain valid input but defer to the stored timezone. This request-scoped value is not persisted.
  - `focus_mode_id` string, uuid: Start from an existing shared focus mode (its allow-list is snapshotted into the session). When omitted, allowed_apps/allowed_urls are required and a team-shared focus mode (team_id = class) is created and linked for reuse.
  - `block_level` 'gentle' | 'strict' | 'super-strict'
  - `ai_blocking_enabled` boolean: When true, student apps run their (slow) AI relevance check before blocking a non-listed site; when false/omitted they block immediately (defaults false — Mac-App#2092).
  - `ai_contest_enabled` boolean: Whether a student may explain an AI block and have the server re-run the AI (defaults true; only meaningful when `ai_blocking_enabled` is on).
  - `block_bypass_sites` boolean: Whether students' apps block Focus Bear's bypass-site list during the class (defaults true).
  - `scheduled_finish_time` string, date-time
  - `tasks` SessionTaskDto[]: Optional teacher-assigned checklist shown to every invited student (capped, snapshotted).
    - `title` string, required
    - `duration_minutes` number
    - `order` number

## Response `201`

- object

---

[API](https://skmtc.dev/focusbear/apis/focusbear-api.md) - [All operations](https://skmtc.dev/focusbear/apis/focusbear-api/llms.txt) - [OpenAPI document](https://skmtc.dev/focusbear/apis/focusbear-api/revisions/3a83a3b9a811?raw)
