All Products
Search
Document Center

Qoder CN Series:Update a session

Last Updated:Jul 15, 2026

Update mutable session attributes such as title and metadata. Include only the fields you want to change.

Request headers

Header

Required

Description

Authorization

Yes

Bearer <PAT>

Content-Type

Yes

application/json

Path parameters

Parameter

Type

Required

Description

session_id

string

Yes

Session ID (sess_ prefix)

Request body

Field

Type

Required

Description

title

string

No

New session title

metadata

object

No

New metadata (full replacement)

Example request

curl -X POST "https://api.qoder.com.cn/api/v1/cloud/sessions/sess_019e3bb1e8c171fd9abbb1477ffb84cc" \
  -H "Authorization: Bearer $QODER_PAT" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "New title",
    "metadata": {"priority": "high"}
  }'

Example response

HTTP 200 OK

Returns the updated full Session object with a refreshed updated_at field.

{
  "agent": {
    "created_at": "2026-05-27T08:22:05.558081Z",
    "default_environment": "",
    "description": "",
    "id": "agent_019e6886cdf5778098368adde92a2a02",
    "instructions": "You are a general-purpose assistant capable of research, writing code, running commands, and using tools end-to-end to complete tasks.",
    "mcp_servers": [],
    "model": "ultimate",
    "name": "Hello World Agent",
    "system": "You are a general-purpose assistant capable of research, writing code, running commands, and using tools end-to-end to complete tasks.",
    "tools": [
      {
        "enabled_tools": ["WebFetch", "WebSearch", "Bash", "Glob", "Read", "Grep", "Write", "Edit"],
        "type": "agent_toolset_20260401"
      }
    ],
    "type": "agent",
    "updated_at": "2026-05-27T10:09:09.542948Z",
    "version": 3
  },
  "agent_id": "agent_019e6886cdf5778098368adde92a2a02",
  "created_at": "2026-05-27T15:30:48.336828Z",
  "environment_id": "env_019e6954e74770d6bce983cdb53be448",
  "id": "sess_019e6a0f4d9170a989eee39f6685f3fb",
  "memory_store_ids": [],
  "resources": [
    {
      "file_id": "file_019e6a18dc0978e9a2104c9b269748ac",
      "path": "/data/data/data/file_019e6a18dc0978e9a2104c9b269748ac",
      "type": "file"
    }
  ],
  "status": "idle",
  "title": "doc-test-title",
  "turn_status": "idle",
  "type": "session",
  "updated_at": "2026-05-28T02:09:42.156418Z",
  "vault_ids": []
}

The nested agent object does not include archived / archived_at fields (unlike the top-level GET /agents response).

Errors

HTTP

type

Condition

400

invalid_request_error

Malformed request body

401

authentication_error

PAT is invalid or expired

404

not_found_error

Session does not exist

See Errors for the full error envelope.