---
title: "Patch a session"
method: PATCH
path: "/api/projects/{projectId}/sessions/{sessionId}/"
tags: ["Sessions"]
---

# Patch a session

`PATCH /api/projects/{projectId}/sessions/{sessionId}/`

Patch a session. Applies a partial update to the target resource.

## Request body

- UpdateSessionRequest — update Session Request payload accepted by the API.
  - `name` string, nullable — Human-readable name.
  - `displayName` string, nullable — Optional display name shown to users.
  - `description` string, nullable — Optional human-readable description.

## Response `200`

Session

- Session — Agent session record and its sandbox, thread, commit, and workspace state.
  - `id` string, required — Stable identifier for the object.
  - `projectId` string, required — Project identifier that owns or scopes this object.
  - `workspaceId` string, required — Workspace identifier associated with this object.
  - `providerId` string — Sandbox provider identifier.
  - `name` string, required — Human-readable name.
  - `displayName` string, nullable — Optional display name shown to users.
  - `description` string, nullable — Optional human-readable description.
  - `sandboxStatus` string, required — Collection of sandbox statu values.
  - `sandboxStatusMessage` string, nullable — sandbox Status Message value for the session object.
  - `threadStatus` SessionThreadStatus — session Thread Status API object.
    - `status` string, required — Current status value.
    - `reason` string — reason value for the session Thread Status object.
    - `needsAttentionCount` integer — needs Attention Count value for the session Thread Status object.
    - `runningCount` integer — running Count value for the session Thread Status object.
    - `queuedCount` integer — queued Count value for the session Thread Status object.
    - `unknownCount` integer — unknown Count value for the session Thread Status object.
    - `threadId` string — Thread identifier associated with this object.
    - `updatedAt` string — Time when the object was last updated.
  - `commitStatus` string, required — Collection of commit statu values.
  - `commitOperation` string, nullable — commit Operation value for the session object.
  - `commitError` string, nullable — commit Error value for the session object.
  - `targetRef` string, nullable — target Ref value for the session object.
  - `appliedCommit` string, nullable — applied Commit value for the session object.
  - `errorMessage` string, nullable — Detailed error message, when present.
  - `workspacePath` string, nullable — workspace Path value for the session object.
  - `createdAt` string, date-time, required — Time when the object was created.
  - `updatedAt` string, date-time, required — Time when the object was last updated.

## Changes

> 11 revisions in range; 1 could not be searched.

- **2026-06-01** `90fa68eb439c` — 2 breaking, 7 warning, 1 info
  - the `threadStatus` response's property type/format changed from `object`/`` to ``/`` for status `200`
  - removed the required property `threadStatus/status` from the response with the `200` status
  - removed the optional property `threadStatus/needsAttentionCount` from the response with the `200` status
  - removed the optional property `threadStatus/queuedCount` from the response with the `200` status
  - …6 more
- **2026-05-29** `2d34481e85d7` — 1 breaking, 9 info
  - the `threadStatus` response's property type/format changed from ``/`` to `object`/`` for status `200`
  - added the optional property `threadStatus/needsAttentionCount` to the response with the `200` status
  - added the optional property `threadStatus/queuedCount` to the response with the `200` status
  - added the optional property `threadStatus/reason` to the response with the `200` status
  - …6 more

[Change history](https://skmtc.dev/ibuildthecloud/apis/discobot-server-api/changes/api/projects/:projectId/sessions/:sessionId/patch.md)

---

[API](https://skmtc.dev/ibuildthecloud/apis/discobot-server-api.md) · [All operations](https://skmtc.dev/ibuildthecloud/apis/discobot-server-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ibuildthecloud/discobot-server-api/revisions/4de3fcd6be56/schema)
