> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.runtype.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.runtype.com/_mcp/server.

# Read one of the visitor's own conversations

GET https://api.runtype.com/v1/client/conversations/{id}

Return a single conversation with its message transcript. Answers 404 (never 403) for a conversation the caller does not own, so the route cannot be used to probe for other visitors' conversations. Every response carries `X-History-Identity-Status` (`not_provided` | `admitted` | `ignored`) reporting what the server did with a supplied `X-Identity-Proof`, so a widget can tell a verified action from a browser-scoped one. It is exposed via CORS; it grants no authority.

Reference: https://docs.runtype.com/api-reference/runtype-api/client-runtime/read-one-of-the-visitors-own-conversations

## Servers

- `https://api.runtype.com` (Production, default)
- `https://api.runtype-staging.com` (Staging)

## Request

### Path parameters

- `id` (string, required) — Conversation id from the list route.

### Query parameters

- `sessionId` (string, required) — Client session id from /client/init.
- `messageCursor` (string, optional) — Opaque cursor returned as `nextMessageCursor` by a previous detail response. Omit for the newest message page.
- `messageLimit` (string, optional) — Message page size as a decimal string. Defaults to 25 and is clamped to 25 to bound media rehydration and Worker memory.

### Headers

- `x-visitor-token` (string, required) — The browser's anonymous visitor secret (`cvt_…`) returned by `/client/init`. It is what scopes the request to one visitor's own conversations, so a request without it is refused. Sent as a header so it never lands in access logs or `Referer`.
- `x-identity-proof` (string, optional) — Optional fresh hosted end-user identity proof. When admitted and already bound to the presented visitor, expands the request from this exact browser to sibling visitors for the same verified person. Without it, even a previously bound visitor remains exact-browser scoped.

## Response

### 200

Conversation

- `conversationRevision` (string, required) — Opaque change token for this conversation. Compare for equality only — it is unordered and unparseable. It changes on every transcript mutation, including a display-projection finalization that deliberately leaves `updatedAt` untouched, so a client can tell whether a transcript it cached is still current. The same token is returned by `/client/init` and by the display-projections route.
- `createdAt` (string, required) — ISO-8601 timestamp of the first turn, i.e. when the conversation was created.
- `flowId` (string, required, nullable) — Deprecated alias of `targetId`, carrying the same value. Retained for clients written before the rename; read `targetId` instead.
- `id` (string, required) — Conversation id.
- `messageCount` (double, required) — Number of stored messages. Falls back to the length of the stored transcript when the conversation predates the counter.
- `messages` (list of V1ClientConversationsIdGetResponsesContentApplicationJsonSchemaMessagesItems, required) — The stored transcript, oldest first. Renderable fields only: tool invocations and other execution internals are not exposed here.
- `nextMessageCursor` (string, required, nullable) — Opaque cursor for the next older message page, or null when the beginning is reached.
- `preview` (string, required, nullable) — Plain-text excerpt of the conversation's most recent visitor-visible message, bounded to 140 Unicode code points, for a scannable history list. Derived from `displayContent` when the message has one and never from opaque model-only content, so it cannot become the one place internals leak. Null when the latest visible message has no text — including when its captured projection is deliberately empty.
- `targetId` (string, required, nullable) — The flow or agent this conversation ran against, and the exact value to pass as the `targetId` list/delete filter. Null for a conversation stored without one. Canonical replacement for `flowId`.
- `title` (string, required) — Display title. Uses a timestamp fallback unless conversation-title generation is enabled and produces a title from the opening exchange.
- `updatedAt` (string, required) — ISO-8601 timestamp of the most recent write. Sort key for "resume where I left off" in a widget.

## Errors

### 400 Bad Request Error

Missing or malformed `sessionId`

- `error` (string, required)
- `details` (list of ErrorDetailsItems, optional)

### 401 Unauthorized Error

Session expired, or missing/invalid visitor token

- `error` (string, required)
- `details` (list of ErrorDetailsItems, optional)

### 403 Forbidden Error

Client token inactive or origin mismatch

- `error` (string, required)
- `details` (list of ErrorDetailsItems, optional)

### 404 Not Found Error

No such conversation for this visitor

