Skip to main content
POST /v1/sessions/{session_id} Updates mutable attributes of a session (such as title or metadata). Only fields that need to be modified should be included.

Path parameters

ParameterTypeDescription
session_idstringSession ID with the sess_ prefix

Headers

HeaderRequiredDescription
AuthorizationYesBearer $QODER_PAT
Content-TypeYesapplication/json

Request body

FieldTypeRequiredDescription
titlestringNoNew session title
metadataobjectNoMetadata patch. The server merges it into existing metadata.
delta_flush_interval_msintegerNoDelta flush interval in milliseconds. Range 50–5000.

Example request

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

Example response

HTTP 200 OK Returns the updated Session object. The updated_at field is refreshed.
{
  "agent": {
    "created_at": "2026-05-27T08:22:05.558081Z",
    "description": "",
    "id": "agent_019e6886cdf5778098368adde92a2a02",
    "mcp_servers": [],
    "metadata": {},
    "model": "ultimate",
    "name": "Hello World Agent",
    "skills": [],
    "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": [],
  "environment_variables": {},
  "metadata": {"priority": "high"},
  "resources": [
    {
      "file_id": "file_019e6a18dc0978e9a2104c9b269748ac",
      "path": "/data/data/data/file_019e6a18dc0978e9a2104c9b269748ac",
      "type": "file"
    }
  ],
  "status": "idle",
  "stats": {"active_seconds": 0, "duration_seconds": 0},
  "title": "doc-test-title",
  "turn_status": "idle",
  "type": "session",
  "updated_at": "2026-05-28T02:09:42.156418Z",
  "vault_ids": [],
  "archived_at": null
}

Response fields

The response has the same Session object shape as Get a session.

Errors

HTTPTypeTrigger
400invalid_request_errorMalformed request body
401authentication_errorPAT invalid or expired
404not_found_errorSession does not exist
See Errors for the full error envelope.

Start a session

Run an agent against an environment as a stateful conversation.