# Walk a call flow without placing a call

`POST /calls/flows/simulate` · Rivier · voice

Walk a call flow without placing a call: give the flow and what the caller presses or says at each question, and get back what the line would say and do, and the question it waits at next. Uses the same checks and routing as a real call.

- Scope: voice:write
- Mcp: rivier_call_flow_simulate
- Graphql: Mutation.voiceCallFlowSimulateCreate
- Sdk: calls.flows.simulate
- Cli: calls flow-simulate

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "flow": {
      "description": "The flow to walk, as it would be stored"
    },
    "answers": {
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 80
      },
      "maxItems": 60,
      "description": "What the caller did at each question, in order: a key such as 1, a spoken word, an empty string for nothing; at a transfer answered or no-answer; at a recording notice agree or decline"
    },
    "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}}"
    },
    "hours": {
      "type": "string",
      "enum": [
        "now",
        "open",
        "closed"
      ],
      "description": "For opening hours: use the clock, or pretend the call comes inside or outside them"
    }
  },
  "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/calls/flows/simulate' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "flow": null,
  "answers": [
    "string"
  ],
  "vars": {},
  "hours": "now"
}'
```
