Create DigitQuery

Add a new DigitQuery to an account.

Notes

label

Name/Label for the DigitQuery.

soundfile

Sound File ID or Text to Speech string (prefixed with tts:).

maxdigits

Maximum digits allowed to enter.

mindigits

Minimum digits required to enter.

retries

Maximum retries allowed.

timeout

Timeout in seconds, if no input pressed.

invalid_prompt

Invalid prompt to be played or not.

callback_settings

Callback settings:

  • url - Callback URL
  • method - URL method GET, POST or JSON
  • url_username - URL authentication username
  • url_password - URL authentication password

match_pattern

Pattern to be matched to decide the destination.

match_destination

  • destination_type - Destination type if pattern matches.
  • destination - Destination ID if pattern matches.

nomatch_destination

  • destination_type - Destination type if pattern doesn't match.
  • destination - Destination ID if pattern doesn't match.

default_destination

  • destination_type - Default destination type.
  • destination - Default Destination ID.

email_options

  • email - Email address
  • subject - Email subject
  • body - Email body

Sample Response

{
  "digitquery": {
    "id": "452ced9c764024",
    "label": "452ced9c764024",
    "soundfile": "SF123456789",
    "maxdigits": 1,
    "mindigits": 1,
    "retries": 3,
    "timeout": 10,
    "invalid_prompt": true,
    "callback_settings": {
        "url": null,
        "url_method": null,
        "url_username": null,
        "url_password": null
    },
    "match_pattern": "",
    "match_destination": {
        "destination_type": "Forward",
        "destination": "3214991000"
    },
    "nomatch_destination": {
        "destination_type": "Hangup",
        "destination": ""
    },
    "default_destination": {
        "destination_type": "Voicemail",
        "destination": "V123456789"
    },
    "email_options": {
        "email": "",
        "subject": "",
        "body": ""
    },
    "active": true
  }
}

Response Properties

PropertyTypeDescription
DigitQueryobjectDigitQuery
Language
Authentication
Header
Click Try It! to start a request and see the response here!