All Products
Search
Document Center

Qoder CN Series:Get a session

Last Updated:Jul 15, 2026

Retrieve a session by ID.

Request headers

Header

Required

Description

Authorization

Yes

Bearer <PAT>

Path parameters

Parameter

Type

Required

Description

session_id

string

Yes

Session ID.

Example request

curl -s -X GET 'https://api.qoder.com.cn/api/v1/forward/sessions/sess_xxx' \
  -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": "running",
  "title": "Customer support session",
  "incremental_streaming_enabled": true,
  "metadata": {
    "source": "web"
  },
  "config": {
    "environment_variables": {
      "API_KEY": "sk-xxx"
    }
  },
  "stats": {
    "active_seconds": 30,
    "duration_seconds": 3600
  },
  "usage": {
    "credits": 12.5
  },
  "archived_at": null,
  "created_at": "2026-06-22T10:00:00Z",
  "updated_at": "2026-06-22T11:00:00Z"
}

Response fields

Returns the Session object.

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 or is not visible to the caller.

Notes

  • Forward validates account and Template ownership before reading runtime facts.

  • If the underlying runtime session is missing, Forward returns 404 session_not_found.