Skip to main content
Update a session’s status or metadata. Following the OpenAI beta convention, updates use POST and apply a partial patch: included fields are replaced, omitted fields are untouched.

Endpoint

Authentication

Authorization: Bearer <api_key> or Authorization: ApiKey <api_key>.

Path parameters

string
required
Session identifier.

Request body

string
New session status, such as active or archived.
object
Replacement metadata object.

Response

Returns the full updated session (same shape as Get Session).

Example