Skip to main content
GET
/
v2
/
enterprise
/
organizations
/
{org_id}
/
sessions
/
insights
curl -X GET "https://api.devin.ai/v2/enterprise/organizations/org_789/sessions/insights?limit=10&skip=0" \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "items": [
    {
      "session_id": "xyz789",
      "url": "https://app.devin.ai/sessions/xyz789",
      "status": "exit",
      "title": "Implement new feature",
      "tags": ["feature", "enhancement"],
      "user_id": "user_123",
      "org_id": "org_789",
      "created_at": "2024-01-20T14:00:00Z",
      "updated_at": "2024-01-20T16:30:00Z",
      "acus_consumed": 32.1,
      "pull_requests": [
        {
          "pr_url": "https://github.com/example/repo/pull/789",
          "pr_state": "merged",
          "state": "merged"
        }
      ],
      "session_analysis": {
        "issues": [
          {
            "issue": "Test coverage below threshold",
            "impact": "Medium",
            "label": "Testing"
          }
        ],
        "timeline": [
          {
            "title": "Feature implementation started",
            "description": "Devin began implementing the new user dashboard feature"
          },
          {
            "title": "Tests written",
            "description": "Unit and integration tests added for the new feature"
          },
          {
            "title": "Pull request created",
            "description": "PR opened for review with comprehensive documentation"
          }
        ],
        "action_items": [
          {
            "issue_id": "issue_2",
            "type": "repo_config",
            "action_item": "Increase test coverage threshold in CI configuration"
          }
        ],
        "suggested_prompt": {
          "original_prompt": "Add a new dashboard",
          "suggested_prompt": "Implement a user dashboard feature that displays session history, ACU consumption metrics, and recent pull requests. Include unit tests and update the navigation menu.",
          "feedback_items": [
            {
              "issue_id": "issue_2",
              "summary": "Missing test requirements",
              "excerpt": "Add a new dashboard",
              "details": "The prompt should explicitly request test coverage for new features"
            }
          ]
        }
      },
      "initial_user_message": "Please add a new dashboard to show user activity"
    }
  ],
  "total": 45,
  "skip": 0,
  "limit": 10,
  "has_more": true,
  "next_cursor": 10
}
Returns a paginated list of all Devin sessions for a specific organization within your enterprise, including comprehensive session analysis, initial user messages, pull request information, and ACU consumption data. This endpoint provides more detailed information than the basic List Organization Sessions endpoint.

Path Parameters

org_id
string
required
The unique identifier of the organization

Query Parameters

skip
integer
default:"0"
Number of items to skip for pagination (minimum: 0)
limit
integer
default:"100"
Maximum number of items to return (minimum: 1, maximum: 1000)
created_date_from
string
Filter sessions created after this date (ISO 8601 format)
created_date_to
string
Filter sessions created before this date (ISO 8601 format)
updated_date_from
string
Filter sessions updated after this date (ISO 8601 format)
updated_date_to
string
Filter sessions updated before this date (ISO 8601 format)
user_ids
array
Filter sessions by user IDs (array of strings)
session_ids
array
Filter sessions by specific Devin session IDs (array of strings)
tags
array
Filter sessions by tags (array of strings)
order
string
default:"desc"
Sort order for results by creation date. Options: “asc” or “desc”

Response

items
array
required
Array of session detail objects
total
integer
required
Total number of sessions available for the organization
skip
integer
required
Number of items skipped
limit
integer
required
Maximum number of items per page
has_more
boolean
required
Whether more items are available
next_cursor
integer
Cursor for the next page (if applicable)
curl -X GET "https://api.devin.ai/v2/enterprise/organizations/org_789/sessions/insights?limit=10&skip=0" \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "items": [
    {
      "session_id": "xyz789",
      "url": "https://app.devin.ai/sessions/xyz789",
      "status": "exit",
      "title": "Implement new feature",
      "tags": ["feature", "enhancement"],
      "user_id": "user_123",
      "org_id": "org_789",
      "created_at": "2024-01-20T14:00:00Z",
      "updated_at": "2024-01-20T16:30:00Z",
      "acus_consumed": 32.1,
      "pull_requests": [
        {
          "pr_url": "https://github.com/example/repo/pull/789",
          "pr_state": "merged",
          "state": "merged"
        }
      ],
      "session_analysis": {
        "issues": [
          {
            "issue": "Test coverage below threshold",
            "impact": "Medium",
            "label": "Testing"
          }
        ],
        "timeline": [
          {
            "title": "Feature implementation started",
            "description": "Devin began implementing the new user dashboard feature"
          },
          {
            "title": "Tests written",
            "description": "Unit and integration tests added for the new feature"
          },
          {
            "title": "Pull request created",
            "description": "PR opened for review with comprehensive documentation"
          }
        ],
        "action_items": [
          {
            "issue_id": "issue_2",
            "type": "repo_config",
            "action_item": "Increase test coverage threshold in CI configuration"
          }
        ],
        "suggested_prompt": {
          "original_prompt": "Add a new dashboard",
          "suggested_prompt": "Implement a user dashboard feature that displays session history, ACU consumption metrics, and recent pull requests. Include unit tests and update the navigation menu.",
          "feedback_items": [
            {
              "issue_id": "issue_2",
              "summary": "Missing test requirements",
              "excerpt": "Add a new dashboard",
              "details": "The prompt should explicitly request test coverage for new features"
            }
          ]
        }
      },
      "initial_user_message": "Please add a new dashboard to show user activity"
    }
  ],
  "total": 45,
  "skip": 0,
  "limit": 10,
  "has_more": true,
  "next_cursor": 10
}