> 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.

# Download a cohort result

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

Download one of a succeeded cohort's results: `patients` (a zip with a folder per patient), `bulk` (the cohort as FHIR Bulk Data, a zip of NDJSON files), or `result` (the health system and each patient's status, JSON). Each can be downloaded **once**, within 24 hours.

Reference: https://docs.emtelligent.com/synth/api/cohorts/download-cohort-result-v-1-cohorts-cohort-id-results-name-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)
- `name` (enum, required)
  - Allowed values: `patients`, `bulk`, `result`

## Response

### 200

The file

- `string`

## 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, or that output wasn't requested (`not_found`)

- `error` (ErrorDetail, required)

### 409 Conflict Error

Not finished (`not_ready`), or failed or canceled (`no_result`)

- `error` (ErrorDetail, required)

### 410 Gone Error

Already downloaded, or expired (`result_expired`)

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

### 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.

## Examples

**Response**

```json
"string"
```

**SDK Code**

```python
import requests

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

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

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

print(response.json())
```

```javascript
const url = 'https://synth.emtelligent.com/v1/cohorts/cohort_id/results/patients';
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
package main

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

func main() {

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

	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
require 'uri'
require 'net/http'

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

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
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/results/patients")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

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

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

```csharp
using RestSharp;

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

```swift
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://synth.emtelligent.com/v1/cohorts/cohort_id/results/patients")! 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()
```