/v1/ivr

Add a IVR

Using the below method an IVRS (Interactive Voice Response System) can be created

curl --request POST \
  --url https://api.servetel.in/v1/ivr \
  --header 'accept: application/json' \
  --header 'authorization: Bearer yourtokenhere' \
  --header 'content-type: application/json' \
  --data '{}'

Request variables

Variable NameDescriptionData Type
name*Name for the IVRSString
description*Description for IVRSString
recording*Unique ID of the recordingString
timeout*Time for which the IVRS will ringInteger
incorrect_count*The number of times an invalid entry is allowedInteger
invalid_recording*Recording to be played when an invalid entry is pressedString
invalid_destination*If number of invalid retries reaches more than the value set then it goes to invalid destinationString
timeout_retry_recording*Recording to be played when Timeout entry is addedString
timeout_recording*Recording to be played after Timeout Retry count is more than set valueString
timeout_destination*If number of timeout retries reaches more than the value set then it goes to Timeout DestinationString
timeout_tries*The number of times Timeout Retry is allowedInteger
recording_invalid*Recording to be played after invalid retry count is more than set valueString
option*Options allowed for IVRSArray of Integers
destination*Destinations for optionsArray of Strings

Response variables

Variable NameDescriptionData Type
successRequest success statusBoolean
messageMessage corresponding success statusString

🚧

Some fields are to be entered in specific format

  • Recording

Format: type || ID
Allowed Types: recording, outbound_tts
Example: recording||1

  • Destination

Format: type || ID
Allowed Types: extension, voicemail, department, timegroup, ivr, time_condition, hangup
Example: extension||0500000000

Sample Request

curl --request POST \
  --url https://api.servetel.in/v1/ivr \
  --header 'accept: application/json' \
  --header 'authorization: Bearer yourtokenhere' \
  --header 'content-type: application/json' \
  --data '{"name": "Test IVR Name","description": "Test IVR Description","recording": "recording||1","timeout": 30,"destination": ["extension||05000000"],"incorrect_count": "1","invalid_recording": "recording||166","invalid_destination": "extension||05000000","timeout_retry_recording": "recording||1","timeout_recording": "recording||1","timeout_destination": "extension||05000000","timeout_retries": 1,"recording_invalid": "recording||1","timeout_tries": 5,"option": [1]}'
Language
Click Try It! to start a request and see the response here!