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

# Get conversation with messages

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

Reference: https://docs.runtype.com/api-reference/runtype-api/conversations/get-conversation-with-messages

## Authentication

- `Authorization` header (bearer token, required) — API key or Clerk session token

## Servers

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

## Request

### Path parameters

- `id` (string, required)

## Response

### 200

Conversation detail

- `createdAt` (string, required)
- `id` (string, required)
- `messages` (list of ConversationTranscriptMessage, required)
- `metadata` (map from string to any, required)
- `modelId` (string, required, nullable)
- `ownerId` (string, required, nullable)
- `source` (enum, required)
  - Allowed values: `app`, `client_token`
- `systemPrompt` (string, required, nullable)
- `title` (string, required)
- `updatedAt` (string, required)
- `imported` (boolean, optional) — Set by POST /v1/conversations only. True when this call created the conversation (201); false when a conversation with the same source.system and source.externalId already existed and is returned unchanged (200).
- `schemaWarnings` (list of V1ConversationsIdGetResponsesContentApplicationJsonSchemaSchemaWarningsItems, optional)

## Errors

### 400 Bad Request Error

Invalid conversation ID

- `error` (string, required)
- `code` (string, optional) — Stable error code. `insufficient_scope` marks an API key that lacks a scope this request needs.
- `details` (list of ErrorDetailsItems, optional)
- `requiredScopes` (list of string, optional) — On `insufficient_scope`: every API key scope this request needs.

### 401 Unauthorized Error

Unauthorized

- `error` (string, required)
- `code` (string, optional) — Stable error code. `insufficient_scope` marks an API key that lacks a scope this request needs.
- `details` (list of ErrorDetailsItems, optional)
- `requiredScopes` (list of string, optional) — On `insufficient_scope`: every API key scope this request needs.

### 403 Forbidden Error

Insufficient permissions

- `error` (string, required)
- `code` (string, optional) — Stable error code. `insufficient_scope` marks an API key that lacks a scope this request needs.
- `details` (list of ErrorDetailsItems, optional)
- `requiredScopes` (list of string, optional) — On `insufficient_scope`: every API key scope this request needs.

### 404 Not Found Error

Conversation not found

- `error` (string, required)
- `code` (string, optional) — Stable error code. `insufficient_scope` marks an API key that lacks a scope this request needs.
- `details` (list of ErrorDetailsItems, optional)
- `requiredScopes` (list of string, optional) — On `insufficient_scope`: every API key scope this request needs.

### 500 Internal Server Error

Internal server error

- `error` (string, required)
- `code` (string, optional) — Stable error code. `insufficient_scope` marks an API key that lacks a scope this request needs.
- `details` (list of ErrorDetailsItems, optional)
- `requiredScopes` (list of string, optional) — On `insufficient_scope`: every API key scope this request needs.

## Types

### ConversationTranscriptMessage

- `content` (ConversationTranscriptMessageContent, required) — Plain string, or an array of \{type:"text"|"image"|"file"|"reasoning"|"asset\_ref"} parts.
- `role` (enum, required)
  - Allowed values: `system`, `user`, `assistant`, `tool`
- `author` (ConversationMessageAuthor, optional) — Who wrote this message in the source system. Stored and returned, never replayed.
- `createdAt` (string, optional) — ISO 8601 when Runtype mints it; any string is accepted on import.
- `id` (string, optional) — Minted when omitted. Use the source system id to make an import resumable.
- `metadata` (map from string to any, optional) — Open key/value bag. Runtype stamps `executionId` on a turn an agent wrote; treat it as optional.
- `model` (string, optional) — The model that wrote this assistant message. Informational on import: only a message the agent engine stored itself (marked server-side) replays its reasoning parts and provider options, and only to this same model.
- `toolCalls` (list of ConversationTranscriptMessageToolCallsItems, optional) — Assistant messages only. Every entry must be answered by the next tool message. An agent turn stores one assistant and tool message pair per model round, in order.
- `toolResults` (list of ConversationTranscriptMessageToolResultsItems, optional) — Tool messages only, and required on them.

