Suggestions

close search

Manage agents in a group

Add an agent to a group

URL: https://icc-api.stringee.com/v1/manage-agents-in-group

HTTP method: POST

Content-Type: application/json

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

POST data (body):

{
    "agent_id": "AGENT_ID",
    "group_id": "GROUP_ID"
}
Field Type Require Description
agent_id String YES The agent ID
group_id String YES The group ID

Response:

{
    "r": RESULT_CODE,
    "project": YOUR_PROJECT_ID,
    "agentID": "AGENT_ID",
    "groupID": "GROUP_ID",
    "message": "RESULT_MSG"
}
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
groupID String No The group ID

Sample request

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

{
    "agent_id": "U5WEJBDHDCDUJJO5",
    "group_id": "VJ2LFCVKRO0CXAM2"
}

Sample response

{
    "r": 0,
    "project": 246,
    "agentID": "U5WEJBDHDCDUJJO5",
    "groupID": "VJ2LFCVKRO0CXAM2",
    "message": "Add agent to Group success"
}

Agent list of a group

URL: https://icc-api.stringee.com/v1/manage-agents-in-group?group={GROUP_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
group String YES The group ID

Response:

{
    "r": 0,
    "message": "Load group agent success",
    "project": 246,
    "data": {
        "totalCount": "1",
        "totalPages": 1,
        "currentPage": 1,
        "limit": 50,
        "groupAgents": [
            {
                "account": 408,
                "project": 246,
                "agent_id": "AG_XPHOV0V7X71EFH98",
                "group_id": "GR_PPOJHJCJVDFC7VQC"
            }
        ]
    }
}
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/manage-agents-in-group?group=GR_PPOJHJCJVDFC7VQC HTTP/1.1
Host: https://icc-api.stringee.com
X-STRINGEE-AUTH: json_web_token
Accept: application/json

Sample response

{
    "r": 0,
    "message": "Load group agent success",
    "project": 246,
    "data": {
        "totalCount": "1",
        "totalPages": 1,
        "currentPage": 1,
        "limit": 50,
        "groupAgents": [
            {
                "account": 408,
                "project": 246,
                "agent_id": "AG_XPHOV0V7X71EFH98",
                "group_id": "GR_PPOJHJCJVDFC7VQC"
            }
        ]
    }
}

Delete an agent from a group

URL: https://icc-api.stringee.com/v1/manage-agents-in-group

HTTP method: DELETE

Content-Type: application/json

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

HTTP body:

{
    "agent_id": "AGENT_ID",
    "group_id": "GROUP_ID"
}
Field Type Require Description
agent_id String Yes The agent ID
group_id String Yes The group 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/manage-agents-in-group HTTP/1.1
Host: https://icc-api.stringee.com
X-STRINGEE-AUTH: json_web_token
Accept: application/json

{
    "agent_id": "AG_XPHOV0V7X71EFH98",
    "group_id": "GR_PPOJHJCJVDFC7VQC"
}

Sample response

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