---
title: "Patch Session"
method: PATCH
path: "/v1/agent_sessions/{session_id}"
tags: ["chat"]
---

# Patch Session

`PATCH /v1/agent_sessions/{session_id}`

Update a persisted session's mutable fields.

## Path parameters

- `session_id` string, required

## Request body

- PatchAgentSessionRequestBody — Fields to update on a persisted session. Omit a field to leave it unchanged.
  - `title` string — New title for the session
  - `model` union
    - CustomProviderModelSelection — Chat against a stored custom provider record.
      - `providerType` 'custom', required
      - `providerId` string, required
      - `modelName` string, required
    - BuiltInProviderModelSelection — Chat against a Phoenix built-in provider. Credentials and connection details (base URL, Azure endpoint, AWS region) are resolved from the secret store first and the process environment second.
      - `providerType` 'builtin', required
      - `provider` 'OPENAI' | 'AZURE_OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'DEEPSEEK' | 'XAI' | 'OLLAMA' | 'AWS' | 'CEREBRAS' | 'FIREWORKS' | 'GROQ' | 'MOONSHOT' | 'PERPLEXITY' | 'TOGETHER', required
      - `modelName` string, required

## Response `200`

Successful Response

- PatchAgentSessionResponseBody
  - `data` AgentSessionData, required
    - `id` string, required
    - `title` string, required
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required
    - `is_ephemeral` boolean, required
    - `model` union, required
      - CustomProviderModelSelection — Chat against a stored custom provider record.
        - `providerType` 'custom', required
        - `providerId` string, required
        - `modelName` string, required
      - BuiltInProviderModelSelection — Chat against a Phoenix built-in provider. Credentials and connection details (base URL, Azure endpoint, AWS region) are resolved from the secret store first and the process environment second.
        - `providerType` 'builtin', required
        - `provider` 'OPENAI' | 'AZURE_OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'DEEPSEEK' | 'XAI' | 'OLLAMA' | 'AWS' | 'CEREBRAS' | 'FIREWORKS' | 'GROQ' | 'MOONSHOT' | 'PERPLEXITY' | 'TOGETHER', required
        - `modelName` string, required
    - `is_active` boolean, required — Whether a response is currently streaming on this session, i.e. its lock has a live (non-stale) heartbeat.
    - `last_message_id` string, nullable — The message ID of the most recently persisted transcript message, or null for an empty transcript.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `409` — The request conflicts with the session's current state; the body's ``code`` field says how.
- `422` — Unprocessable Entity
- `507` — Insufficient Storage

---

[API](https://skmtc.net/arize-ai/apis/arize-phoenix-rest-api.md) · [All operations](https://skmtc.net/arize-ai/apis/arize-phoenix-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/arize-ai/arize-phoenix-rest-api/revisions/881c8eca3876/schema)
