Suggestions

close search

Call Management

Call history

URL: https://api.stringeex.com/v1/call/history

HTTP method: GET

Content-Type: application/json

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

GET params:

Field Type Require Description
call_id String No Call ID
time String No Time range (millisecond)
answer_duration Number No Answer duration
queue_duration Number No Queue duration
direction Number No 0: callout, 1: callin, 2: internal
agent_id String No ID of agent
status Number No 1: meet call, 2: miss call, 3: stop at IVR, 4: stop at survey IVR
stringee_number String No Stringee number
customer_number String No Customer number
page Number No Page of list
limit Number No Limit per page, default: 10
sort_order String No Default: desc
sort_by String No Default: start_time
has_voicemail Number No 1: is voice mail, 0 is not voice mail

Sample request:

GET https://api.stringeex.com/v1/call/history?call_id=&time=1626627600000-1626713999999&direction=1
X-STRINGEE-AUTH: json_web_token

Response code:

Field Type Require Description
r Int Yes Result code
msg String Yes Result message
data Object No Result detail include totalCount, totalPages, rows
Code Description
r = 0 Success
r = 12 Sort_order not allowed

Sample response:

{
    "r": 0,
    "data": {
        "totalCount": 2,
        "totalPages": 1,
        "rows": [
            {
                "object_type": "call",                          // Type of object, only 1 value: "call" 
                "id": "call-vn-1-ZZBSRU9TFD-1626628149854",     // Call id
                "project_id": 1120,                             // Project id
                "customer_number": "84988886868",               // Customer phone number
                "stringee_number": "user_2",                    // Stringee number
                "direction": 1,                                 // 0: callout, 1: callin, 2: internal
                "start_time": 1626670644326,                    // Call start time
                "end_time": 1626670704571,                      // Call end time
                "answer_time": 0,                               // Time from agent start talking with customer to end call 
                "enqueue_time": 0,                              // Time customer in queue
                "duration": 60,                                 // Total time from call start to call end
                "ivr_duration": 0,                              // Time customer in IVR
                "portal": "PT8LB2FD3Q",                         // Portal id
                "account": "user_1",                            // Agent id
                "hold_duration": 0,                             // Time call on hold
                "talk_duration": 0,                             // Time agent talk with customer
                "recorded": false,                              // Having record or not
                "have_voice_mail": false,                       // Having voicemail or not
                "end_call_reason": "TIMEOUT_ANSWER",            // The reason call end, from customer or agent
                "route_to_agent": false,                        // Call route to agent or not
                "acw_duration": 0,                              // Time agent break after call finish
                "status": 3,                                    // 1: meet call, 2: miss call, 3: stop at IVR, 4: stop at survey IVR
                "account_name": null,                           // Agent name
                "account_email": null,                          // Agent email
                "campaign_name": null,                          // Campaign name (for call out campaign only)
                "contactname": null,                            // Contact name (customer name)
                "company_id": null,                             // Company id (Company that contact belong to)
                "companyname": null,                            // Company name (Company that contact belong to)
                "from_user_id": null,                           // Stringee UserID
                "record_path": null,                            // Link of record
                "participants": null,                           // Participants or call
                "answer_duration": null,                        // Answer duration in seconds
                "answer_duration_minutes": null,                // Answer duration in munutes
                "first_answer_time": null,                      // The first answer time
                "callee": null,                                 // Callee
                "video_call": null                              // 1: Video call, 0: Voice call
            },
            {
                ...
            }
        ]
    },
    "msg": "Success"
}

Realtime call

URL: https://api.stringeex.com/v1/call/list

HTTP method: GET

Content-Type: application/json

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

Sample response:

{
    "r": 0,
    "data": {
        "totalCount": 2,
        "totalPages": 1,
        "currentPage": 1,
        "limit": 200,
        "calls": [
            {
                "callId": "call-vn-1-MC88W0DJQD-1544614208296",
                "stringeeNumber": "842473082686",
                "agent": "huy",
                "startTime": 1544697312327,
                "answeredTime": 0,
                "stringeeNumberNickname": "Number 112",
                "customerNumber": "84909982668",
                "direction": "callout"
            },
            {
                "callId": "call-vn-1-MC88W0DJQD-1544614208297",
                "stringeeNumber": "+842473082686",
                "agent": "ac_g3wwkjog1xjrxknz",
                "startTime": 1544697315140,
                "answeredTime": 0,
                "stringeeNumberNickname": "Number 112",
                "customerNumber": "84909982668",
                "direction": "callin"
            }
        ]
    },
    "message": "Load call(s) success"
}

Transfer call

URL: https://api.stringeex.com/v1/call/transfer

HTTP method: GET

Content-Type: application/json

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

Sample response:

{
    "callId": "CALL_ID",
    "to": {
        "type": "internal",
        "number": "AGENT_STRINGEE_USER_ID",
        "alias": "AGENT_STRINGEE_USER_ID"
    }
}

Stop call

URL: https://api.stringeex.com/v1/call/stop

HTTP method: GET

Content-Type: application/json

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

Sample response:

{
    "callId": "YOUR_CALL_ID"
}

Add participant to call

URL: https://api.stringeex.com/v1/call/addparticipant

HTTP method: GET

Content-Type: application/json

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

Sample response:

{
    "callId": "call-vn-1-PODRUT8HZA-1544701351185",
     "from": {
        "type": "external",
        "number": "842473082686",
        "alias": "842473082686"
    },

    "to": {
        "type": "internal",
        "number": "500",
        "alias": "500"
    }
}

Download file record

URL: https://api.stringeex.com/v1/recordfile/play?callId=CALL_ID&access_token=AUTH_TOKEN

HTTP method: GET

Content-Type: application/json

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

Upload greeting file

<form action="https://api.stringeex.com/v1/greetingfileupload?access_token=AUTH_TOKEN" method="post" enctype="multipart/form-data">

    <input type="input" name="desc" id="desc" value="desc 123"><br><br>

    <input type="file" name="file_upload" id="file_upload">

    <input type="submit" value="Upload Image" name="submit">
</form>