post https://api.servetel.in/v1/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 Name | Description | Data 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: 050160000 | Array 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: 050160000 | String |
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: 050160000 | String |
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 Name | Description | Data Type |
---|---|---|
Success | The request success status, the possible values are: True (default) for success. False for failure. | Boolean |
Message | The 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]}'