post https://api.servetel.in/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 Name | Description | Data Type |
---|---|---|
name* | Name for the IVRS | String |
description* | Description for IVRS | String |
recording* | Unique ID of the recording | String |
timeout* | Time for which the IVRS will ring | Integer |
incorrect_count* | The number of times an invalid entry is allowed | Integer |
invalid_recording* | Recording to be played when an invalid entry is pressed | String |
invalid_destination* | If number of invalid retries reaches more than the value set then it goes to invalid destination | String |
timeout_retry_recording* | Recording to be played when Timeout entry is added | String |
timeout_recording* | Recording to be played after Timeout Retry count is more than set value | String |
timeout_destination* | If number of timeout retries reaches more than the value set then it goes to Timeout Destination | String |
timeout_tries* | The number of times Timeout Retry is allowed | Integer |
recording_invalid* | Recording to be played after invalid retry count is more than set value | String |
option* | Options allowed for IVRS | Array of Integers |
destination* | Destinations for options | Array of Strings |
Response variables
Variable Name | Description | Data Type |
---|---|---|
success | Request success status | Boolean |
message | Message corresponding success status | String |
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]}'