---
title: "Gather"
method: POST
path: "/calls/{call_control_id}/actions/gather"
tags: ["Call Commands"]
---

# Gather

`POST /calls/{call_control_id}/actions/gather`

Gather DTMF signals to build interactive menus.

You can pass a list of valid digits. The `Answer` command must be issued before the `gather` command.

**Expected Webhooks:**

- `call.dtmf.received` (you may receive many of these webhooks)
- `call.gather.ended`

## Path parameters

- `call_control_id` string, required

## Request body

- GatherRequest
  - `minimum_digits` integer — The minimum number of digits to fetch. This parameter has a minimum value of 1.
  - `maximum_digits` integer — The maximum number of digits to fetch. This parameter has a maximum value of 128.
  - `timeout_millis` integer — The number of milliseconds to wait to complete the request.
  - `inter_digit_timeout_millis` integer — The number of milliseconds to wait for input between digits.
  - `initial_timeout_millis` integer — The number of milliseconds to wait for the first DTMF.
  - `terminating_digit` string — The digit used to terminate input if fewer than `maximum_digits` digits have been gathered.
  - `valid_digits` string — A list of all digits accepted as valid.
  - `gather_id` string — An id that will be sent back in the corresponding `call.gather.ended` webhook. Will be randomly generated if not specified.
  - `client_state` string — Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.
  - `command_id` string — Use this field to avoid duplicate commands. Telnyx will ignore any command with the same `command_id` for the same `call_control_id`.

## Response `200`

Successful response upon making a call control command.

- object
  - `data` CallControlCommandResult
    - `result` string

## Other responses

- `422` — Unprocessable entity. The request was well-formed but could not be processed due to semantic errors. This includes validation errors, invalid parameter values, call state errors, conference errors, queue errors, recording/transcription errors, and business logic violations.
- `default` — Unexpected error

---

[API](https://skmtc.net/team-telnyx/apis/telnyx-api.md) · [All operations](https://skmtc.net/team-telnyx/apis/telnyx-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/team-telnyx/telnyx-api/revisions/e32d46c5945b/schema)
