# Options, replies & submenus (/docs/options)

`options` is a list of what the person can choose. Each option has a `label` and, optionally, a `reply` that we read right after it is chosen:

```json
{
  "to": "+34600111222",
  "message": "Hi! This is La Plaza about your table for 4 tonight at 8:30 pm.",
  "options": [
    { "label": "Confirm", "reply": "Perfect, see you tonight!" },
    { "label": "Cancel", "reply": "No problem, your booking is cancelled." }
  ],
  "webhook_url": "https://laplaza.example/hooks/callhuman"
}
```

What the person hears:

<CallTranscript lines={[{"from":"callhuman","kind":"message","text":"Hi! This is La Plaza about your table for 4 tonight at 8:30 pm."},{"from":"callhuman","kind":"menu","text":"Press 1 or say “confirm”. Press 2 or say “cancel”."},{"from":"person","via":"voice","text":"Yes, we'll be there, don't cancel it"},{"from":"callhuman","kind":"reply","text":"Perfect, see you tonight!"}]} />

## Option fields [#option-fields]

| Field | Required | Description |
|---|---|---|
| `label` | Yes | What is offered: “Press 1 or say *label*”. The first option is key 1, the second key 2, and so on. |
| `reply` | No | Read right after the person chooses this option, then the call ends. Without it, the call ends as soon as they choose. |
| `options` | No | A submenu: choosing this option opens more options instead of ending the call. Cannot be combined with `reply`. |

## Keypress or voice [#keypress-or-voice]

Both always work; there is nothing to enable.

- **Keypress:** the person presses 1–9.
- **Voice:** the person says the option in their own words. We match the **meaning**, not the exact words: “sure, go ahead” → *Yes*, “yes, we'll be there, don't cancel it” → *Confirm*.
- If we are not sure what they meant, **we repeat the options instead of guessing**. After 2 repetitions with no valid answer, the call ends with nothing chosen (`option_path: []`).

## Replies [#replies]

A `reply` tells the person their answer was received and what happens next. It is optional: for a simple yes/no you can leave it out and we hang up as soon as they choose.

```json
"options": [
  { "label": "Yes" },
  { "label": "No" }
]
```

## Submenus [#submenus]

Nobody wants to hear eight options in a row. Put the main ones first and group the rest in a submenu:

```json
{
  "to": "+34600555666",
  "message": "Hi! Your order 1042 for 45 euros, cash on delivery, ships tomorrow.",
  "options": [
    { "label": "Confirm", "reply": "Great, it ships tomorrow." },
    { "label": "Cancel", "reply": "Your order is cancelled." },
    {
      "label": "Change something",
      "options": [
        { "label": "Change the address", "reply": "We'll text you a link to change it." },
        { "label": "Deliver another day", "reply": "We'll call you to pick a day." }
      ]
    }
  ],
  "webhook_url": "https://shop.example/hooks/callhuman"
}
```

<CallTranscript title="With a submenu" lines={[{"from":"callhuman","kind":"menu","text":"Press 1 to confirm, 2 to cancel, 3 to change something."},{"from":"person","via":"keypress","text":"3"},{"from":"callhuman","kind":"menu","text":"Press 1 to change the address, 2 to deliver another day. Press 0 to go back."},{"from":"person","via":"voice","text":"Another day, please"},{"from":"callhuman","kind":"reply","text":"We'll call you to pick a day."}]} />

The result tells you the full path:

```json
{
  "id": "call_c55n1",
  "status": "answered",
  "option_path": [3, 2],
  "option_label": "Deliver another day",
  "metadata": {}
}
```

### Rules [#rules]

| Rule | Value |
|---|---|
| Options per menu | Up to **9** (keys 1–9) |
| Levels | Up to **3** in total (main menu + 2 submenu levels) |
| Go back | In any submenu, **0** or saying “back” returns to the previous menu. Key 0 cannot be an option. |
| `reply` and `options` together | Not allowed: an option either ends the call or opens a submenu |
| Voice matching | Only against the options of the current menu (plus “back”) |
| Retries | A retried call starts again from the message and the main menu |

Breaking a rule returns [`invalid_request`](/docs/errors#invalid_request) with the exact menu to fix, for example:

```json
{
  "error": {
    "code": "invalid_request",
    "message": "options[2].options has 12 items; the maximum per menu is 9 (keys 1–9). Group the rest into a submenu.",
    "docs_url": "https://www.callhuman.es/docs/errors#invalid_request"
  }
}
```

## Length limit [#length-limit]

Your plan limits the total characters of `message` **plus every `label` and `reply`**, submenus included. Speech runs at about 800–900 characters per minute, so 500 characters is roughly 35 seconds. Too long returns [`message_too_long`](/docs/errors#message_too_long) before any call is made — we never cut a call halfway.