# Agents assistant thread record

`POST /agents/assistant/threads/{id}/record` · Rivier · agents

Keep the turns of an advisor conversation (what the person said and what the advisor answered), so history lists and reopens it. Not for the assistant's own conversations, which it writes itself.

- Scope: agents:write
- Sdk: agents.assistant.threadRecord
- Cli: agents assistant thread record

## Parameters

- `id` (path, required), string

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "messages": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "role": {
            "type": "string",
            "enum": [
              "user",
              "assistant"
            ]
          },
          "text": {
            "type": "string",
            "minLength": 1,
            "maxLength": 8000
          }
        },
        "required": [
          "role",
          "text"
        ],
        "additionalProperties": false
      },
      "minItems": 1,
      "maxItems": 6
    }
  },
  "required": [
    "messages"
  ],
  "additionalProperties": false
}
```

## Responses

- `201`: Success
- `400`: The request was malformed
- `401`: No valid credential
- `403`: The credential lacks the scope, origin or address
- `429`: Over the key's rate limit; see Retry-After

## Example

```sh
curl -X POST 'https://api.rivier.ai/agents/assistant/threads/{id}/record' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "messages": [
    {
      "role": "user",
      "text": "string"
    }
  ]
}'
```
