> 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.

# List the visitor's own conversations

GET https://api.runtype.com/v1/client/conversations

List conversations belonging to the calling browser's anonymous visitor, newest first, cursor-paginated. Requires both a live `sessionId` and the `X-Visitor-Token` secret from `/client/init`; the site-wide client token alone can never reach this route. 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/list-the-visitors-own-conversations

## Servers

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

## Request

### Query parameters

- `sessionId` (string, required) — Client session id from /client/init.
- `targetId` (string, optional) — Only return conversations for this flow or agent id. Pass the `targetId` returned by `/client/init`.
- `flowId` (string, optional) — Deprecated alias of `targetId`. Sending both with different values is rejected 400; sending both with the same value is accepted.
- `cursor` (string, optional) — Opaque cursor returned as `nextCursor` by a previous page. Omit for the first page.
- `limit` (string, optional) — Page size as a decimal string. Defaults to 25, clamped to a maximum of 100. A non-numeric or non-positive value falls back to the default.

### 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

Conversations page

- `data` (list of V1ClientConversationsGetResponsesContentApplicationJsonSchemaDataItems, required) — Conversations owned by the calling visitor, newest first.
- `nextCursor` (string, required, nullable) — Opaque cursor for the next page, or null when exhausted.

## Errors

### 400 Bad Request Error

Missing or malformed `sessionId`, an undecodable `cursor`, `targetId` or `flowId` supplied empty (`invalid_target_filter`), or the two supplied with different values (`conflicting_target_filter`)

- `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)

### 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

### V1ClientConversationsGetResponsesContentApplicationJsonSchemaDataItems

- `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.
- `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.

### 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
{
  "data": [
    {
      "createdAt": "string",
      "flowId": "string",
      "id": "string",
      "messageCount": 1.1,
      "preview": "string",
      "targetId": "string",
      "title": "string",
      "updatedAt": "string"
    }
  ],
  "nextCursor": "string"
}
```

**SDK Code**

```python
import requests

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

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?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?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?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?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?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?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?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()
```