# One turn

`POST /platform-agents/sessions/{id}/turns` · Rivier · agents

One turn: the agent's first step, then its model, which may call the session's tools. A tool of tier approval waits for the customer's yes (the answer carries the approval) unless a mandate they gave covers it. With retain none, send the history you want considered; Rivier keeps no words. A turn the first step passes on, for an agent with no model, is refused with reason no_model.

- Scope: agents:write
- Graphql: Mutation.agentsPlatformSessionTurn
- Sdk: agents.platformSession.turn
- Cli: agents platform session turn

## Parameters

- `id` (path, required), string

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "text": {
      "type": "string",
      "minLength": 1,
      "maxLength": 8000
    },
    "history": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "role": {
            "type": "string",
            "enum": [
              "customer",
              "agent"
            ]
          },
          "text": {
            "type": "string",
            "maxLength": 8000
          }
        },
        "required": [
          "role",
          "text"
        ],
        "additionalProperties": false
      },
      "maxItems": 20,
      "default": []
    }
  },
  "required": [
    "text"
  ],
  "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/platform-agents/sessions/{id}/turns' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "text": "string"
}'
```
