POST /api/v1/cloud/sessions/{session_id}/threads/{thread_id}/archive
Archives a child thread. Current CAS returns 409 when asked to archive the coordinator/main thread.
Path parameters
| Parameter | Type | Description |
|---|---|---|
session_id | string | Session ID with the sess_ prefix |
thread_id | string | Thread ID with the sthr_ prefix |
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer $QODER_PAT |
Example request
Example response
HTTP 200 OK Returns the Session Thread object.Errors
| HTTP | Type | Trigger |
|---|---|---|
| 401 | authentication_error | PAT invalid or expired |
| 404 | not_found_error | Session or thread does not exist |
| 409 | invalid_request_error | Coordinator/main thread cannot be archived, the thread is not in idle status, or another version/state conflict |
"Version or state conflict." message regardless of whether the conflict is caused by the coordinator role, a non-idle thread status, or another concurrency conflict. Disambiguate by inspecting the thread state via GET /api/v1/cloud/sessions/{session_id}/threads/{thread_id}.
See Errors for the full error envelope.
Related
Managed Agents
Learn the coordinator and child thread collaboration model.
List Session Threads
Inspect all threads in a session and their statuses.
Session Thread object
Full field reference for the Session Thread object.