Suggestions

close search

Agent management

Create an agent

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

HTTP method: POST

Content-Type: application/json

Custom HTTP header: Name: X-STRINGEE-AUTH Value: JSON web token (JWT), see Authentication

POST data (body):

{
    "name": "AGENT_NAME",
    "stringee_user_id": "USER_ID",
    "manual_status": "STATUS",
    "routing_type": ROUTING_TYPE,
    "phone_number": "AGENT_PHONE_NUMBER"
}
Field Type Require Description
name String Yes The agent name
stringee_user_id String Yes The agent's user id which used to authenticate on Stringee
manual_status String NO Agent manual status
routing_type int NO 1: route call to App or SIP Phone (default);
2: route call to agent's phone number (must config Queue parameter: from_number_callout_to_agent)
phone_number String NO Agent's phone number to route call to when routing_type=2

Response:

{
    "r": RESULT_CODE,
    "project": YOUR_PROJECT_ID,
    "agentID": "YOUR_AGENT_ID",
    "message": "RESULT_MESSAGE"
}
Field Type Require Description
r Int Yes Result code
project Int Yes Your project ID
message String No Result message
agentID String No The agent ID if create successfully

Sample request

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

{
    "name": "Agent 1",
    "stringee_user_id": "agent_1",
    "manual_status": "NOT AVAILABLE"
}

Sample response

{
    "r": 0,
    "project": 246,
    "agentID": "2QAX0YOR5D55HH0N",
    "message": "Create agent success"
}

Agent list

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

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 agents to get

Response:

{
    "r": 0,
    "message": "Load agent(s) success",
    "project": 246,
    "data": {
        "totalAgents": "2",
        "totalPages": 1,
        "currentPage": 1,
        "limit": 50,
        "agents": [
            {
                "id": "AG_XPHOV0V7X71EFH98",
                "project": 246,
                "account": 408,
                "name": "Agent 2",
                "stringee_user_id": "agent_2",
                "manual_status": null,
                "system_status": 0,
                "device_status": 0,
                "last_time_pickup": 0,
                "last_time_support_call_ended": 0
            }
        ]
    }
}
Field Type Require Description
r Int Yes Result code
project Int Yes Your project ID
message String Yes Result message
data JSON Yes Agent list

Sample request

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

Sample response

{
    "r": 0,
    "message": "Load agent(s) success",
    "project": 246,
    "data": {
        "totalAgents": "2",
        "totalPages": 1,
        "currentPage": 1,
        "limit": 50,
        "agents": [
            {
                "id": "AG_XPHOV0V7X71EFH98",
                "project": 246,
                "account": 408,
                "name": "Agent 2",
                "stringee_user_id": "agent_2",
                "manual_status": null,
                "system_status": 0,
                "device_status": 0,
                "last_time_pickup": 0,
                "last_time_support_call_ended": 0
            }
        ]
    }
}

Delete an gent

URL: https://icc-api.stringee.com/v1/agent/{AGENT_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
{AGENT_ID} String Yes The agent 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/agent/AG_XPHOV0V7X71EFH98 HTTP/1.1
Host: https://icc-api.stringee.com
X-STRINGEE-AUTH: json_web_token
Accept: application/json

Sample response

{
    "r": -1,
    "project": 246,
    "message": "Agent not found"
}

Update agent

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

{
    "name": "AGENT_NAME",
    "stringee_user_id": "USER_ID",
    "manual_status": "MANUAL_STATUS",
    "routing_type": ROUTING_TYPE,
    "phone_number": "AGENT_PHONE_NUMBER",
    "system_status": "SYSTEM_STATUS",
}
Field Type Require Description
name String No The agent name
manual_status String NO Agent status
stringee_user_id String NO Stringee User ID
routing_type int NO 1: route call to App or SIP Phone;
2: route call to agent's phone number (must config Queue parameter: from_number_callout_to_agent)
phone_number String NO Agent's phone number to route call to when routing_type=2
system_status String NO 0: agent is in the call;
1: agent is not in the call

URI Parameters:

Field Type Require Description
{AGENT_ID} String Yes Agent ID

Response:

{
    "r": RESULT_CODE,
    "project": YOUR_PROJECT_ID,
    "message": "RESULT_MESSAGE"
}
Field Type Require Description
r Int Yes Result code
project Int No Your project ID
message String Yes Result message

Sample request

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

{
    "name": "Agent new name1",
    "manual_status": "AVAILABLE"
}

Sample response

{
    "r": 0,
    "message": "Update agent info success",
    "project": 2
}