> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.athenaintel.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.athenaintel.com/_mcp/server.

# Get Status of Many Threads

POST https://api.athenaintel.com/api/v0/threads/status-batch
Content-Type: application/json

Read the lifecycle status of up to 200 threads in one call, whether they were started by `POST /aop/execute-async` or `POST /aop/execute-batch`. Returns aggregate counts plus one compact entry per thread (status, terminal flag, output availability, timestamps) without loading any messages; fetch results with `GET /threads/{thread_id}/status` once `output_available` is true. Only threads you launched are returned: unknown IDs and other users' threads are listed in `not_found` and are indistinguishable.

Reference: https://docs.athenaintel.com/api-reference/threads/get-status-batch

## Authentication

- `X-API-KEY` header (required) — API Key authentication via header

## Request

### Body (application/json)

This endpoint expects a ThreadStatusBatchRequestIn.

- `thread_ids` (list of string, required) — Thread IDs to check (1-200 per request), from `POST /aop/execute-async` or `POST /aop/execute-batch`. Duplicates are collapsed.

## Response

### 200

Status of every requested thread you own

- `counts` (AOPBatchStatusCountsOut, required) — Found threads per canonical status
- `found` (integer, required) — Requested threads that exist and belong to you
- `is_complete` (boolean, required) — True when every found thread has finished
- `not_found` (list of string, required) — Requested thread IDs that do not exist or are not yours; the two cases are indistinguishable
- `requested` (integer, required) — Distinct thread IDs in the request
- `terminal` (integer, required) — Found threads that have finished (completed + failed + canceled)
- `threads` (list of ThreadStatusBatchItemOut, required) — One entry per found thread, in request order

## Errors

### 401 Unauthorized Error

Unauthorized

- `message` (string, required)

### 422 Unprocessable Entity Error

Empty list or more than 200 thread IDs

- `map from string to any`

### 500 Internal Server Error

Internal server error

- `map from string to any`

## Types

### AOPBatchStatusCountsOut

Run counts of a batch by canonical run status.

- `canceled` (integer, optional, default: 0)
- `completed` (integer, optional, default: 0)
- `failed` (integer, optional, default: 0)
- `needs_input` (integer, optional, default: 0)
- `queued` (integer, optional, default: 0)
- `running` (integer, optional, default: 0)
- `scheduled` (integer, optional, default: 0)

### ThreadStatusBatchItemOut

Lifecycle status of one thread (no messages).

- `is_terminal` (boolean, required) — True once the run is completed, failed or canceled
- `output_available` (boolean, required) — True once the run completed successfully and its result can be read from `GET /threads/{thread_id}/status`
- `status` (string, required) — Canonical run status: scheduled, queued, running, needs_input, completed, failed or canceled
- `thread_id` (string, required) — Thread ID; use `GET /threads/{thread_id}/status` for the result
- `aop_asset_id` (string, optional, nullable) — ID of the AOP asset the run executes
- `batch_id` (string, optional, nullable) — Batch handle when the thread was launched via execute-batch
- `client_ref` (string, optional, nullable) — Caller-supplied correlation key from the launch request
- `completed_at` (string, optional, nullable) — ISO timestamp when the run reached a terminal state
- `created_at` (datetime, optional, nullable) — When the run was queued
- `error` (string, optional, nullable) — Error message when the run failed
- `updated_at` (datetime, optional, nullable) — When the thread's lifecycle state last changed

## Examples

**Request**

```json
{
  "thread_ids": [
    "thread_12345-6789-abcd-efgh",
    "thread_22345-6789-abcd-efgh"
  ]
}
```

**Response**

```json
{
  "counts": {
    "canceled": 0,
    "completed": 1,
    "failed": 0,
    "needs_input": 0,
    "queued": 0,
    "running": 1,
    "scheduled": 0
  },
  "found": 2,
  "is_complete": false,
  "not_found": [
    "thread_unknown"
  ],
  "requested": 3,
  "terminal": 1,
  "threads": [
    {
      "is_terminal": true,
      "output_available": true,
      "status": "completed",
      "thread_id": "thread_12345-6789-abcd-efgh",
      "aop_asset_id": "asset_9249292-d118-42d3-95b4-00eccfe0754f",
      "completed_at": "2026-09-13T20:04:10+00:00",
      "created_at": "2026-09-13T20:00:00Z",
      "updated_at": "2026-09-13T20:04:10Z"
    },
    {
      "is_terminal": false,
      "output_available": false,
      "status": "running",
      "thread_id": "thread_22345-6789-abcd-efgh",
      "aop_asset_id": "asset_9249292-d118-42d3-95b4-00eccfe0754f",
      "batch_id": "batch_1f3c1b9e-7f7d-4c2c-9d5e-2b1f0a9c8d7e",
      "client_ref": "row-2",
      "created_at": "2026-09-13T20:00:02Z",
      "updated_at": "2026-09-13T20:00:05Z"
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://api.athenaintel.com/api/v0/threads/status-batch"

payload = { "thread_ids": ["thread_12345-6789-abcd-efgh", "thread_22345-6789-abcd-efgh"] }
headers = {
    "X-API-KEY": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.athenaintel.com/api/v0/threads/status-batch';
const options = {
  method: 'POST',
  headers: {'X-API-KEY': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"thread_ids":["thread_12345-6789-abcd-efgh","thread_22345-6789-abcd-efgh"]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.athenaintel.com/api/v0/threads/status-batch"

	payload := strings.NewReader("{\n  \"thread_ids\": [\n    \"thread_12345-6789-abcd-efgh\",\n    \"thread_22345-6789-abcd-efgh\"\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("X-API-KEY", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.athenaintel.com/api/v0/threads/status-batch")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"thread_ids\": [\n    \"thread_12345-6789-abcd-efgh\",\n    \"thread_22345-6789-abcd-efgh\"\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.athenaintel.com/api/v0/threads/status-batch")
  .header("X-API-KEY", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"thread_ids\": [\n    \"thread_12345-6789-abcd-efgh\",\n    \"thread_22345-6789-abcd-efgh\"\n  ]\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.athenaintel.com/api/v0/threads/status-batch', [
  'body' => '{
  "thread_ids": [
    "thread_12345-6789-abcd-efgh",
    "thread_22345-6789-abcd-efgh"
  ]
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-API-KEY' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.athenaintel.com/api/v0/threads/status-batch");
var request = new RestRequest(Method.POST);
request.AddHeader("X-API-KEY", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"thread_ids\": [\n    \"thread_12345-6789-abcd-efgh\",\n    \"thread_22345-6789-abcd-efgh\"\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "X-API-KEY": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["thread_ids": ["thread_12345-6789-abcd-efgh", "thread_22345-6789-abcd-efgh"]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.athenaintel.com/api/v0/threads/status-batch")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```