Inspect

Update session

Update session metadata. Only the session owner can update a session.

Base URL
PATCH
/api/v2/sessions/{session_id}

Update session metadata. Only the session owner can update a session.

Authorization

bearerAuth sessions:write
headerAuthorizationBearer <token>

API key authentication. Use your API key as the bearer token.

Scope: sessions:write

Path Parameters

session_id*string

The unique identifier of the session

Request Body

application/json
  1. body
title?string

New session title.

Length1 <= length
visibility?Sessions.SessionVisibility

New visibility. Private sessions cannot be made public.

Value in"public""private"
collaborators?array<>

Collaborator emails to add as session participants.

Response Body

Session

application/json
  1. response
data*
Example Request
curl -X PATCH 'https://app.inspect.com/api/v2/sessions/h2k9x4m7q1pd' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "data": {    "id": "h2k9x4m7q1pd",    "title": "Fix signup redirect loop",    "description": "Stops the signup flow from redirecting verified users back to /signup and handles expired invite links.",    "status": "finished",    "retryable": null,    "visibility": "public",    "model": {      "id": "claude-opus-5-5",      "name": "Claude Opus 5.5",      "provider": "anthropic",      "variant": "high",      "service_tier": null    },    "user": {      "id": "Kq8vN3xR7mT2pL5wB9cY4dF6gH1jZ0aE",      "name": "Jane Doe",      "email": "jane@acme.com",      "avatar_url": "https://lh3.googleusercontent.com/a/ACg8ocJ4kP9xQ2mV7nR3tW8yB5cL1dF6hG0sZeA=s96-c"    },    "opening_pull_request": false,    "pushing": false,    "working_phase": null,    "deploy": {      "active": true,      "url": "https://web-git-jane-inspect-fix-signup-redirect-3f9a-acme.vercel.app",      "commit_sha": "9c4e1b7a2f6d8e3c5b0a9f1e7d2c4b6a8e0f3d5c",      "latest_commit_sha": "9c4e1b7a2f6d8e3c5b0a9f1e7d2c4b6a8e0f3d5c",      "last_succeeded_at": "2026-10-28T16:05:37.000Z",      "last_attempt_status": "succeeded",      "last_attempt_commit_sha": "9c4e1b7a2f6d8e3c5b0a9f1e7d2c4b6a8e0f3d5c",      "last_attempt_started_at": 1793203351000,      "timed_out": false,      "outdated": false    },    "vnc_url": null,    "vnc_expires_at": null,    "ota_install_url": null,    "ota_qr_code_url": null,    "ota_expires_at": null,    "has_changes": true,    "created_at": "2026-10-28T15:42:11.204Z",    "finished_at": "2026-10-28T16:07:45.918Z",    "last_read_at": "2026-10-28T16:12:03.441Z",    "deleted_at": null,    "pull_requests": [      {        "repository": "web",        "github_repository": "web",        "url": "https://github.com/acme/web/pull/1842",        "pull_request_number": 1842,        "adopted_at": "2026-10-28T15:56:40.117Z",        "status_updated_at": "2026-10-28T16:10:04.871Z",        "title": "Fix signup redirect loop for verified users",        "review_session_id": "d4f7j2l9s6ub",        "approval_status": {          "stamp_buddy": {            "source_sequence": 7,            "generation": 2,            "publication_sequence": 3,            "head_sha": "9c4e1b7a2f6d8e3c5b0a9f1e7d2c4b6a8e0f3d5c",            "base_branch": "main",            "view_status": "ready",            "status": "success",            "current": true,            "reason": null,            "rationale": {              "version": 1,              "sections": [                {                  "title": "Checks",                  "items": [                    {                      "title": "CI",                      "status": "passed",                      "summary": "All required checks passed on the latest commit.",                      "session_ids": [                        "d4f7j2l9s6ub"                      ],                      "details": [                        {                          "label": "Required checks",                          "text": null,                          "values": [                            "build",                            "test",                            "lint"                          ]                        }                      ]                    }                  ]                }              ]            },            "risk_tier": "low",            "auto_approval": "approved",            "history": [              {                "head_sha": "9c4e1b7a2f6d8e3c5b0a9f1e7d2c4b6a8e0f3d5c",                "session_id": "d4f7j2l9s6ub",                "status": "success",                "auto_approval": "approved",                "updated_at": "2026-10-28T16:09:58.204Z"              }            ],            "grant_approval_binding": null,            "updated_at": "2026-10-28T16:09:58.204Z"          },          "smart_reviewer": {            "source_sequence": 7,            "generation": 2,            "publication_sequence": 3,            "head_sha": "9c4e1b7a2f6d8e3c5b0a9f1e7d2c4b6a8e0f3d5c",            "base_branch": "main",            "status": "success",            "current": true,            "reason": null,            "recommendation": {              "login": "mchen",              "status": "requested",              "reasoning": "Owns the signup and invite flows and reviewed the last three changes to apps/web/src/auth.",              "selection_reason": "Most recent reviewer of the changed files"            },            "request_review_binding": null,            "updated_at": "2026-10-28T16:10:04.871Z"          }        },        "status": "awaiting_review",        "merged_at": null,        "author": {          "login": "jane-acme",          "display_name": "Jane Doe",          "avatar_url": "https://avatars.githubusercontent.com/u/48151623?v=4",          "profile_url": "https://github.com/jane-acme"        }      }    ],    "repositories": [      {        "id": "web",        "state_updated_at": "2026-10-28T16:05:12.330Z",        "branch": "jane/inspect-fix-signup-redirect-3f9a",        "base_branch": "main",        "latest_commit_sha": "9c4e1b7a2f6d8e3c5b0a9f1e7d2c4b6a8e0f3d5c",        "diff": {          "file_id": "session-h2k9x4m7q1pd-w8r3n5t1y6ka.diff",          "local_file_id": "session-h2k9x4m7q1pd-q3v8m1k6z2ta.diff",          "source": "github",          "additions": 48,          "deletions": 11        }      }    ],    "branch": "jane/inspect-fix-signup-redirect-3f9a",    "base_branch": "main",    "stack_base_branch": null,    "helpfulness": 1,    "helpfulness_reason": "Found the root cause on the first pass.",    "total_input_tokens": 1284530,    "total_output_tokens": 38214,    "total_reasoning_tokens": 12907,    "total_cache_read_tokens": 1102345,    "total_cache_write_tokens": 96410,    "total_tokens": 1322744,    "total_cost": 4.82,    "last_user_message_at": "2026-10-28T15:58:22.610Z",    "parent_session_id": null,    "project_id": null,    "child_sessions": [      {        "id": "c8w3n6y1t5rb",        "title": "Audit invite link expiry handling",        "name": "invite-expiry-audit",        "status": "finished",        "created_at": "2026-10-28T15:47:29.552Z"      }    ],    "tags": [      "signup",      "web-oncall"    ],    "automation": {      "id": "u9e2r5t8y3wq",      "name": "Nightly dependency upgrades"    },    "automation_trigger_source": null,    "contextual_actions": {      "source_assistant_message_id": "msg_laminar_h2k9x4m7q1pd_msg_laminar_user_41",      "suggestions": [        {          "action_key": "request_review",          "label": "Request review",          "prompt": null,          "repository": "web",          "pull_request_number": 1842        }      ]    },    "settings": {      "ci_failures_enabled": true,      "auto_address_pull_request_reviews_policy": {        "enabled": true,        "reviewer_categories": {          "human": true,          "bot": false        },        "identity_rules": [          {            "selector": "bot:49699333",            "rule_type": "block"          }        ],        "review_buddy": {          "enabled": true,          "enabled_finding_types": [            "critical",            "warning"          ]        }      }    },    "viewer_is_owner": true,    "read_only": false,    "participants": [      {        "id": null,        "session_id": "h2k9x4m7q1pd",        "user_id": "Kq8vN3xR7mT2pL5wB9cY4dF6gH1jZ0aE",        "joined_at": "2026-10-28T15:42:11.204Z",        "last_active_at": "2026-10-28T16:12:03.441Z",        "left_at": null,        "user": {          "id": "Kq8vN3xR7mT2pL5wB9cY4dF6gH1jZ0aE",          "name": "Jane Doe",          "email": "jane@acme.com",          "avatar_url": "https://lh3.googleusercontent.com/a/ACg8ocJ4kP9xQ2mV7nR3tW8yB5cL1dF6hG0sZeA=s96-c"        }      }    ],    "agent": {      "id": "a6g3k8e1v9ym",      "name": "Frontend fixer",      "model": "claude-opus-5-5",      "avatar_url": null    },    "workspace": {      "id": "web",      "name": "web",      "description": "Acme customer dashboard and marketing site",      "organization": "acme",      "remote": "github",      "github_host": "github",      "base_branch": "main"    }  }}