### V1ConversationsIdGetResponsesContentApplicationJsonSchemaSchemaWarningsItems

- `code` (string, required)
- `field` (string, required)
- `message` (string, required)

### 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, …).

### ConversationTranscriptMessageContent

Plain string, or an array of \{type:"text"|"image"|"file"|"reasoning"|"asset\_ref"} parts.

- string
- list of ConversationTranscriptMessageContentOneOf1Items

### ConversationMessageAuthor

Who wrote this message in the source system. Stored and returned, never replayed.

- `type` (enum, required)
  - Allowed values: `end_user`, `operator`, `agent`, `system`
- `externalId` (string, optional) — The author id in the source system.
- `id` (string, optional) — The author id in Runtype, when there is one.
- `name` (string, optional)

### ConversationTranscriptMessageToolCallsItems

- `toolCallId` (string, required)
- `toolName` (string, required)
- `args` (map from string to any, optional, default: {})
- `providerOptions` (map from string to any, optional)

### ConversationTranscriptMessageToolResultsItems

- `toolCallId` (string, required) — Must answer a toolCalls entry issued earlier.
- `toolName` (string, required)
- `providerOptions` (map from string to any, optional)
- `result` (any, optional) — Whatever the tool returned.

### ConversationTranscriptMessageContentOneOf1Items

- ConversationTranscriptMessageContentOneOf1Items0
- ConversationTranscriptMessageContentOneOf1Items1
- ConversationTranscriptMessageContentOneOf1Items2
- ConversationTranscriptMessageContentOneOf1Items3
- ConversationTranscriptMessageContentOneOf1Items4

### ConversationTranscriptMessageContentOneOf1Items0

- `text` (string, required)
- `type` (enum, required)
  - Allowed values: `text`

### ConversationTranscriptMessageContentOneOf1Items1

- `image` (string, required)
- `type` (enum, required)
  - Allowed values: `image`
- `mimeType` (string, optional)

### ConversationTranscriptMessageContentOneOf1Items2

- `data` (string, required)
- `filename` (string, required)
- `mimeType` (string, required)
- `type` (enum, required)
  - Allowed values: `file`

### ConversationTranscriptMessageContentOneOf1Items3

- `text` (string, required)
- `type` (enum, required)
  - Allowed values: `reasoning`
- `providerOptions` (map from string to any, optional)

### ConversationTranscriptMessageContentOneOf1Items4

- `assetId` (string, required)
- `mimeType` (string, required)
- `orgKey` (string, required)
- `refKind` (enum, required)
  - Allowed values: `image`, `file`
- `sizeBytes` (double, required)
- `type` (enum, required)
  - Allowed values: `asset_ref`
- `filename` (string, optional)

## Examples

**Response**

```json
{
  "createdAt": "string",
  "id": "string",
  "messages": [
    {
      "content": "string",
      "role": "system",
      "author": {
        "type": "end_user",
        "externalId": "string",
        "id": "string",
        "name": "string"
      },
      "createdAt": "string",
      "id": "string",
      "metadata": {},
      "model": "string",
      "toolCalls": [
        {
          "toolCallId": "string",
          "toolName": "string",
          "args": {},
          "providerOptions": {}
        }
      ],
      "toolResults": [
        {
          "toolCallId": "string",
          "toolName": "string",
          "providerOptions": {},
          "result": null
        }
      ]
    }
  ],
  "metadata": {},
  "modelId": "string",
  "ownerId": "string",
  "source": "app",
  "systemPrompt": "string",
  "title": "string",
  "updatedAt": "string",
  "imported": true,
  "schemaWarnings": [
    {
      "code": "string",
      "field": "string",
      "message": "string"
    }
  ]
}
```

**SDK Code**

```python
import requests

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

headers = {"Authorization": "Bearer <token>"}

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

print(response.json())
```

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

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

	req.Header.Add("Authorization", "Bearer <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/conversations/id")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <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/conversations/id")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.runtype.com/v1/conversations/id', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.runtype.com/v1/conversations/id");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

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