---
title: "List sessions with insights"
method: GET
path: "/v3/enterprise/sessions/insights"
tags: ["sessions"]
---

# List sessions with insights

`GET /v3/enterprise/sessions/insights`

List sessions with detailed insights including message counts,
session size classification, and AI-generated analysis.

## Query parameters

- `after` string, nullable
- `first` integer
- `session_ids` string[], nullable
- `created_after` integer, nullable
- `created_before` integer, nullable
- `updated_after` integer, nullable
- `updated_before` integer, nullable
- `tags` string[], nullable
- `playbook_id` string, nullable
- `origins` string[], nullable
- `schedule_id` string, nullable
- `user_ids` string[], nullable
- `service_user_ids` string[], nullable
- `repo_names` string[], nullable — Filter by repository names (e.g., 'owner/repo')
- `category` 'bug_fixing' | 'ci_cd_and_devops' | 'code_quality_and_security' | 'code_review' | 'code_review_and_analysis' | 'data_and_automation' | 'documentation_and_content' | 'feature_development' | 'migrations_and_upgrades' | 'other' | 'production_investigation' | 'refactoring_and_optimization' | 'research_and_exploration' | 'security' | 'unit_test_generation', nullable
- `is_archived` boolean, nullable
- `org_ids` string[], nullable
- `include_deleted_orgs` boolean

## Response `200`

Successful Response

- PaginatedResponseSessionInsightsResponse
  - `end_cursor` string, nullable — Cursor to fetch the next page, or None if this is the last page.
  - `has_next_page` boolean — Whether there are more items available after this page.
  - `items` SessionInsightsResponse[], required
    - `acus_consumed` number, required
    - `analysis` SessionInsightsAnalysis — AI-generated analysis data from a completed session analysis.
      - `action_items` SessionInsightsActionItem[]
        - `action_item` string, required
        - `issue_id` string, nullable
        - `type` 'machine_setup' | 'repo_config' | 'knowledge' | 'prompt_improvement' | 'other'
      - `classification` SessionInsightsClassification
        - `category` string, required
        - `confidence` number, required
        - `programming_languages` string[]
        - `tools_and_frameworks` string[]
      - `issues` SessionInsightsIssue[]
        - `id` string
        - `impact` string, required
        - `issue` string, required
        - `label` string, required
      - `note_usage` SessionInsightsNoteUsage
        - `bad_usages` SessionInsightsNoteUsageItem[]
          - `message` string, required
          - `note_id` string, required
          - `reason` string, required
        - `good_usages` SessionInsightsNoteUsageItem[]
          - `message` string, required
          - `note_id` string, required
          - `reason` string, required
      - `suggested_prompt` SessionInsightsSuggestedPrompt
        - `feedback_items` SessionInsightsFeedbackItem[]
          - `details` string, required
          - `excerpt` string, required
          - `issue_id` string, nullable
          - `summary` string, required
        - `original_prompt` string, required
        - `suggested_prompt` string, required
      - `timeline` SessionInsightsTimelineEvent[]
        - `color` string
        - `description` string, required
        - `issue_id` string, nullable
        - `title` string, required
    - `category` 'bug_fixing' | 'ci_cd_and_devops' | 'code_quality_and_security' | 'code_review' | 'code_review_and_analysis' | 'data_and_automation' | 'documentation_and_content' | 'feature_development' | 'migrations_and_upgrades' | 'other' | 'production_investigation' | 'refactoring_and_optimization' | 'research_and_exploration' | 'security' | 'unit_test_generation', nullable — The session's assigned use-case category, if categorisation has run. Only populated on get/list endpoints.
    - `child_session_ids` string[], nullable
    - `created_at` integer, required
    - `is_archived` boolean
    - `num_devin_messages` integer, required — Number of Devin messages sent during the session.
    - `num_user_messages` integer, required — Number of user messages sent during the session.
    - `org_id` string, required
    - `origin` 'webapp' | 'slack' | 'teams' | 'api' | 'linear' | 'jira' | 'automation' | 'cli' | 'desktop' | 'code_scan' | 'other', nullable — The origin from which the session was created.
    - `parent_session_id` string, nullable
    - `playbook_id` string, nullable
    - `pull_requests` SessionPullRequest[], required
      - `pr_state` string, nullable, required
      - `pr_url` string, required
    - `service_user_id` string, nullable
    - `session_id` string, required
    - `session_size` 'xs' | 's' | 'm' | 'l' | 'xl', required — Session size classification based on ACU usage and message count.
    - `status` 'new' | 'claimed' | 'running' | 'exit' | 'error' | 'suspended' | 'resuming', required
    - `status_detail` 'working' | 'waiting_for_user' | 'waiting_for_approval' | 'finished' | 'inactivity' | 'user_request' | 'usage_limit_exceeded' | 'out_of_credits' | 'out_of_quota' | 'no_quota_allocation' | 'payment_declined' | 'org_usage_limit_exceeded' | 'total_session_limit_exceeded' | 'error', nullable — Additional detail about the session's current status. When status is 'running': 'working' (actively working), 'waiting_for_user' (needs user input), 'waiting_for_approval' (awaiting action approval in safe mode), or 'finished' (task complete). When status is 'suspended': the reason for suspension such as 'inactivity', 'user_request', 'usage_limit_exceeded', 'out_of_credits', 'out_of_quota', 'no_quota_allocation', 'payment_declined', 'org_usage_limit_exceeded', 'total_session_limit_exceeded', or 'error'. Only populated on get/list endpoints.
    - `structured_output` object, nullable — Validated structured output from the session. Only populated on get/list endpoints.
    - `subcategory` string, nullable — The session's assigned subcategory display name. 'Other' when a category is set but no subcategory was assigned or resolved. Only populated on get/list endpoints.
    - `tags` string[], required
    - `title` string, nullable
    - `updated_at` integer, required
    - `url` string, required
    - `user_id` string, nullable
  - `total` integer, nullable — Optional total count (can be omitted for performance).

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `409` — Conflict
- `422` — Unprocessable Content
- `429` — Too Many Requests

---

[API](https://skmtc.net/devin/apis/devin-api-v1.md) · [All operations](https://skmtc.net/devin/apis/devin-api-v1/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/devin/devin-api-v1/versions/e3244476af1c/schema)
