# GET personas

<mark style="color:green;">`GET`</mark>`/personas`

Provides a download URL to a zip file of personas from the active exercise.

The download URL is valid for 15mins after request.

**Headers**

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `Bearer <token>`   |

**Body**

Empty

**Response**

| `presigned_url` | string | URL to the persona zip file |
| --------------- | ------ | --------------------------- |

{% tabs %}
{% tab title="200" %}

```json
{
  "presigned_url": "https://...personas.zip?Expires=....Signature=...xxxx"
}
```

{% endtab %}

{% tab title="400" %}

```json
{
  "error": "Invalid request"
}
```

{% endtab %}
{% endtabs %}

#### Code segment

To access the personas, the flow is:

1. Call the Conducttr `/personas` endpoint to get a presigned URL
2. Download the ZIP file from that URL
3. Extract the first `.json` file from the archive - this will be an array of persona json objects&#x20;
4. Parse and return the JSON content - see the persona object here&#x20;

{% content-ref url="/pages/uHXlP3FdpYe3zEL6aE7E" %}
[Core concepts](/feature-documentation/api/core-concepts.md)
{% endcontent-ref %}

<details>

<summary>code segment</summary>

```
GET /api/personas endpoint

app.get("/api/personas", async (_req, res) => {
  const AUTH_KEY = process.env.AUTH_KEY;
  if (!AUTH_KEY) {
    return res.status(500).json({ error: "AUTH_KEY not configured" });
  }

  // Step 1: Get the presigned URL for the personas file
  const presignedRes = await fetch(
    "https://api.conducttr.com/v1.1/eagle/personas",
    {
      headers: { Authorization: `Bearer ${AUTH_KEY}` },
    }
  );

  if (!presignedRes.ok) {
    return res.status(presignedRes.status).json({
      error: "Failed to fetch personas presigned URL",
    });
  }

  const presignedData = await presignedRes.json();
  const zipUrl = presignedData.presigned_url;

  // Step 2: Download the ZIP file
  const zipRes = await fetch(zipUrl);
  const zipBuffer = await zipRes.arrayBuffer();

  // Step 3: Unzip and extract the JSON file
  const zip = await JSZip.loadAsync(zipBuffer);
  const jsonFileName = Object.keys(zip.files).find((name) =>
    name.endsWith(".json")
  );

  if (!jsonFileName) {
    return res.status(500).json({ error: "No JSON file found in ZIP" });
  }

  const jsonContent = await zip.files[jsonFileName].async("string");
  const personasData = JSON.parse(jsonContent);

  res.json(personasData);
});
```

</details>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://helpdocs.conducttr.com/feature-documentation/api/endpoint-reference/personas/get-personas.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
