# Place a phone call that runs a call flow when answered

`POST /calls` · Rivier · voice

Place a phone call that runs a call flow when answered. Refused, with the reason, for an invalid or premium-rate number, a refused country, a number the project may not call from, an opted-out person (marketing), quiet hours (marketing), the hourly limit, or an exhausted plan allowance. Minutes are charged when the call ends.

- Scope: voice:write
- Mcp: rivier_call_place
- Graphql: Mutation.voiceCallPlace
- Sdk: calls.place
- Cli: calls place

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "to": {
      "type": "string",
      "minLength": 3,
      "maxLength": 40,
      "description": "The number to call, written with its country code: +9609123456"
    },
    "from": {
      "type": "string",
      "minLength": 3,
      "maxLength": 40,
      "description": "One of the project's calling numbers; the first one when left out"
    },
    "flowId": {
      "type": "string",
      "format": "uuid",
      "description": "The call flow that runs when the call is answered"
    },
    "purpose": {
      "type": "string",
      "enum": [
        "transactional",
        "marketing"
      ],
      "description": "Marketing calls respect opt-outs and quiet hours"
    },
    "vars": {
      "type": "object",
      "additionalProperties": {
        "type": "string",
        "maxLength": 200
      },
      "propertyNames": {
        "pattern": "^[A-Za-z0-9_]{1,40}$"
      },
      "description": "Values the flow can speak, used as {{name}}"
    },
    "maxSeconds": {
      "type": "integer",
      "minimum": 30,
      "maximum": 3600,
      "description": "The longest this call may run, in seconds; never more than the project's own maximum"
    },
    "liveWords": {
      "type": "boolean",
      "description": "Send the words of the call as voice.call.words events while it runs"
    },
    "placedBy": {
      "type": "string",
      "maxLength": 100
    }
  },
  "required": [
    "to",
    "flowId"
  ],
  "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/calls' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "to": "string",
  "flowId": "string"
}'
```
