GET
/
v1
/
sessions
/
{session_id}
Retrieve details about an existing session
curl --request GET \
  --url https://api.devin.ai/v1/sessions/{session_id} \
  --header 'Authorization: Bearer <token>'
{
  "session_id": "devin-abc123def456",
  "status": "running",
  "title": "Review PR #123",
  "created_at": "2024-01-01T00:00:00.000000+00:00",
  "updated_at": "2024-01-01T00:05:30.123456+00:00",
  "snapshot_id": null,
  "playbook_id": null,
  "tags": [
    "api",
    "documentation",
    "review"
  ],
  "pull_request": {
    "url": "https://github.com/example/repo/pull/123"
  },
  "structured_output": {
    "result": "success",
    "files_modified": 3
  },
  "status_enum": "blocked",
  "messages": [
    {
      "type": "initial_user_message",
      "event_id": "event-abc123-def4-5678-9012-abcdef123456",
      "message": "Review the pull request at https://github.com/example/repo/pull/123",
      "timestamp": "2024-01-01T00:00:00.000000+00:00",
      "username": "user@example.com",
      "origin": "web",
      "user_id": "user-123e4567-e89b-12d3-a456-426614174000"
    },
    {
      "type": "devin_message",
      "event_id": "event-def456-abc1-2345-6789-fedcba654321",
      "message": "I'll review the pull request for you. Let me analyze the changes.",
      "timestamp": "2024-01-01T00:00:15.123456+00:00"
    },
    {
      "type": "user_message",
      "event_id": "event-789abc-def0-1234-5678-9abcdef01234",
      "message": "Please focus on the security implications",
      "timestamp": "2024-01-01T00:03:45.987654+00:00",
      "username": "user@example.com",
      "origin": "web",
      "user_id": "user-123e4567-e89b-12d3-a456-426614174000"
    },
    {
      "type": "devin_message",
      "event_id": "event-012def-abc3-4567-8901-23456789abcd",
      "message": "I've completed the security review. Found 2 potential issues that need attention.",
      "timestamp": "2024-01-01T00:05:30.123456+00:00"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

session_id
string
required

The session ID

Response

Returns session details

Detailed information about an existing session

session_id
string
required

Unique identifier for the session

status
string
required

Current status of the session

title
string | null

Session title

created_at
string<date-time>

Creation timestamp (ISO 8601)

updated_at
string<date-time>

Last update timestamp (ISO 8601)

snapshot_id
string | null

ID of the machine snapshot used

playbook_id
string | null

ID of the playbook used

tags
string[] | null

List of tags associated with the session

pull_request
object | null

Pull request information (null if no PR is associated) containing url field

structured_output
object | null

Task-specific structured output

status_enum
enum<string> | null

Session status enumerations:

  • "working": Devin is actively working on a task
  • "blocked": Devin is waiting for user input or response
  • "expired": Session has expired
  • "finished": Session has completed
  • "suspend_requested": Request to suspend the session
  • "suspend_requested_frontend": Frontend-initiated suspend request
  • "resume_requested": Request to resume the session
  • "resume_requested_frontend": Frontend-initiated resume request
  • "resumed": Session has been resumed
Available options:
working,
blocked,
expired,
finished,
suspend_requested,
suspend_requested_frontend,
resume_requested,
resume_requested_frontend,
resumed
messages
object[] | null

List of messages in the session