Update an IVR
Update an IVR in a tenant.
Request URL
PUT {base_url}/uc-cconfig/api/v1/ivrs/{id}
Request parameters
- Headers
-
Parameter Required Type Description Authorization Yes String The access token used for authentication. Format: Bearer
{access_token}.x-tenant-code Yes String The tenant name. Note: You can obtain tenant name using the Query Tenants interface.
- Path parameters
-
Parameter Required Type Description id Yes String The ID of the IVR to update. Note: You can obtain the ID using the Search IVRs interface.
- Body parameters
-
Parameter Required Type Description name No String The name of the IVR. joinAnnouncement No String The prompt played when a caller enters the IVR. Valid value:default- Custom prompt ID.Note: You can obtain the ID using the GET /uc-cconfig/api/v1/sounds/options/custom-prompts interface.
repeatAnnouncements No Array<String> The prompt played to remind callers of the available IVR options when they don't provide input within the configured response timeout.
Valid value:
default- Custom prompt ID.Note: You can obtain the ID using the GET /uc-cconfig/api/v1/sounds/options/custom-prompts interface.
Note: Up to 10 prompts are supported.maxTimeout No Integer The maximum number of times
repeatAnnouncementscan be played when the caller does not provide input within the configuredresponseTimeout.Valid value: 1 to 5
responseTimeout No Integer The time (in seconds) the system waits for caller input after playing joinAnnouncementorrepeatAnnouncements.interDigitTimeout No Integer The time (in seconds) the system waits for the caller to enter the next digit. alertInfo No String The alert-info text to be added to the Alert-Info header of INVITE requests, which is used to trigger IP phones to play a specific ringtone when receiving an IVR call.
dialUser No Object<User_List> The configuration for allowing callers to reach internal users through the IVR. dialCallFeature No Object<Call_Feature_List> The configuration for allowing callers to reach ring groups or queues through the IVR. dialOutboundRoutes No Object<Outbound_Route_List> The configuration for allowing callers to reach external numbers through outbound routes via the IVR. keyPressEvents No Object<Keypress_List> The configuration for keypress events. timeoutDestination No Object<Destination> The destination to route the call when the caller does not provide any input after
maxTimeoutis reached.invalidDestination No Object<Destination> The destination to route the call when the caller enters a digit that is not defined in the IVR menu.
timeBasedRoutingEnabled No Boolean Whether to enable time-based routing. Valid value:true: Enabledfalse: Disabled
timeBasedRoutingProfileId No String The ID of the business hours profile used for time-based routing. timeBasedRoutingConfig No Object<Time_Based_Routing> The time-based routing configuration. directDidIds No Object<Direct_DID_List> The DID numbers associated with the IVR.
- User_List
-
Parameter Required Type Description enabled No Boolean Whether to enable direct dialing to internal users. Valid value:true: Enabledfalse: Disabled
mode No String The direct dialing mode. ALL: Allow callers to reach all users.ALLOWED: Allow callers to reach only the specified users.RESTRICTED: Allow callers to reach all users except the specified users.
userIds No Object<User_ID> The IDs of internal users. Note: This parameter is required only whenmodeisALLOWEDorRESTRICTED.
- User_ID
-
Parameter Required Type Description values No Array<String> The IDs of internal users. Note: You can obtain user ID using the Get Available Users for IVRs interface.
- Call_Feature_List
-
Parameter Required Type Description enabled No Boolean Whether to allow callers to reach ring groups or queues through the IVR. Valid value:
true: Enabledfalse: Disabled
items No Object<Call_Feature_Items> The list of ring groups or queues that callers can dial through the IVR.
- Call_Feature_Items
-
Parameter Required Type Description values No Array<Call_Feature_Item> The list of ring groups or queues that callers can dial through the IVR.
- Call_Feature_Item
-
Parameter Required Type Description type No String The type of call feature. Valid value:
FEATURE_RING_GROUP: Ring GroupFEATURE_QUEUE: Queue
value No String The ID of the ring group or queue. Note: You can obtain the ID using the Get Available Ring Groups for IVRs and Get Available Queues for IVRs interfaces.
- Outbound_Route_List
-
Parameter Required Type Description enabled No Boolean Whether to allow callers to reach external numbers through outbound routes via the IVR. Valid value:true: Enabledfalse: Disabled
routeIds No Object<Outbound_Route_Item> The list of outbound routes callers can use to reach external numbers via the IVR.
- Outbound_Route_Item
-
Parameter Required Type Description values No Array<String> The list of outbound route IDs. Note: You can obtain the IDs using the Get Available Outbound Routes for IVRs interface.
- Keypress_List
-
Parameter Required Type Description {keypress} No String The key pressed by the caller. Valid value:0-9*#
{destination} No Object<Destination> The destination for the keypress event.
- Time_Based_Routing_Config
-
Parameter Required Type Description holidayHandling No String The holiday handling mode. Valid value:
route: Route IVR calls during holidays to a specific destination.ignore: Ignore holidays and route calls according to the business hours settings.
outsideDestination No Object<Destination> The destination for IVR calls received outside business hours. holidayDestination No Object<Destination> The destination for IVR calls received during holidays.
- Destination
-
Parameter Required Type Description type No String The destination type. Valid value:
USERUSER_VOICEMAILIVRRING_GROUPQUEUEEXTERNAL_NUMBERHANGUPPLAY_PROMPT: Play the prompt and hang up.PLAY_PROMPT_RETURN_IVR: Play the prompt and return to the IVR.PLAY_IVR_PROMPT: Play the IVR prompt and return to the IVR.
value No String The destination value. Note: This parameter is required in the following circumstances:- When
typeisUSERorUSER_VOICEMAIL, you need to specify User ID, which can be obtained from the Get Available Users for IVRs interface. - When
typeisIVR,RING_GROUP, orQUEUE, you need to specify call feature ID, which can be obtained from the Get Available IVRs for IVRs, Get Available Ring Groups for IVRs, and Get Available Queues for IVRs interfaces. - When
typeisPLAY_PROMPTorPLAY_PROMPT_RETURN_IVR, you need to specify custom prompt ID, which can be obtained from the GET /sounds/options/custom-prompts interface.
prefix No String The dial-out prefix. Note: This parameter applies only whentypeisEXTERNAL_NUMBER.turnOffRecording No Boolean Whether to turn off call recording. Valid value:true: Enabledfalse: Disabled
Note: This parameter applies only whentypeisUSER,IVR,RING_GROUP, orQUEUE.repeatCount No Integer The number of times to play the prompt when typeisPLAY_PROMPTorPLAY_PROMPT_RETURN_IVR.
- Direct_DID_List
-
Parameter Required Type Description didIds No Array<String> The unique identifier of the DID number. Note: You can obtain the ID using the POST /uc-cconfig/api/v1/dids/search-page interface.force No Boolean Whether to forcibly replace the occupied DID bindings. Valid value:true: If the DID number is occupied, the old binding is deleted and the DID number is associated with the IVR.false: If the DID number is occupied, the request fails withDID_DIRECT_OCCUPIEDresponse.
warningDidIds No Array<String> The DIDs that are pre-authorized for replacement when forceisfalse.Note: A DID in this list is replaced directly; a DID not in this list causesDID_DIRECT_OCCUPIED.
Response parameters
| Parameter | Type | Description |
|---|---|---|
| requestId | String | The unique ID of the request, which can be used to quickly locate the request. |
| code | String | The HTTP status code of the request.
|
| message | String | The status message of the request. |
| detailMessage | String | The detailed error information. When the request is successful, this parameter returns empty. |
| result | Object<IVR> | The details of the IVR. |
- IVR
-
Parameter Type Description id String The unique identifier of the IVR. extension String The extension number of the IVR. name String The name of the IVR. joinAnnouncement String The prompt played when a caller enters the IVR. repeatAnnouncements Array<String> The prompt played to remind callers of the available IVR options when no input is received within the response timeout. maxTimeout Integer The maximum number of times the repeatAnnouncementscan be played when no input is received within the configuredresponseTimeout.responseTimeout Integer The number of seconds the system waits for caller input after playing the joinAnnouncementorrepeatAnnouncements.interDigitTimeout Integer The number of seconds the system waits for the caller to enter the next digit. alertInfo String The alert-info text added to the Alert-Info header of INVITE requests to trigger IP phones to play a specific ringtone when receiving an IVR call. dialUser Object<User_List> The configuration for allowing callers to reach internal users through the IVR. dialCallFeature Object<Call_Feature_List> The configuration for allowing callers to reach ring groups or queues through the IVR. dialOutboundRoutes Object<Outbound_Route_List> The configuration for allowing callers to reach external numbers through outbound routes via the IVR. keyPressEvents Object<Keypress_List> The configuration for keypress events. timeoutDestination Object<Destination> The destination to route the call when the caller does not provide any input after maxTimeoutis reached.invalidDestination Object<Destination> The destination to route the call when the caller enters a digit that is not defined in the IVR menu. timeBasedRoutingEnabled Boolean Whether time-based routing is enabled. true: Enabledfalse: Disabled
timeBasedRoutingProfileId String The ID of the business hours profile associated with time-based routing. timeBasedRoutingConfig Object<Time_Based_Routing> The time-based routing configuration. directDidNumbers Array<Direct_DID_List> The DID numbers associated with the IVR.
- User_List
-
Parameter Type Description enabled Boolean Whether direct dialing to internal users is enabled. mode String The direct dialing mode. ALL: Allow callers to reach all users.ALLOWED: Allow callers to reach only the specified users.RESTRICTED: Allow callers to reach all users except the specified users.DISABLED: Direct dialing is disabled.
userIds Object<User_ID> The IDs of internal users. Note: This parameter is returned only whenmodeisALLOWEDorRESTRICTED.
- User_ID
-
Parameter Type Description values Array<String> The list of internal user IDs.
- Call_Feature_List
-
Parameter Type Description enabled Boolean Whether callers can reach ring groups or queues through the IVR. true: Enabledfalse: Disabled
items Object<Call_Feature_Items> The list of ring groups or queues that callers can reach through the IVR.
- Call_Feature_Items
-
Parameter Type Description values Array<Call_Feature_Item> The list of ring groups or queues that callers can reach through the IVR.
- Call_Feature_Item
-
Parameter Type Description type String The type of call feature. FEATURE_RING_GROUP: Ring GroupFEATURE_QUEUE: Queue
value String The ID of the ring group or queue.
- Outbound_Route_List
-
Parameter Type Description enabled Boolean Whether callers can reach external numbers through outbound routes via the IVR. routeIds Object<Outbound_Route_Item> The outbound routes that callers can use to reach external numbers through the IVR.
- Outbound_Route_Item
-
Parameter Type Description values Array<String> The list of outbound route IDs.
- Keypress_List
-
Parameter Type Description {keypress} String The key pressed by the caller. {destination} Object<Destination> The destination for calls when the caller presses the specified key.
- Time_Based_Routing_Config
-
Parameter Type Description holidayHandling String The holiday handling mode. route: Route IVR calls during holidays to a specific destination.ignore: Ignore holidays and route calls according to the business hours settings.
outsideDestination Object<Destination> The destination for IVR calls received outside business hours. holidayDestination Object<Destination> The destination for IVR calls received during holidays.
- Destination
-
Parameter Type Description type String The destination type. USERUSER_VOICEMAILIVRRING_GROUPQUEUEEXTERNAL_NUMBERHANGUPPLAY_PROMPT: Play the prompt and hang up.PLAY_PROMPT_RETURN_IVR: Play the prompt and return to the IVR.PLAY_IVR_PROMPT: Play the IVR prompt and return to the IVR.
value String The destination value. prefix String The dial-out prefix. turnOffRecording Boolean Whether call recording is disabled. repeatCount Integer The number of times to play the prompt when typeisPLAY_PROMPTorPLAY_PROMPT_RETURN_IVR.
- Direct_DID_List
-
Parameter Type Description id String The unique identifier of the DID number. number String The DID number. name String The DID name.
Example
Request example
PUT /uc-cconfig/api/v1/ivrs/363581284498870272 HTTP/1.1
Host: api.cn.novoone.com
Authorization: Bearer eyJraWQiOiJjbi0wLWtleS0xIiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJkaXN0cmlidXRvcmV4YW1wbGVAb3V0bG9vay5jb20iLCJncmFudF90eXBlIjoib3BlbmFwaSIsImNsaWVudF9leHQiOnsiZGVzY3JpcHRpb24iOiLnrKzkuInmlrnlkIjkvZzkvJnkvLTlupTnlKgiLCJwYXJ0bmVyIjoi56S65L6L5ZCI5L2c5LyZ5Ly0In0sImNsaWVudF90eXBlIjoib3BlbmFwaSIsImV4cCI6MTc5MDc3Mzc4NSwiaWF0IjoxNzkwNzUyMTg1LCJqdGkiOiI0ZDkyZTY1Mi00ZGY3LTQ1YzEtYTEyMy1lM2M4NTQ1NzU3MGQiLCJjbGllbnRfaWQiOiJub3ZvLW9wZW4tcGxhdGZvcm0iLCJ1c2VyX2V4dCI6eyJyb2xlSWRzIjpbM10sInN0eXBlIjoiQURNSU4iLCJ0ZW5hbnRDb2RlIjpudWxsLCJ0eXBlIjoiUF9BQ0NPVU5UIiwidXNlcklkIjozMDc2OTEzNjQ0OTE1OTk4NzIwLCJlbWFpbCI6ImRpc3RyaWJ1dG9yZXhhbXBsZUBvdXRsb29rLmNvbSIsInVzZXJuYW1lIjoiZGlzdHJpYnV0b3JleGFtcGxlQG91dGxvb2suY29tIiwidWNJZCI6MzA3NjkxMzY0NDg5MDgzMjg5Nn19.QuOwtCNqOWcSHwH2n1MaDIrkJWnidV11bgrBfvTueqDahurTqkEKPRZRDEIkx41NbK65gDZOtGZRPkD1k9riERFobWiYcUBfHiAsc_inLBf41PXXltIV0awmHvG7wYdjpqWttPNrwB81mZJB40DzIPBIif7HvZcv_gqrxd4A_oVxGOGM2xqFwJQe8fkhNWTfcUH143hqpT7NNU7dDTFAGxLckQohu5POfzSMXZeJD0BQ7T4M9KihkmKUQegW5PwiroxzHa1-0bplkJOYN37uRXOAMal6f9viVJc_zdY9nkXqeq7wNvawlFookB4S-jpBTEPmw3v6wfdoXqLYRNlD2A
Content-Type: application/json
x-tenant-code: jint
{
"name": "zz-test-ivr-upd"
}
Response example
HTTP/1.1 200 OK { "requestId": "dfd40c4365ccadb9e115d6c8c449e85d", "code": "200", "message": "SUCCESS", "detailMessage": "", "result": { "id": "363581284498870272", "extension": "6201", "name": "zz-test-ivr-upd", "joinAnnouncement": "default", "repeatAnnouncements": ["default"], "maxTimeout": 3, "responseTimeout": 5, "interDigitTimeout": 3, "alertInfo": "", "dialUser": { "enabled": false, "mode": "ALL" }, "dialCallFeature": { "enabled": false }, "dialOutboundRoutes": { "enabled": false }, "keyPressEvents": {}, "timeoutDestination": { "type": "HANGUP", "value": "", "prefix": "", "turnOffRecording": false, "repeatCount": 0 }, "invalidDestination": { "type": "PLAY_IVR_PROMPT", "value": "", "prefix": "", "turnOffRecording": false, "repeatCount": 0 }, "timeBasedRoutingEnabled": false, "timeBasedRoutingProfileId": "", "timeBasedRoutingConfig": null, "directDidNumbers": [] } }