# Create a call flow

`POST /calls/flows` · Rivier · voice

Create a call flow. It is checked in full first: every node a step names must exist, numbers must be valid, audio must be a public https address, and a recording step must say the call is recorded.

- Scope: voice:write
- Graphql: Mutation.voiceCallFlowCreate
- Sdk: calls.flows.create
- Cli: calls flow-create

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "flow": {
      "description": "The flow: { language, voice, start, nodes: { name: [steps] } }. Steps: say, play, pause, gather, dial, record, hours (branch on opening hours), redirect, hangup, reject. Checked in full before it is stored."
    }
  },
  "required": [
    "name"
  ],
  "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/flows' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "string"
}'
```
