List execution Threads in a Forward Session with cursor pagination.
GET /api/v1/forward/sessions/{session_id}/threads
A Thread is an execution branch in the Session runtime. The coordinator Thread and its child Threads use the same data structure.
Request headers
| Header | Required | Description |
|---|---|---|
| Authorization | Yes | Bearer <PAT or SAT> |
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| session_id | string | Yes | Session ID with the sess_ prefix. |
Query parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| limit | integer | No | 20 | Page size from 1 to 100. |
| after_id | string | No | - | Return records after this Thread ID. |
| before_id | string | No | - | Return records before this Thread ID. |
after_id and before_id together. Results are always sorted in ascending order.
This endpoint does not support order, statuses, statuses[], or include_archived. Passing any of these parameters, even with an empty value, returns 400 invalid_request.
Example request
Example response
HTTP 200 OK
| Field | Type | Description |
|---|---|---|
| data | array | Thread objects on this page. |
| first_id | string | null | First Thread ID on this page, or null when empty. |
| last_id | string | null | Last Thread ID on this page, or null when empty. |
| has_more | boolean | Whether more records are available. |
Errors
| HTTP | Type | Code | Condition |
|---|---|---|---|
| 400 | invalid_request | invalid_limit | limit is not an integer from 1 to 100. |
| 400 | invalid_request | invalid_pagination | Both after_id and before_id were provided. |
| 400 | invalid_request | invalid_request | An unsupported selector was provided. |
| 401 | authentication_error | authentication_required | The PAT or SAT is invalid or expired. |
| 404 | not_found | session_not_found | The Session does not exist or is not visible to the caller. |
| 502 | api_error | runtime_unavailable | The Thread runtime service is unavailable. |
Notes
- While the parent Session is active, the list excludes archived Threads. After the parent Session is archived, the list may include archived Threads.
- If you know a Thread ID, use the get Thread endpoint to retrieve its final state.