Threads
List Session Threads
List Session Threads through the OMA API.
GET
/
v1
/
sessions
/
{session_id}
/
threads
List Session Threads
curl --request GET \
--url http://localhost:38080/v1/sessions/{session_id}/threads \
--header 'X-Api-Key: <api-key>'import requests
url = "http://localhost:38080/v1/sessions/{session_id}/threads"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('http://localhost:38080/v1/sessions/{session_id}/threads', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:38080/v1/sessions/{session_id}/threads"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"data": [
{
"type": "session_thread",
"id": "sthr_011CZkZVWa6oIjw0rgXZpnBt",
"session_id": "sesn_011CZkZAtmR3yMPDzynEDxu7",
"status": "idle",
"agent": {
"type": "agent",
"id": "agent_011CZkYqphY8vELVzwCUpqiQ",
"version": 1,
"name": "Researcher",
"description": "A focused research subagent.",
"model": {
"id": "claude-sonnet-4-6",
"speed": "standard"
},
"system": "You are a research subagent that gathers and summarises sources for the coordinating agent.",
"tools": [
{
"type": "agent_toolset_20260401",
"default_config": {
"enabled": true,
"permission_policy": {
"type": "always_ask"
}
},
"configs": []
}
],
"mcp_servers": [],
"skills": []
},
"parent_thread_id": null,
"created_at": "2026-03-15T10:00:00Z",
"updated_at": "2026-03-15T10:00:00Z",
"archived_at": null,
"usage": {
"input_tokens": 0,
"output_tokens": 0,
"cache_read_input_tokens": 0,
"cache_creation": {
"ephemeral_5m_input_tokens": 0,
"ephemeral_1h_input_tokens": 0
}
},
"stats": {
"duration_seconds": 0,
"startup_seconds": 0,
"active_seconds": 0
}
}
],
"next_page": "page_MjAyNS0wNS0xNFQwMDowMDowMFo="
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}Every request requires
?beta=true.Authorizations
omaApiKeyomaBearer
OMA workspace API key.
Path Parameters
Path parameter session_id
Query Parameters
Selects the beta API contract for this endpoint. Must be true.
Available options:
true Maximum results per page. Defaults to 1000.
Opaque pagination cursor from a previous response's next_page. Forward-only.
Response
Successful response (OK)
Paginated list of threads within a session.
Threads in the session, primary first then children in spawn order.
Show child attributes
Show child attributes
Example:
[
{
"type": "session_thread",
"id": "sthr_011CZkZVWa6oIjw0rgXZpnBt",
"session_id": "sesn_011CZkZAtmR3yMPDzynEDxu7",
"status": "idle",
"agent": {
"type": "agent",
"id": "agent_011CZkYqphY8vELVzwCUpqiQ",
"version": 1,
"name": "Researcher",
"description": "A focused research subagent.",
"model": {
"id": "claude-sonnet-4-6",
"speed": "standard"
},
"system": "You are a research subagent that gathers and summarises sources for the coordinating agent.",
"tools": [
{
"type": "agent_toolset_20260401",
"default_config": {
"enabled": true,
"permission_policy": { "type": "always_ask" }
},
"configs": []
}
],
"mcp_servers": [],
"skills": []
},
"parent_thread_id": null,
"created_at": "2026-03-15T10:00:00Z",
"updated_at": "2026-03-15T10:00:00Z",
"archived_at": null,
"usage": {
"input_tokens": 0,
"output_tokens": 0,
"cache_read_input_tokens": 0,
"cache_creation": {
"ephemeral_5m_input_tokens": 0,
"ephemeral_1h_input_tokens": 0
}
},
"stats": {
"duration_seconds": 0,
"startup_seconds": 0,
"active_seconds": 0
}
}
]
Opaque cursor for the next page. Null when no more results.
Example:
"page_MjAyNS0wNS0xNFQwMDowMDowMFo="
Was this page helpful?
⌘I
List Session Threads
curl --request GET \
--url http://localhost:38080/v1/sessions/{session_id}/threads \
--header 'X-Api-Key: <api-key>'import requests
url = "http://localhost:38080/v1/sessions/{session_id}/threads"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('http://localhost:38080/v1/sessions/{session_id}/threads', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:38080/v1/sessions/{session_id}/threads"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"data": [
{
"type": "session_thread",
"id": "sthr_011CZkZVWa6oIjw0rgXZpnBt",
"session_id": "sesn_011CZkZAtmR3yMPDzynEDxu7",
"status": "idle",
"agent": {
"type": "agent",
"id": "agent_011CZkYqphY8vELVzwCUpqiQ",
"version": 1,
"name": "Researcher",
"description": "A focused research subagent.",
"model": {
"id": "claude-sonnet-4-6",
"speed": "standard"
},
"system": "You are a research subagent that gathers and summarises sources for the coordinating agent.",
"tools": [
{
"type": "agent_toolset_20260401",
"default_config": {
"enabled": true,
"permission_policy": {
"type": "always_ask"
}
},
"configs": []
}
],
"mcp_servers": [],
"skills": []
},
"parent_thread_id": null,
"created_at": "2026-03-15T10:00:00Z",
"updated_at": "2026-03-15T10:00:00Z",
"archived_at": null,
"usage": {
"input_tokens": 0,
"output_tokens": 0,
"cache_read_input_tokens": 0,
"cache_creation": {
"ephemeral_5m_input_tokens": 0,
"ephemeral_1h_input_tokens": 0
}
},
"stats": {
"duration_seconds": 0,
"startup_seconds": 0,
"active_seconds": 0
}
}
],
"next_page": "page_MjAyNS0wNS0xNFQwMDowMDowMFo="
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}