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

# Get turn spans

> The spans of one turn of a conversation.

Returns the spans that belong to a single turn, with the same span shape as [get conversation spans](https://docs.poly.ai/api-reference/traces/endpoint/get-conversation-trace.md). Use it after the [timeline](https://docs.poly.ai/api-reference/traces/endpoint/get-conversation-timeline.md) has pointed you at a slow or failing turn.

## Request

### Headers

**X-API-KEY** `string` *required*

Account API key with read access to conversations.

### Path parameters

**conversation\_id** `string` *required*

The conversation.

**turn\_index** `integer` *required*

0-based turn.

### Query parameters

**project\_id** `string`

The agent the conversation belongs to. Optional with an account API key.

## Response

**conversation\_id** `string`

**project\_id** `string`

**turn\_index** `integer`

**total** `integer`

Number of spans returned, at most 1,000.

**spans** `object[]`

Same fields as in [get conversation spans](https://docs.poly.ai/api-reference/traces/endpoint/get-conversation-trace.md#response), ordered by `timestamp` ascending.

## Example

```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl "https://api.us.poly.ai/api/v1/traces/conversations/CA3f2c1e9d6b7a4f8e9c0d1b2a3c4d5e6f/turns/10?project_id=PROJECT-V258TF29" \
  -H "X-API-KEY: YOUR_API_KEY"
```

## Errors

| Status | Meaning |
| - | - |
| `401` | Missing or invalid API key. |
| `403` | The key cannot read conversations. |
| `404` | The conversation has no spans for that turn, or belongs to another account. |
| `502` | The trace backend did not answer. |
