Skip to content

Session

Sessions are timed focus blocks that users create, join, and complete. They support scheduling, recurrence, website blocking, and notification snoozing.

Base URL: https://api.deepworkzone.aiAuth: Authorization: Bearer YOUR_MULTIPLAI_ACCESS_TOKEN

Session Ownership

The created_by field and session ownership are automatically derived from the currently authenticated user resolved from the Multiplai access token. You do not need to pass an owner or creator field when creating sessions.


List Sessions

http
GET /api/v1/sessions

Returns a list of sessions for the authenticated user's organization, filtered by the provided query parameters.

ParameterTypeDescription
org_idnumberOrganization ID to scope the results
channelstringFilter by visibility: public or private
typestringFilter by type: drop-in or standard
datestringFilter by date (YYYY-MM-DD)
completed0|1Filter completed sessions (0 = active, 1 = done)
sourcestringScope: user or organization
keywordstringSearch by session name
day_startstringStart of date range filter
day_endsstringEnd of date range filter

Get Session

http
GET /api/v1/sessions/:id

Retrieves a single session by its ID, along with the authenticated user's participation metadata.

ParameterTypeDescription
idnumberThe session ID

Create Session

http
POST /api/v1/sessions

Creates a new focus session.

json
{
  "org_id": 1,
  "name": "Morning Deep Work",
  "type": "drop-in",
  "duration": 60,
  "schedule": "2025-01-01",
  "time": "9:00 AM",
  "is_public": true,
  "collaborator": [],
  "status": "waiting",
  "website_blocker_enabled": true,
  "website_blocker": {
    "mode": "preset",
    "category": ["social-media", "gaming"],
    "urls": []
  },
  "snooze_enabled": true,
  "snooze_apps": {
    "slack": true,
    "teams": true
  },
  "is_recurring": 0,
  "recurring_ends": null,
  "recurring_start": null,
  "occurrence": "daily",
  "recurring_days": [],
  "recurring_month_option": "exact",
  "recurring_month_week_pos": 1,
  "recurring_month_week_day": 1,
  "fallback_option": 0
}

Update Session

http
PUT /api/v1/sessions/:id

Updates an existing session. Accepts the same fields as Create Session.

ParameterTypeDescription
idnumberThe session ID

Delete Session

http
DELETE /api/v1/sessions/:id

Deletes a session. For recurring sessions, you can choose to delete only the current occurrence or the entire series.

ParameterTypeDescription
idnumberThe session ID

Built with VitePress