GET /api/v1/forward/sessions
Lists sessions under the authenticated account in descending creation-time order by default. Archived sessions are excluded by default.
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer <PAT or SAT> |
Query parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
search | string | No | - | Search query. Values beginning with sess_ first match an exact Session ID; otherwise, the value is matched against titles. See Notes for matching rules. |
identity_ids | string or array | No | - | Filter by one or more Identity IDs. Comma-separated strings are supported. |
template_id | string | No | - | Filter by Forward Template ID. |
source_type | string | No | - | Filter by api, im, schedule, or batch. |
created_at[gt] | string | No | - | Created strictly after this RFC 3339 timestamp. |
created_at[gte] | string | No | - | Created at or after this RFC 3339 timestamp. |
created_at[lt] | string | No | - | Created strictly before this RFC 3339 timestamp. |
created_at[lte] | string | No | - | Created at or before this RFC 3339 timestamp. |
updated_at[gt] | string | No | - | Updated strictly after this RFC 3339 timestamp. |
updated_at[gte] | string | No | - | Updated at or after this RFC 3339 timestamp. |
updated_at[lt] | string | No | - | Updated strictly before this RFC 3339 timestamp. |
updated_at[lte] | string | No | - | Updated at or before this RFC 3339 timestamp. |
limit | integer | No | 20 | Items per page. Maximum 100. |
after_id | string | No | - | Cursor for the next page. Pass the last_id from the previous response. |
before_id | string | No | - | Cursor for the previous page. Pass the first_id from the current response. |
order | string | No | desc | Creation-time sort order: desc or asc. |
include_archived | boolean | No | false | Include archived sessions. |
Example request
Example response
HTTP 200 OK
Response fields
| Field | Type | Description |
|---|---|---|
data | array | Session objects on the current page. |
first_id | string|null | ID of the first record on this page. |
last_id | string|null | ID of the last record on this page. |
has_more | boolean | Whether more records remain. |
Errors
| HTTP | Type | Code | Trigger |
|---|---|---|---|
| 400 | invalid_request_error | invalid_time_range | Time filters are invalid. |
| 400 | invalid_request_error | invalid_time_filter | The time-filter format is invalid. |
| 400 | invalid_request_error | invalid_pagination | Pagination parameters are invalid. |
| 400 | invalid_request_error | invalid_limit | limit is invalid or exceeds the maximum. |
| 400 | invalid_request_error | invalid_order | order is not asc or desc. |
| 400 | invalid_request_error | invalid_search | search is invalid UTF-8, exceeds 512 bytes, or contains control characters. |
| 401 | authentication_error | authentication_required | PAT or SAT invalid or expired. |
Notes
search matching rules:
- If the value begins with
sess_, the API first attempts an exact Session ID match. A match returns only that Session; otherwise, the query falls back to title matching. - Title matching is a case-insensitive substring search.
%,_, and\are treated as literal characters. - Leading and trailing whitespace is removed. The remaining value must be valid UTF-8, no longer than 512 bytes, and contain no control characters.
-
after_idandbefore_idcannot be used together. -
The list is sorted by
created_at. Sessions with the same creation time are sorted by Session ID in the same direction to keep pagination stable. -
Keep the same filters and
ordervalue when paging through results. -
Current design does not support filtering by
status. -
usage.total_creditsis returned only for newly created Sessions. Historical Sessions may omit it. -
resourcesreturns resources mounted in the session. It currently contains onlyfileresources added through Add a session resource; it is an empty array when no resources are mounted.

