Single Session

For instructions on how to authenticate to use this endpoint, see API overview.

Endpoints

GET
GET

List all single session summaries

List stored AI-generated session summaries for the team, one row per session (latest summary kept). Use to discover which sessions have been summarized and to filter for sessions with specific problems — has_exceptions=true, outcome=failure, or a custom session_ids narrowing. Returns lightweight rows without the full summary JSON; use the retrieve endpoint for the per-segment / per-action detail.

Required API key scopes

session_recording:read

Query parameters

  • created_by
    string
  • date_from
    string
  • date_to
    string
  • distinct_id
    string
  • has_exceptions
    boolean
  • has_visual_confirmation
    boolean
  • limit
    integer
  • offset
    integer
  • order
    string
    One of: "-created_at""-session_duration""-session_start_time""created_at""session_duration""session_start_time"
  • outcome
    string
    One of: "failure""success""unknown"
  • session_ids
    string

Response


Example request

GET /api/projects/:project_id/single_session_summaries
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/single_session_summaries/

Example response

Status 200
RESPONSE
{
"count": 123,
"next": "http://api.example.org/accounts/?offset=400&limit=100",
"previous": "http://api.example.org/accounts/?offset=200&limit=100",
"results": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"session_id": "string",
"distinct_id": "string",
"session_start_time": "2019-08-24T14:15:22Z",
"session_duration": 0,
"session_outcome": {
"success": true,
"description": "string"
},
"exception_count": 0,
"has_exceptions": true,
"model_used": "string",
"visual_confirmation": true,
"extra_summary_context": {
"focus_area": "string"
},
"created_at": "2019-08-24T14:15:22Z",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
}
}
]
}

Retrieve single session summaries

Get the latest stored AI summary for a single session by session_id. Returns the full summary JSON (segments with named timeline, per-action abandonment / confusion / exception flags, segment outcomes, headline session_outcome, optional sentiment), the exception_event_ids array, the extra_summary_context (e.g. focus_area) used at generation time, and the run_metadata (LLM model used, whether visual confirmation was applied). 404 if no summary has been generated for this session yet — to trigger generation, use the existing session-recording-summarize flow rather than this endpoint.

Required API key scopes

session_recording:read

Path parameters

  • session_id
    string

Response


Example request

GET /api/projects/:project_id/single_session_summaries/:session_id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/single_session_summaries/:session_id/

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"session_id": "string",
"distinct_id": "string",
"session_start_time": "2019-08-24T14:15:22Z",
"session_duration": 0,
"summary": {},
"exception_event_ids": [
"string"
],
"extra_summary_context": {
"focus_area": "string"
},
"run_metadata": {},
"created_at": "2019-08-24T14:15:22Z",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
}
}

Community questions

Questions about this page? or post a community question.