GET
/
beta
/
v2
/
enterprise
/
sessions
/
{devin_id}
curl -X GET "https://api.devin.ai/beta/v2/enterprise/sessions/devin-abc123" \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "devin_id": "devin-abc123",
  "devin_status": "completed",
  "session_url": "https://app.devin.ai/sessions/abc123",
  "user_id": "user_456",
  "org_id": "org_789",
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-15T11:45:00Z",
  "acus_consumed": 25.5,
  "prs": [
    {
      "pr_url": "https://github.com/example/repo/pull/123",
      "state": "merged"
    }
  ],
  "session_analysis": {
    "issues": [
      {
        "issue": "Missing environment variables",
        "impact": "High",
        "label": "Configuration"
      }
    ],
    "timeline": [
      {
        "title": "Started repository setup",
        "description": "Devin began setting up the development environment"
      }
    ],
    "action_items": [
      {
        "issue_id": "issue_1",
        "type": "machine_setup",
        "action_item": "Configure environment variables for database connection"
      }
    ],
    "suggested_prompt": {
      "original_prompt": "Fix the bug",
      "suggested_prompt": "Fix the authentication bug in the login endpoint by checking the JWT token validation",
      "feedback_items": [
        {
          "issue_id": "issue_1",
          "summary": "Prompt too vague",
          "excerpt": "Fix the bug",
          "details": "The prompt should specify which bug and provide more context"
        }
      ]
    }
  },
  "initial_user_message": "Please fix the authentication issue in our login system"
}
Beta Endpoint - This endpoint is currently in beta and may change. While we strive to maintain backward compatibility, the API structure and response format may be updated as we improve the feature.
This endpoint retrieves detailed information about a specific Devin session within your enterprise, including comprehensive session analysis, pull request information, and ACU consumption data.

Path Parameters

devin_id
string
required
The unique identifier of the Devin session (e.g., “devin-abc123”)

Response

The response contains the same session object structure as the List Enterprise Sessions endpoint.
devin_id
string
Unique identifier for the Devin session
devin_status
string
Current status of the Devin session
session_url
string
URL to view the session in the Devin interface
user_id
string
ID of the user who created the session
org_id
string
ID of the organization the session belongs to
created_at
string
Timestamp when the session was created
updated_at
string
Timestamp when the session was last updated
acus_consumed
number
Number of ACUs (Agent Compute Units) consumed by the session
prs
array
List of pull requests created during the session
session_analysis
object
Analysis data for the session (if available)
initial_user_message
string
The initial message provided by the user to start the session
curl -X GET "https://api.devin.ai/beta/v2/enterprise/sessions/devin-abc123" \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "devin_id": "devin-abc123",
  "devin_status": "completed",
  "session_url": "https://app.devin.ai/sessions/abc123",
  "user_id": "user_456",
  "org_id": "org_789",
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-15T11:45:00Z",
  "acus_consumed": 25.5,
  "prs": [
    {
      "pr_url": "https://github.com/example/repo/pull/123",
      "state": "merged"
    }
  ],
  "session_analysis": {
    "issues": [
      {
        "issue": "Missing environment variables",
        "impact": "High",
        "label": "Configuration"
      }
    ],
    "timeline": [
      {
        "title": "Started repository setup",
        "description": "Devin began setting up the development environment"
      }
    ],
    "action_items": [
      {
        "issue_id": "issue_1",
        "type": "machine_setup",
        "action_item": "Configure environment variables for database connection"
      }
    ],
    "suggested_prompt": {
      "original_prompt": "Fix the bug",
      "suggested_prompt": "Fix the authentication bug in the login endpoint by checking the JWT token validation",
      "feedback_items": [
        {
          "issue_id": "issue_1",
          "summary": "Prompt too vague",
          "excerpt": "Fix the bug",
          "details": "The prompt should specify which bug and provide more context"
        }
      ]
    }
  },
  "initial_user_message": "Please fix the authentication issue in our login system"
}