Suggestions

close search

IVR tree management

Create an IVR tree

URL: https://icc-api.stringee.com/v1/ivrtree

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_name": "IVR_TREE_NAME"
}
Field Type Require Description
tree_name String Yes The IVR tree name

Response:

{
    "r": RESULT_CODE,
    "project": YOUR_PROJECT_ID,
    "ivrTreeID": "YOUR_IVR_TREE_ID",
    "message": "RESULT_MESSAGE"
}
Field Type Require Description
r Int Yes Result code
project Int Yes Your project ID
message String No Result message
ivrTreeID String No The IVR Tree ID if create successfully

Sample request

POST /v1/ivrtree HTTP/1.1
Host: https://icc-api.stringee.com
X-STRINGEE-AUTH: json_web_token
Accept: application/json

{
    "tree_name": "IVR tree for number A"
}

Sample response

{
    "r": 0,
    "project": 246,
    "ivrTreeID": "F9GVMPTXLJE071IJ",
    "message": "Create ivr tree success"
}

IVR tree list

URL: https://icc-api.stringee.com/v1/ivrtree

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
page Int NO Page
limit Int NO The maximum number of IVR trees to get

Response:

{
    "r": 0,
    "message": "Load IVR tree success",
    "project": 246,
    "data": {
        "totalCount": "1",
        "totalPages": 1,
        "currentPage": 1,
        "limit": 50,
        "ivrTrees": [
            {
                "id": "TR_3L00Y4W0COG0S3NW",
                "account": 408,
                "project": 246,
                "tree_name": "IVR_TREE_NAME",
                "root_node": ""
            }
        ]
    }
}
Field Type Require Description
r Int Yes Result code
project Int Yes Your project ID
message String Yes Result message
data JSON Yes IVR Tree list

Sample request

GET /v1/ivrtree 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 tree success",
    "project": 246,
    "data": {
        "totalCount": "1",
        "totalPages": 1,
        "currentPage": 1,
        "limit": 50,
        "ivrTrees": [
            {
                "id": "TR_3L00Y4W0COG0S3NW",
                "account": 408,
                "project": 246,
                "tree_name": "IVR_TREE_NAME",
                "root_node": ""
            }
        ]
    }
}

Delete a IVR tree

URL: https://icc-api.stringee.com/v1/ivrtree/{IVR_TREE_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_TREE_ID} String Yes The IVR tree 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/ivrtree/TR_3L00Y4W0COG0S3NW 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 tree success"
}

Update an IVR tree

URL: https://icc-api.stringee.com/v1/ivrtree/{IVR_TREE_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):

{
    "tree_name": "IVR_TREE_NAME"
}
Field Type Require Description
tree_name String Yes The IVR tree name

URI Parameters:

Field Type Require Description
{IVR_TREE_ID} String Yes The IVR tree ID

Response:

{
    "r": RESULT_CODE,
    "project": YOUR_PROJECT_ID,
    "ivrTreeID": "YOUR_IVR_TREE_ID",
    "message": "RESULT_MESSAGE"
}
Field Type Require Description
r Int Yes Result code
project Int No Your project ID
message String Yes Result message
ivrTreeID String No The IVR Tree ID if update successfully

Sample request

PUT /v1/ivrtree/TR_5DFM9ZXZNBM5EQG9 HTTP/1.1
Host: https://icc-api.stringee.com
X-STRINGEE-AUTH: json_web_token
Accept: application/json

{
    "tree_name": "IVR tree for number A - new name"
}

Sample response

{
    "r": 0,
    "project": 246,
    "ivrTreeID": "F9GVMPTXLJE071IJ",
    "message": "Update ivr tree success"
}