List Forward sessions with filters and cursor pagination.
Request headers
|
Header |
Required |
Description |
|
|
Yes |
|
Query parameters
|
Parameter |
Type |
Required |
Default |
Description |
|
|
string or array |
No |
- |
Filter by one or more Identity IDs. Comma-separated strings are supported. |
|
|
string |
No |
- |
Filter by Forward Template ID. |
|
|
string |
No |
- |
Filter by |
|
|
string |
No |
- |
Created strictly after this RFC 3339 timestamp. |
|
|
string |
No |
- |
Created at or after this RFC 3339 timestamp. |
|
|
string |
No |
- |
Created strictly before this RFC 3339 timestamp. |
|
|
string |
No |
- |
Created at or before this RFC 3339 timestamp. |
|
|
string |
No |
- |
Updated strictly after this RFC 3339 timestamp. |
|
|
string |
No |
- |
Updated at or after this RFC 3339 timestamp. |
|
|
string |
No |
- |
Updated strictly before this RFC 3339 timestamp. |
|
|
string |
No |
- |
Updated at or before this RFC 3339 timestamp. |
|
|
integer |
No |
20 |
Items per page. Maximum 100. |
|
|
string |
No |
- |
Cursor for records after the given Session ID. Cannot be used with |
|
|
string |
No |
- |
Cursor for records before the given Session ID. Cannot be used with |
|
|
string |
No |
|
Sort order: |
|
|
boolean |
No |
|
Include archived sessions. |
Example request
curl -s -X GET 'https://api.qoder.com.cn/api/v1/forward/sessions?identity_ids=idn_xxx,idn_yyy&template_id=tmpl_support&source_type=im&created_at[gte]=2026-06-01T00:00:00Z&limit=20' \
-H "Authorization: Bearer $QODER_PAT"
Example response
HTTP 200 OK
{
"data": [
{
"id": "sess_xxx",
"type": "session",
"identity_id": "idn_xxx",
"template": {
"id": "tmpl_support",
"type": "template",
"name": "Support assistant",
"model": "ultimate",
"version": 3
},
"source_type": "im",
"status": "idle",
"title": "Customer support session",
"incremental_streaming_enabled": true,
"metadata": {
"source": "dingtalk"
},
"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"
}
],
"first_id": "sess_xxx",
"last_id": "sess_xxx",
"has_more": false
}
Response fields
|
Field |
Type |
Description |
|
|
array |
Session objects on the current page. |
|
|
string|null |
ID of the first record on this page. |
|
|
string|null |
ID of the last record on this page. |
|
|
boolean |
Whether more records remain. |
Errors
|
HTTP |
Type |
Code |
Trigger |
|
400 |
|
|
Time filters are invalid. |
|
400 |
|
|
Pagination parameters are invalid. |
|
401 |
|
|
PAT invalid or expired. |
Notes
-
after_idandbefore_idcannot be used together. -
Current design does not support filtering by
status. -
usage.creditsmay be omitted if the credits module is not enabled.