Update a Forward session title or metadata.
Request headers
|
Header |
Required |
Description |
|
|
Yes |
|
|
|
Yes |
|
|
|
No |
Optional idempotency key for unsafe requests. |
Path parameters
|
Parameter |
Type |
Required |
Description |
|
|
string |
Yes |
Session ID. |
Request body
|
Parameter |
Type |
Required |
Description |
|
|
string |
No |
New session title. |
|
|
object |
No |
Metadata merge patch. Provided keys overwrite existing keys; omitted keys remain unchanged. |
Example request
curl -s -X POST 'https://api.qoder.com.cn/api/v1/forward/sessions/sess_xxx' \
-H "Authorization: Bearer $QODER_PAT" \
-H "Content-Type: application/json" \
-d '{
"title": "Updated session title",
"metadata": {
"source": "mobile",
"biz_id": "ticket_123"
}
}'
Example response
HTTP 200 OK
{
"id": "sess_xxx",
"type": "session",
"identity_id": "idn_xxx",
"template": {
"id": "tmpl_support",
"type": "template",
"name": "Support assistant",
"model": "ultimate",
"version": 3
},
"source_type": "api",
"status": "idle",
"title": "Updated session title",
"metadata": {
"source": "mobile",
"biz_id": "ticket_123"
},
"stats": {
"active_seconds": 30,
"duration_seconds": 3600
},
"usage": {
"credits": 12.7
},
"archived_at": null,
"created_at": "2026-06-22T10:00:00Z",
"updated_at": "2026-06-22T12:00:00Z"
}
Response fields
Returns the updated Session object.
Errors
|
HTTP |
Type |
Code |
Trigger |
|
400 |
|
|
Invalid update body. |
|
401 |
|
|
PAT invalid or expired. |
|
404 |
|
|
Session does not exist. |
|
409 |
|
|
Session is archived. |
Notes
-
config,resources, andincremental_streaming_enabledare create-time settings and cannot be changed here.