# Tell the assistant what you want done

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

Tell the assistant what you want done; it answers as a stream of events (words, plan, previews, approval requests, results).

- Scope: agents:write
- Sdk: agents.assistant.message
- Cli: agents assistant message

## Parameters

- `id` (path, required), string

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "minLength": 1,
      "maxLength": 8000
    },
    "mode": {
      "type": "string",
      "enum": [
        "ask",
        "plan",
        "do_with_approval",
        "do_within_rules"
      ],
      "default": "do_with_approval"
    },
    "mentions": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {},
        "additionalProperties": true
      },
      "maxItems": 20,
      "default": []
    },
    "attachments": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {},
        "additionalProperties": true
      },
      "maxItems": 5,
      "default": []
    }
  },
  "required": [
    "message"
  ],
  "additionalProperties": false
}
```

## Responses

- `200`: 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}/messages' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "message": "string"
}'
```
