URL: https://icc-api.stringee.com/v1/ivrnode
HTTP method: POST
Content-Type: application/json
Custom HTTP header: Name: X-STRINGEE-AUTH Value: JSON web token (JWT), see Authentication
POST data (body):
{
"tree": "IVR_TREE_ID",
"node_name": "IVR_NODE_NAME",
"node_play_mode": "NODE_PLAY_MODE",
"node_play_content": "NODE_PLAY_CONTENT",
"bargeIn": BARGE_IN,
"loop_count": LOOP_COUNT,
"sched": SCHEDULE,
"voice": "VOICE_NAME",
"speed": SPEED,
"keypress_timeout": KEYPRESS_TIMEOUT
}
Field | Type | Require | Default | Description |
---|---|---|---|---|
tree | String | YES | The IVR tree ID | |
node_name | String | YES | The node name | |
node_play_mode | String | YES | "talk": To play the content set in node_play_content field (text-to-speech); "play": To play a uploaded file with filename set in node_play_content field |
|
node_play_content | String | YES | The content to play if mode="talk"; The uploaded filename if mode="play" |
|
bargeIn | Boolean | No | true | "True" to enable users to choose an option without having to listen to the whole message (file/text) |
loop_count | int | No | 1 | The number of times file/text is repeated |
sched | int | No | 0 | Sleep before play message (mili seconds) |
voice | String | No | hn_female_thutrang_phrase_48k-hsmm | The name of the voice used to deliver text. You use the voice that has the correct language, gender and accent for the message you are sending (mode = "talk" only) |
speed | int | No | 0 | The speed level that the speech is played. This can be any value between -3 to 3 (mode = "talk" only) |
keypress_timeout | int | No | 5 | Keypress timeout (seconds) |
Response:
{
"r": RESULT_CODE,
"project": YOUR_PROJECT_ID,
"ivrNodeID": "IVR_NODE_ID",
"message": "RESULT_MSG",
"isRootNode": IS_ROOT_NODE_OR_NOT
}
Field | Type | Require | Description |
---|---|---|---|
r | Int | Yes | Result code |
project | Int | Yes | Your project ID |
message | String | No | Result message |
ivrNodeID | String | No | The IVR Node ID if create successfully |
Sample request
POST /v1/ivrnode HTTP/1.1
Host: https://icc-api.stringee.com
X-STRINGEE-AUTH: json_web_token
Accept: application/json
{
"tree": "F9GVMPTXLJE071IJ",
"node_name": "Root",
"node_play_mode": "talk",
"node_play_content": "Thank you for calling Stringee call center, press 1 to go to the branch 1, press 2 to go to the branch 2",
"bargeIn": true,
"loop": 3,
"sched": 1500,
"voice": "male",
"speed": 0,
"keypress_timeout": 5
}
Sample response
{
"r": 0,
"project": 246,
"ivrNodeID": "NO_294UFJIAVSI91WID",
"message": "Create ivr node success",
"isRootNode": true
}
URL: https://icc-api.stringee.com/v1/ivrnode?tree={IVR_TREE_ID}
HTTP method: GET
Content-Type: application/json
Custom HTTP header: Name: X-STRINGEE-AUTH Value: JSON web token (JWT), see Authentication
GET parameters:
Field | Type | Require | Description |
---|---|---|---|
tree | String | NO | The IVR tree ID |
Response:
{
"r": 0,
"message": "Load IVR node success",
"project": 246,
"data": {
"totalCount": "2",
"totalPages": 1,
"currentPage": 1,
"limit": 50,
"ivrNodes": [
{
"id": "NO_N0571Y51WZQBQOG3",
"account": 408,
"project": 246,
"tree": "TR_YRY7ZIE4MZ08BL9V",
"node_name": "Root",
"node_play_mode": "talk",
"node_play_content": "noi dung talk",
"node_play_option": null,
"bargeIn": 1,
"loop_count": 5,
"sched": 3000,
"voice": "hn_female_thutrang_phrase_48k-hsmm",
"speed": 0,
"keypress_timeout": 10,
"isRootNode": true
}
]
}
}
Field | Type | Require | Description |
---|---|---|---|
r | Int | Yes | Result code |
project | Int | Yes | Your project ID |
message | String | Yes | Result message |
data | JSON | Yes | Node list |
Sample request
GET /v1/ivrnode?tree=TR_YRY7ZIE4MZ08BL9V HTTP/1.1
Host: https://icc-api.stringee.com
X-STRINGEE-AUTH: json_web_token
Accept: application/json
Sample response
{
"r": 0,
"message": "Load IVR node success",
"project": 246,
"data": {
"totalCount": "1",
"totalPages": 1,
"currentPage": 1,
"limit": 50,
"ivrNodes": [
{
"id": 9,
"account": 408,
"project": 246,
"tree": 7,
"node_name": "Root",
"node_play_mode": "talk",
"node_play_content": "Thank you for calling Stringee call center, press 1 to go to the branch 1, press 2 to go to the branch 2",
"node_play_option": null,
"greeting_id": 0
}
]
}
}
URL: https://icc-api.stringee.com/v1/ivrnode/{IVR_NODE_ID}
HTTP method: DELETE
Content-Type: application/json
Custom HTTP header: Name: X-STRINGEE-AUTH Value: JSON web token (JWT), see Authentication
URI Parameters:
Field | Type | Require | Description |
---|---|---|---|
IVR_NODE_ID | Str | Yes | The IVR node ID |
Response:
{
"r": RESULT_CODE,
"project": YOUR_PROJECT_ID,
"message": "RESULT_MESSAGE"
}
Field | Type | Require | Description |
---|---|---|---|
r | Int | Yes | Result code |
project | Int | Yes | Your project ID |
message | String | No | Result message |
Sample request
DELETE /v1/ivrnode/NO_IL4K7N8KBZ8H3HCB HTTP/1.1
Host: https://icc-api.stringee.com
X-STRINGEE-AUTH: json_web_token
Accept: application/json
Sample response
{
"r": 0,
"project": 246,
"message": "Delete ivr node success"
}
URL: https://icc-api.stringee.com/v1/ivrnode/{IVR_NODE_ID}
HTTP method: PUT
Content-Type: application/json
Custom HTTP header: Name: X-STRINGEE-AUTH Value: JSON web token (JWT), see Authentication
PUT data (body):
{
"node_name": "NEW_NODE_NAME",
"node_play_mode": "NEW_PLAY_MODE",
"node_play_content": "NEW_CONTENT",
"bargeIn": BARGE_IN,
"loop_count": LOOP_COUNT,
"sched": SCHEDULE,
"voice": "VOICE_NAME",
"speed": SPEED,
"keypress_timeout": KEYPRESS_TIMEOUT
}
Field | Type | Require | Description |
---|---|---|---|
node_name | String | No | Node name |
node_play_mode | String | No | Node play mode |
node_play_content | String | No | Node play content |
bargeIn | Boolean | No | "True" to enable users to choose an option without having to listen to the whole message (file/text) |
loop_count | int | No | The number of times file/text is repeated |
sched | int | No | Sleep before play message (mili seconds) |
voice | String | No | The name of the voice used to deliver text. You use the voice that has the correct language, gender and accent for the message you are sending (mode = "talk" only) |
speed | int | No | The speed level that the speech is played. This can be any value between -3 to 3 (mode = "talk" only) |
keypress_timeout | int | No | Keypress timeout (seconds) |
URI Parameters:
Field | Type | Require | Description |
---|---|---|---|
{IVR_NODE_ID} | String | Yes | The IVR Node ID |
Response:
{
"r": RESULT_CODE,
"project": YOUR_PROJECT_ID,
"ivrNodeID": "YOUR_IVR_NODE_ID",
"message": "RESULT_MESSAGE"
}
Field | Type | Require | Description |
---|---|---|---|
r | Int | Yes | Result code |
project | Int | No | Your project ID |
message | String | Yes | Result message |
ivrNodeID | String | No | The IVR Node ID if update successfully |
Sample request
PUT /v1/ivrnode/NO_IN7YL0067S0DRJA1 HTTP/1.1
Host: https://icc-api.stringee.com
X-STRINGEE-AUTH: json_web_token
Accept: application/json
{
"node_name": "Root new name",
"node_play_mode": "talk",
"node_play_content": "new content 2"
}
Sample response
{
"r": 0,
"project": 2,
"ivrNodeID": "NO_IN7YL0067S0DRJA1",
"message": "Update ivr node success"
}