Skip to main content
GET
/
v3
/
enterprise
/
sessions
/
{devin_id}
/
insights
Get session insights
curl --request GET \
  --url https://api.devin.ai/v3/enterprise/sessions/{devin_id}/insights \
  --header 'Authorization: Bearer <token>'
{
  "acus_consumed": 123,
  "created_at": 123,
  "num_devin_messages": 123,
  "num_user_messages": 123,
  "org_id": "<string>",
  "pull_requests": [
    {
      "pr_state": "<string>",
      "pr_url": "<string>"
    }
  ],
  "session_id": "<string>",
  "session_size": "xs",
  "status": "new",
  "tags": [
    "<string>"
  ],
  "updated_at": 123,
  "url": "<string>",
  "analysis": {
    "action_items": [],
    "classification": {
      "category": "<string>",
      "confidence": 123,
      "programming_languages": [],
      "tools_and_frameworks": []
    },
    "issues": [],
    "note_usage": {
      "bad_usages": [],
      "good_usages": []
    },
    "suggested_prompt": {
      "original_prompt": "<string>",
      "suggested_prompt": "<string>",
      "feedback_items": []
    },
    "timeline": []
  },
  "child_session_ids": [
    "<string>"
  ],
  "is_advanced": false,
  "is_archived": false,
  "parent_session_id": "<string>",
  "playbook_id": "<string>",
  "service_user_id": "<string>",
  "status_detail": "working",
  "structured_output": {},
  "title": "<string>",
  "user_id": "<string>"
}
The devin_id is the session ID prefixed with devin- (e.g., devin-abc123).

Permissions

Requires a service user with the ViewAccountSessions permission at the enterprise level.

Authorizations

Authorization
string
header
required

Service User credential (prefix: cog_)

Path Parameters

devin_id
string | null
required

Query Parameters

org_id
string | null

Response

Successful Response

Session details augmented with quantitative metrics and AI analysis.

Extends SessionResponse with additional fields that require extra queries.

acus_consumed
number
required
created_at
integer
required
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
pull_requests
SessionPullRequest · object[]
required
session_id
string
required
session_size
enum<string>
required

Session size classification based on ACU usage and message count.

Available options:
xs,
s,
m,
l,
xl
status
enum<string>
required
Available options:
new,
claimed,
running,
exit,
error,
suspended,
resuming
tags
string[]
required
updated_at
integer
required
url
string
required
analysis
SessionInsightsAnalysis · object

AI-generated session analysis. Null if analysis has not been triggered. Analysis must be triggered by the user, either through the Devin UI or by calling the generate session insights endpoint.

child_session_ids
string[] | null
is_advanced
boolean
default:false
is_archived
boolean
default:false
parent_session_id
string | null
playbook_id
string | null
service_user_id
string | null
status_detail
enum<string> | null

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', 'payment_declined', 'org_usage_limit_exceeded', or 'error'. Only populated on get/list endpoints.

Available options:
working,
waiting_for_user,
waiting_for_approval,
finished,
inactivity,
user_request,
usage_limit_exceeded,
out_of_credits,
payment_declined,
org_usage_limit_exceeded,
error
structured_output
Structured Output · object

Validated structured output from the session. Only populated on get/list endpoints.

title
string | null
user_id
string | null