# For a session inside a business that granted agents:message

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

For a session inside a business that granted agents:message: a message typed as one of the parts the session's agent declared, to the business's own agent. Kept on both sides and raised in both streams (agents.message.sent; the business hears agents.message.received). The business's agent that answers platforms answers at once, with only the tools that need no person; otherwise the message waits for a person of the business. The session's agent sends the same by its built-in tool message_business.

- Scope: agents:write
- Graphql: Mutation.agentsPlatformMessageSend
- Sdk: agents.platformMessage.send
- Cli: agents platform message send

## Parameters

- `id` (path, required), string

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "pattern": "^[a-z][a-z0-9_]{0,47}$"
    },
    "text": {
      "type": "string",
      "minLength": 1,
      "maxLength": 8000
    },
    "data": {}
  },
  "required": [
    "type",
    "text"
  ],
  "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/platform-agents/sessions/{id}/messages' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "type": "string",
  "text": "string"
}'
```
