Create an IVR

This API allows you to create a new IVR.

Sample Request

curl --request POST \
     --url https://api.servetel.in/v1/ivr \
     --header 'accept: application/json' \
     --header 'content-type: application/json'

šŸ“˜ Important!

Before we begin, note that the * sign denotes the mandatory variables in each table.

Request Variables (Body Params)

The following parameter is required to create an IVR:

Variable NameDescriptionData Type
name*Name of the IVR.String
description*Description of the IVR.String
recording*Unique ID of the recording.String
timeout*Time to wait for user input after recording ends.String
option*Options allowed for IVR.Array of Strings.
destination*Where the call should land corresponding to IVR option.eg: extension|eid, agent's eid eg: 050160000Array of Strings
incorrect_count*Number of retries allowed after invalid inputs.String
invalid_recording*Unique ID of the recording that needs to be played when an invalid option is pressed.String
invalid_destination*Destination where the call should land when invalid option is selected. eg: extension|eid, agent's eid eg: 050160000String
timeout_retry_recording*Unique ID of the recording that needs to be played when timeout on retry occurs.String
timeout_recording*Unique ID of the recording that needs to be played when timeout expires.String
timeout_destination*Destination where the call needs to land when timeout occurs. eg: extension|eid, agent's eid eg: 050160000String
timeout_tries*The number of times Timeout Retry is allowed.String
sms_template*Unique ID of SMS Template to be associated with IVR Option, only applicable if SMS Template setting is enabled for user account.Array of Strings

Response Variables

The response returned is as following:

Variable NameDescriptionData Type
SuccessThe request success status, the possible values are: True (default) for success. False for failure.Boolean
MessageThe message corresponding to the success status. For example, in 400 Response where the "success" variable pops as True, the message displayed is shown here.String

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!