---
title: "Replay"
method: POST
path: "/conversation_items/{id}/replay"
tags: ["conversationItems"]
---

# Replay

`POST /conversation_items/{id}/replay`

Returns the alternative response(s) the assistant would have
produced for this conversation turn given changes to the agent system prompt.

Only assistant items from ended conversations can be replayed. Omit the
request body (or omit `system_prompt`) to replay the turn exactly as it
originally ran.

## Path parameters

- `id` string, required

## Headers

- `Authorization` string, required

## Request body

- ReplayConversationItemRequest
  - `system_prompt` string — The system prompt to use when generating replay responses. Use this to test prompt changes against this conversation turn. Omit it to replay the turn with the system prompt it originally ran with.
  - `num_responses` integer — Number of alternative responses to generate.

## Response `200`

Success response

- ReplayConversationItemResponse
  - `responses` ReplayConversationItemResponseResponsesItems[], required — Alternative responses generated for the conversation item.
    - `text` string, required — The text the LLM produced for this replay response.
    - `tool_calls` ReplayToolCall[], required — Tool calls the LLM would invoke for this replay response - note that the tools will not actually be called during replay.
      - `tool` ReplayToolCallTool, required
        - `id` string, required — The tool ID.
        - `name` string, required — The tool name.
      - `endpoint_method` 'GET' | 'POST' — HTTP method for webhook tool calls.
      - `endpoint_url` string — URL for webhook tool calls.
      - `endpoint_headers` object, nullable — Headers for webhook tool calls.
      - `query_params` object, nullable — Query parameters the LLM produced for webhook tool calls.
      - `context` string — Context returned from custom-context tool calls.
      - `request_body` object, nullable, required — Request body the LLM produced for the tool call.

## Other responses

- `400` — Malformed JSON or invalid request body
- `401` — Unauthorized (authentication missing or invalid)
- `403` — Forbidden
- `404` — Conversation item not found
- `409` — Conversation is still live
- `422` — Conversation item cannot be replayed (not an assistant item, or the conversation's transcripts were deleted)
- `500` — Internal server error

---

[API](https://skmtc.net/phonic/apis/api-reference.md) · [All operations](https://skmtc.net/phonic/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/phonic/api-reference/revisions/7f8c81a5a990/schema)
