All Products
Search
Document Center

Qoder CN Series:Archive a session

Last Updated:Jul 15, 2026

Archive a Forward session.

Request headers

Header

Required

Description

Authorization

Yes

Bearer <PAT>

Idempotency-Key

No

Optional idempotency key for unsafe requests.

Path parameters

Parameter

Type

Required

Description

session_id

string

Yes

Session ID.

Example request

curl -s -X POST 'https://api.qoder.com.cn/api/v1/forward/sessions/sess_xxx/archive' \
  -H "Authorization: Bearer $QODER_PAT"

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": "Customer support session",
  "metadata": {},
  "stats": {
    "active_seconds": 0,
    "duration_seconds": 0
  },
  "usage": {
    "credits": 13.0
  },
  "archived_at": "2026-06-22T12:00:00Z",
  "created_at": "2026-06-22T10:00:00Z",
  "updated_at": "2026-06-22T12:00:00Z"
}

Response fields

Returns the archived Session object with archived_at set.

Errors

HTTP

Type

Code

Trigger

401

authentication_error

authentication_required

PAT invalid or expired.

404

not_found_error

session_not_found

Session does not exist.

409

conflict_error

session_archived

Session is already archived.

Notes

  • Current design does not provide a restore endpoint.

  • Use include_archived=true on List Sessions to query archived sessions.