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

# Get a cohort

GET https://synth.emtelligent.com/v1/cohorts/{cohort_id}

The cohort's status and progress, and once it has succeeded, a summary and the results to download.

Reference: https://docs.emtelligent.com/synth/api/cohorts/get-cohort-v-1-cohorts-cohort-id-get

## Authentication

- `Authorization` header (bearer token, required) — An API key, or an OAuth 2.0 access token, with the `synth:process` scope.

## Request

### Path parameters

- `cohort_id` (string, required)

## Response

### 200

Successful Response

- `id` (string, required)
- `status` (enum, required)
  - Allowed values: `queued`, `running`, `succeeded`, `failed`, `canceled`
- `created_at` (datetime, required)
- `size` (integer, required) — Patients requested.
- `max_documents` (integer, required) — Most documents the cohort can produce (size x documents per patient).
- `progress` (CohortProgress, required) — Patients by status.
- `started_at` (datetime, optional, nullable)
- `finished_at` (datetime, optional, nullable)
- `error` (JobError, optional, nullable) — Why the cohort failed, if it did.
- `summary` (CohortSummary, optional, nullable) — What was delivered, once succeeded.
- `results` (list of CohortResultFile, optional) — Files ready to download.
- `results_expire_at` (datetime, optional, nullable) — Files not downloaded by then are deleted.

## Errors

### 401 Unauthorized Error

Missing or invalid credentials (`invalid_credentials`)

- `error` (ErrorDetail, required)

### 402 Payment Required Error

Organization suspended or out of credit

- `error` (ErrorDetail, required)

### 404 Not Found Error

No such job for your organization (`not_found`)

- `error` (ErrorDetail, required)

### 422 Unprocessable Entity Error

The request is invalid (`request_validation`)

- `error` (ErrorDetail, required)

### 503 Service Unavailable Error

Temporarily unavailable; retry with backoff

- `error` (ErrorDetail, required)

## Types

### CohortProgress

- `queued` (integer, required)
- `running` (integer, required)
- `succeeded` (integer, required)
- `failed` (integer, required)
- `canceled` (integer, required)

### JobError

- `code` (string, required) — Why it failed, e.g. `invalid_request` or `generation_failed`.
- `message` (string, required) — What went wrong and what to do, for people.

### CohortSummary

- `patients` (integer, required)
- `succeeded` (integer, required)
- `failed` (integer, required)
- `canceled` (integer, required)
- `documents` (integer, required) — Clinical documents delivered.
- `failures` (list of PatientFailure, required) — Patients that failed; the others are delivered.
- `health_system` (HealthSystemSummary, required)
- `conditions` (ConditionCounts, optional, nullable)

### CohortResultFile

- `name` (enum, required) — Use in the download URL.
  - Allowed values: `patients`, `bulk`, `result`
- `filename` (string, required) — Suggested file name.
- `content_type` (string, required)
- `size_bytes` (integer, required)
- `url` (string, required) — Where to download it (once).

### ErrorDetail

- `code` (string, required) — Stable error code, e.g. `not_found`; branch on this.
- `message` (string, required) — What went wrong, for people. May change.
- `request_id` (string, required, nullable) — Also in the `X-Request-Id` header; quote it to support.

### PatientFailure

- `index` (integer, required) — The patient's position in the cohort, from 1.
- `error` (JobError, required, nullable)

### HealthSystemSummary

- `region` (string, required, nullable) — State or province.
- `country` (string, required, nullable)
- `facilities` (integer, required)
- `clinicians` (integer, required)

### ConditionCounts

- `requested` (list of RequestedCondition, required)
- `most_common` (list of CommonCondition, required) — Up to 15, most frequent first.

### RequestedCondition

- `name` (string, required) — As in the request.
- `proportion` (double, required)
- `assigned` (integer, required) — Patients it was given to.
- `code` (string, required, nullable) — SNOMED CT code it was coded as.
- `display` (string, required, nullable)
- `patients` (integer, required, nullable) — Patients who have it: those assigned it, and others in whom it arose, counting more specific kinds of it and conditions due to it (by the SNOMED CT hierarchy).

### CommonCondition

- `code` (string, required) — SNOMED CT code.
- `display` (string, required)
- `patients` (integer, required) — Patients with it, or a more specific kind of it.

## Examples

### A running cohort

**Response**

```json
{
  "id": "97aaea8a-1f20-4285-bd4b-18bcf3a41c10",
  "status": "running",
  "created_at": "2026-10-15T07:40:11.341285Z",
  "size": 5,
  "max_documents": 40,
  "progress": {
    "queued": 3,
    "running": 1,
    "succeeded": 1,
    "failed": 0,
    "canceled": 0
  },
  "started_at": "2026-10-15T07:40:12.541807Z",
  "finished_at": null,
  "error": null,
  "summary": null,
  "results": [],
  "results_expire_at": null
}
```

**SDK Code**

