Skip to main content
POST
End a session

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Content session ID

environmentId
string
required

Environment ID

projectId
string
required

Project ID

Response

Content session ended

id
string
required
object
enum<string>
required
Available options:
contentSession
answers
object[] | null
required

null = not expanded (pass expand: ["answers"]). Expanded: [] means the session has no question answers; entries appear as the user answers.

completed
boolean
required

Whether the user GENUINELY reached the goal — a flow ran to its end (or an explicit completion step) / every checklist task was checked. Independent of whether the session is still open: a completed checklist can still be showing, and a flow can complete at a mid-flow completion step and keep running. Only flows and checklists can be completed; banners / launchers / resource centers are seen-then-dismissed and are always false.

completedAt
string | null
required

When the goal was reached (null if never completed).

endedAt
string | null
required

When the session closed (null while it is still open/active). A session can be completed but not yet ended (still open), or ended without being completed (dismissed).

endReason
string | null
required

Why the session ended (null while open). Vocabulary — user actions: close_button_dismiss (the X), backdrop_dismiss, dismiss_button, user_closed; authored behavior: action_dismiss (a dismiss action ran), trigger_dismiss, auto_dismissed, end_from_program; displacement: replaced, user_started_other_content, program_started_other_content; health/diagnostic: tooltip_target_missing (the tooltip anchor was never found — the per-session selector-health signal), step_not_found, content_not_found, store_not_found, unpublished_content, session_timeout, system_closed, url_start_closed, launcher_deactivated; admin: admin_ended. Old sessions may carry legacy spellings (e.g. bare action) — treat unknown values as "ended, reason unclassified".

contentId
string
required
content
object | null
required

null until expanded with expand: ["content"] (the content always exists).

createdAt
string<date-time>
required
companyId
string | null
required

null when the session has no company context (user not in a company).

company
object | null
required

null = not expanded (pass expand: ["company"]) OR, after expanding, the session genuinely has no company — check companyId to tell the two apart.

lastActivityAt
string<date-time>
required
progress
number
required

Flow progress percentage, 0-100 (integer). 100 does not imply completed — see completed.

userId
string | null
required
user
object | null
required

null = not expanded (pass expand: ["user"]) OR the user was deleted — check userId.

versionId
string
required
version
object | null
required

null until expanded with expand: ["version"].