# Send a text as an agent

`POST /agents/{id}/texts` · Rivier · agents

Send a text as an agent.

- Scope: agents:write
- Mcp: rivier_personas_sms_send
- Graphql: Mutation.agentsTextSend
- Sdk: agents.text.send
- Cli: agents text send
- Events: voice.text.sent

## Parameters

- `id` (path, required), string

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "numberId": {
      "type": "string",
      "format": "uuid"
    },
    "to": {
      "type": "string",
      "pattern": "^\\+\\d{6,15}$"
    },
    "text": {
      "type": "string",
      "minLength": 1,
      "maxLength": 1600
    },
    "firstContact": {
      "type": "boolean"
    }
  },
  "required": [
    "numberId",
    "to",
    "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/agents/{id}/texts' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "numberId": "string",
  "to": "string",
  "text": "string"
}'
```
