POST /v1/sessions/{session_id}/archive
Archives a session. Archived sessions are hidden from default listings (you need to pass include_archived=true to list them), but their data is retained.
Unlike Environment and Vault, Session status stays "idle" after archiving (does not become "archived"). Archive effect only means default list won’t return this Session. Current API has no unarchive/restore endpoint.
Path parameters
| Parameter | Type | Description |
|---|
session_id | string | Session ID with the sess_ prefix |
| Header | Required | Description |
|---|
Authorization | Yes | Bearer $QODER_PAT |
Content-Type | Yes | application/json |
Example request
curl -X POST https://api.qoder.com/api/v1/cloud/sessions/sess_019e3bb1e8c171fd9abbb1477ffb84cc/archive \
-H "Authorization: Bearer $QODER_PAT" \
-H "Content-Type: application/json"
Example response
HTTP 200 OK
Returns the full Session object.
{
"id": "sess_019e3bb1e8c171fd9abbb1477ffb84cc",
"type": "session",
"agent_id": "agent_019e390add9f7bac9b6cc806db46fcbd",
"environment_id": "env_019e2590d33f711fabf42f2857cecd8a",
"title": "API-doc-verification-session-updated",
"status": "idle",
"resources": [],
"vault_ids": [],
"memory_store_ids": [],
"created_at": "2026-05-18T15:26:15.747298Z",
"updated_at": "2026-05-18T15:26:35.5596Z"
}
Errors
| HTTP | Type | Trigger |
|---|
| 401 | authentication_error | PAT invalid or expired |
| 404 | not_found_error | Session does not exist |
See Errors for the full error envelope.