Skip to main content
POST /api/v1/cloud/sessions/{session_id} Updates mutable Session attributes. Omitted fields are preserved.

Path parameters

ParameterTypeDescription
session_idstringSession ID with the sess_ prefix

Headers

HeaderRequiredDescription
AuthorizationYesBearer $QODER_PAT
Content-TypeYesapplication/json

Request body

FieldTypeRequiredDescription
titlestring | nullNoNew Session title. Send null to clear it
metadataobject | nullNoMetadata patch. Object keys with null values delete those keys; top-level null is currently a no-op
agentobjectNoMid-session Agent update. Only tools and mcp_servers are supported, and each is a full replacement when present
Note: vault_ids appears in the public Session shape but is not currently writable through this endpoint — the request will be rejected. Use it only when reading; it is not part of the supported request body. delta_flush_interval_ms is also not supported.

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", "old_key": null},
    "agent": {
      "tools": [],
      "mcp_servers": []
    }
  }'

Example response

HTTP 200 OK Returns the updated Session object.

Errors

HTTPTypeTrigger
400invalid_request_errorMalformed request body, unsupported field, or unsupported Agent update field
401authentication_errorPAT invalid or expired
404not_found_errorSession does not exist
HTTP 400 Bad Request
{
  "type": "error",
  "request_id": "cb80235f-76a2-4ff3-9e28-5aa2da12dc14",
  "error": {
    "type": "invalid_request_error",
    "message": "metadata must be an object"
  }
}
HTTP 404 Not Found
{
  "type": "error",
  "request_id": "cb80235f-76a2-4ff3-9e28-5aa2da12dc14",
  "error": {
    "type": "not_found_error",
    "message": "Session 'sess_does_not_exist_0000000000000000000000000000' was not found."
  }
}
See Errors for the full error envelope.

Start a session

Run an agent against an environment as a stateful conversation.