- `error` (string, required)
- `details` (list of ErrorDetailsItems, optional)

### 429 Too Many Requests Error

Rate limit exceeded for this client token or session. The response carries a `Retry-After` header with the advisory wait in seconds.

- `error` (string, required)
- `details` (list of ErrorDetailsItems, optional)

### 500 Internal Server Error

Internal server error

- `error` (string, required)
- `details` (list of ErrorDetailsItems, optional)

### 503 Service Unavailable Error

An `X-Identity-Proof` was supplied but end-user identity admission is not enabled for this token owner, so it cannot be evaluated (`identity_proof_not_admitted`). Nothing was read, deleted, or otherwise acted on. Retry without the proof to act at plain browser scope. Distinct from 401 `invalid_identity_proof`, which means the proof WAS evaluated and rejected.

- `error` (string, required)
- `details` (list of ErrorDetailsItems, optional)

## Types

### V1ClientConversationsIdGetResponsesContentApplicationJsonSchemaMessagesItems

- `displayAvailable` (boolean, required) — Whether this message has a visitor-renderable form at all — either a captured `displayContent`, or stored content that is plainly render-safe. False means the message exists in the transcript but its visible form cannot be reconstructed (a legacy message whose content was model-only); render a placeholder rather than anything derived from `content`.
- `id` (string, required) — Client-supplied or server-minted message id.
- `role` (string, required) — Message author, typically 'user' or 'assistant'.
- `content` (any, optional) — The MODEL channel content, exactly as stored: a plain string, or an array of multi-modal content parts. Absent on a stored message that carried no content, and deliberately WITHHELD when the message has no `displayContent` and its stored content is not plainly render-safe — opaque structure is not handed to a renderer that would show a visitor internals. Prefer `displayContent` for rendering whenever it is present.
- `displayContent` (string, optional) — The text a human actually saw for this message, as captured by the client. Present only when a projection was recorded; an empty string is a deliberate empty projection and is NOT the same as absence. Render this in preference to `content`. Plain text or Markdown, never rendered HTML, and never model input.
- `timestamp` (string, optional) — ISO-8601 send time. Absent on messages stored without one.

### ErrorDetailsItems

- `message` (string, required)
- `code` (string, optional) — Stable Runtype validation code (e.g. MISSING_REQUIRED_FIELD, INVALID_ENUM).
- `path` (string, optional) — Dotted JSON path to the offending field.
- `suggestion` (string, optional) — Actionable hint (allowed values, accepted range, …).

## Examples

**Response**

```json
{
  "conversationRevision": "string",
  "createdAt": "string",
  "flowId": "string",
  "id": "string",
  "messageCount": 1.1,
  "messages": [
    {
      "displayAvailable": true,
      "id": "string",
      "role": "string",
      "content": null,
      "displayContent": "string",
      "timestamp": "string"
    }
  ],
  "nextMessageCursor": "string",
  "preview": "string",
  "targetId": "string",
  "title": "string",
  "updatedAt": "string"
}
```

**SDK Code**

```python
import requests

url = "https://api.runtype.com/v1/client/conversations/id"

querystring = {"sessionId":"sessionId"}

headers = {"x-visitor-token": "x-visitor-token"}

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

print(response.json())
```

```javascript
const url = 'https://api.runtype.com/v1/client/conversations/id?sessionId=sessionId';
const options = {method: 'GET', headers: {'x-visitor-token': 'x-visitor-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://api.runtype.com/v1/client/conversations/id?sessionId=sessionId"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-visitor-token", "x-visitor-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://api.runtype.com/v1/client/conversations/id?sessionId=sessionId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-visitor-token"] = 'x-visitor-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://api.runtype.com/v1/client/conversations/id?sessionId=sessionId")
  .header("x-visitor-token", "x-visitor-token")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.runtype.com/v1/client/conversations/id?sessionId=sessionId', [
  'headers' => [
    'x-visitor-token' => 'x-visitor-token',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.runtype.com/v1/client/conversations/id?sessionId=sessionId");
var request = new RestRequest(Method.GET);
request.AddHeader("x-visitor-token", "x-visitor-token");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["x-visitor-token": "x-visitor-token"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.runtype.com/v1/client/conversations/id?sessionId=sessionId")! 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()
```