```python A running cohort
import requests

url = "https://synth.emtelligent.com/v1/cohorts/cohort_id"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript A running cohort
const url = 'https://synth.emtelligent.com/v1/cohorts/cohort_id';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

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

```go A running cohort
package main

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

func main() {

	url := "https://synth.emtelligent.com/v1/cohorts/cohort_id"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

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

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

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

}
```

```ruby A running cohort
require 'uri'
require 'net/http'

url = URI("https://synth.emtelligent.com/v1/cohorts/cohort_id")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

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

```java A running cohort
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://synth.emtelligent.com/v1/cohorts/cohort_id")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://synth.emtelligent.com/v1/cohorts/cohort_id', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp A running cohort
using RestSharp;

var client = new RestClient("https://synth.emtelligent.com/v1/cohorts/cohort_id");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift A running cohort
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://synth.emtelligent.com/v1/cohorts/cohort_id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

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()
```

### A succeeded cohort

**Response**

```json
{
  "id": "97aaea8a-1f20-4285-bd4b-18bcf3a41c10",
  "status": "succeeded",
  "created_at": "2026-10-15T07:40:11.341285Z",
  "size": 5,
  "max_documents": 40,
  "progress": {
    "queued": 0,
    "running": 0,
    "succeeded": 5,
    "failed": 0,
    "canceled": 0
  },
  "started_at": "2026-10-15T07:40:12.541807Z",
  "finished_at": "2026-10-15T07:45:05.567790Z",
  "error": null,
  "summary": {
    "patients": 5,
    "succeeded": 5,
    "failed": 0,
    "canceled": 0,
    "documents": 24,
    "failures": [],
    "health_system": {
      "region": "TX",
      "country": "US",
      "facilities": 7,
      "clinicians": 16
    },
    "conditions": {
      "requested": [],
      "most_common": [
        {
          "code": "38341003",
          "display": "Hypertensive disorder",
          "patients": 4
        },
        {
          "code": "44054006",
          "display": "Type 2 diabetes mellitus",
          "patients": 4
        },
        {
          "code": "55822004",
          "display": "Hyperlipidemia",
          "patients": 4
        },
        {
          "code": "302226006",
          "display": "Peripheral nerve disease",
          "patients": 3
        },
        {
          "code": "36689008",
          "display": "Acute pyelonephritis",
          "patients": 3
        },
        {
          "code": "42343007",
          "display": "Congestive heart failure",
          "patients": 3
        },
        {
          "code": "433146000",
          "display": "Chronic kidney disease stage 5",
          "patients": 3
        },
        {
          "code": "59621000",
          "display": "Essential hypertension",
          "patients": 3
        },
        {
          "code": "96311000119109",
          "display": "Exacerbation of congestive heart failure",
          "patients": 3
        },
        {
          "code": "127013003",
          "display": "Disorder of kidney due to diabetes mellitus",
          "patients": 2
        },
        {
          "code": "707323002",
          "display": "Anemia in chronic kidney disease",
          "patients": 2
        },
        {
          "code": "78275009",
          "display": "Obstructive sleep apnea syndrome",
          "patients": 2
        },
        {
          "code": "11833591000119105",
          "display": "Sprain of right ankle",
          "patients": 1
        },
        {
          "code": "1296659009",
          "display": "Acute exacerbation of chronic heart failure",
          "patients": 1
        },
        {
          "code": "13645005",
          "display": "Chronic obstructive pulmonary disease",
          "patients": 1
        }
      ]
    }
  },
  "results": [
    {
      "name": "patients",
      "filename": "cohort_patients.zip",
      "content_type": "application/zip",
      "size_bytes": 242116,
      "url": "/v1/cohorts/97aaea8a-1f20-4285-bd4b-18bcf3a41c10/results/patients"
    },
    {
      "name": "result",
      "filename": "cohort.json",
      "content_type": "application/json",
      "size_bytes": 6609,
      "url": "/v1/cohorts/97aaea8a-1f20-4285-bd4b-18bcf3a41c10/results/result"
    }
  ],
  "results_expire_at": "2026-10-16T07:45:05.567790Z"
}
```

**SDK Code**

```python A succeeded cohort
import requests

url = "https://synth.emtelligent.com/v1/cohorts/cohort_id"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript A succeeded cohort
const url = 'https://synth.emtelligent.com/v1/cohorts/cohort_id';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

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

```go A succeeded cohort
package main

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

func main() {

	url := "https://synth.emtelligent.com/v1/cohorts/cohort_id"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

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

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

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

}
```

```ruby A succeeded cohort
require 'uri'
require 'net/http'

url = URI("https://synth.emtelligent.com/v1/cohorts/cohort_id")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

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

```java A succeeded cohort
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://synth.emtelligent.com/v1/cohorts/cohort_id")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://synth.emtelligent.com/v1/cohorts/cohort_id', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp A succeeded cohort
using RestSharp;

var client = new RestClient("https://synth.emtelligent.com/v1/cohorts/cohort_id");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift A succeeded cohort
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://synth.emtelligent.com/v1/cohorts/cohort_id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

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()
```