> ## Documentation Index
> Fetch the complete documentation index at: https://docs.shilo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieve Roleplay Transcript — Shilo API

> Retrieve the sanitized transcript for a roleplay call with AI-resolved speaker names. Available for all CRM integrations. Returns 409 Conflict until speaker resolution is complete.

Use this endpoint to retrieve the full transcript for a roleplay training call. Shilo sanitizes the raw recording transcript and applies AI-resolved speaker labels so that each segment is clearly attributed to the agent or the AI-simulated lead. Unlike transcripts for standard calls and appointments, roleplay transcripts are available regardless of your CRM integration — there is no Follow Up Boss restriction. Because speaker resolution depends on completed analysis, you should wait until the roleplay's `analysis.progress` field reaches `100` before requesting the transcript, or be prepared to handle a `409` response and retry.

## Endpoint

```
GET https://api.shilo.ai/api/v1/roleplays/{identifier}/transcript
```

## Authentication

All requests require your API key in the `x-api-key` header.

## Path Parameters

<ParamField path="identifier" type="string" required>
  The unique identifier for the roleplay. Two formats are accepted:

  * `{uuid}` — The Shilo roleplay UUID (e.g., `ee6f2136-b94a-4438-9335-3acf5b2a0d31`)
  * `call_event_id:{uuid}` — The Shilo Call Event UUID associated with this roleplay session (e.g., `call_event_id:ee6f2136-b94a-4438-9335-3acf5b2a0d31`)
</ParamField>

## Response

A successful request returns HTTP `200` with a transcript object. The exact shape of the transcript object may vary, but will include speaker-attributed text segments with timing information.

<Note>
  Roleplay transcripts are supported for all accounts regardless of CRM integration — unlike call and appointment transcripts, there is no Follow Up Boss restriction.
</Note>

<Note>
  The transcript response shape may vary. The example below shows a representative structure. Always treat the transcript as a free-form JSON object (`additionalProperties: true` in the OpenAPI spec).
</Note>

<Note>
  Fetch the transcript only after `analysis.progress` equals `100`. If speaker resolution is still in progress, the API returns `409 Conflict` — wait and retry.
</Note>

### Error Responses

| Status            | Description                                                                                                                            |
| ----------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| `400 Bad Request` | The `identifier` path parameter is malformed or uses an unsupported format.                                                            |
| `404 Not Found`   | No roleplay was found matching the provided identifier.                                                                                |
| `409 Conflict`    | The transcript is not yet ready. Analysis and speaker resolution are still in progress. Retry after `analysis.progress` reaches `100`. |

## Example Request

```bash theme={null}
curl --request GET \
  --url "https://api.shilo.ai/api/v1/roleplays/ee6f2136-b94a-4438-9335-3acf5b2a0d31/transcript" \
  --header "x-api-key: YOUR_API_KEY"
```

## Example Response

```json theme={null}
{
  "segments": [
    {
      "speaker": "Taylor Morgan",
      "text": "Hi, is this a good time? I'm reaching out because I noticed your team has been growing quickly and I think we can help you with your outreach process.",
      "start": 0.0,
      "end": 9.2
    },
    {
      "speaker": "AI Lead",
      "text": "We're actually already working with someone for that. I'm not sure we need another solution right now.",
      "start": 9.5,
      "end": 15.8
    },
    {
      "speaker": "Taylor Morgan",
      "text": "I completely understand — a lot of the teams we work with were in the same position. What I'd love to do is just share what makes us different and let you decide if it's worth a 20-minute conversation.",
      "start": 16.1,
      "end": 26.4
    },
    {
      "speaker": "AI Lead",
      "text": "Alright, I can spare 20 minutes. What day works for you?",
      "start": 26.7,
      "end": 31.0
    }
  ]
}
```
