Conversation

Assign Agent

POST https://widget.blinger.io/api/external/v1/conversation/:id/assign-agent

Path Parameters

NameTypeDescription

id

string

ID of the conversation.

Headers

NameTypeDescription

Authorization

string

Authorization token.

Request Body

NameTypeDescription

agentId

string

ID of the agent.

{
    "status": 200,
    "data": {
        "id": "e1d247c8-5cd8-4f93-b9d7-15fd3259ac22",
        "assignedAgent": {
            "id": "c671d030-584e-4422-8710-9215c04b6a64",
            "serviceUserId": "12345",
            "name": "Vadim Belorusov",
            "status": "online",
            "avatar": {
                "id": "76d94b6b-a45c-4d62-8010-bd2f52d8c846",
                "type": "image",
                "meta": {
                    "width": 400,
                    "height": 400
                },
                "info": {
                    "ext": "jpeg",
                    "name": "5d1db8373db3a",
                    "path": "/c2/b1/62/be16b35869e9491a6761c013cbae7548f23b17abb225eaa82efd214264779825.jpeg",
                    "size": 5106,
                    "mimeType": "image/jpeg"
                },
                "url": {
                    "120x120": "http://static.widget.blinger.io/120x120/c2/b1/62/be16b35869e9491a6761c013cbae7548f23b17abb225eaa82efd214264779825.jpeg",
                    "520x400": "http://static.widget.blinger.io/520x400/c2/b1/62/be16b35869e9491a6761c013cbae7548f23b17abb225eaa82efd214264779825.jpeg",
                    "default": "http://static.widget.blinger.io/c2/b1/62/be16b35869e9491a6761c013cbae7548f23b17abb225eaa82efd214264779825.jpeg"
                },
                "createdAt": 1562198400,
                "updatedAt": 1562198400
            },
            "active": true,
            "createdAt": 1562228791,
            "updatedAt": 1562228791
        },
        "locked": false,
        "createdAt": 1562228238,
        "updatedAt": 1562241579
    }
}

Send Text Message

POST https://widget.blinger.io/api/external/v1/conversation/:id/send-text-message

Path Parameters

NameTypeDescription

id

string

ID of the conversation.

Headers

NameTypeDescription

Authorization

string

Authorization token.

Request Body

NameTypeDescription

uuid

string

Unique generated ID of the message.

text

string

Simple text message.

{
    "status": 200,
    "data": {
        "id": "554f11c1-ec1e-4fdb-9953-bfad33013f58",
        "status": "delivered",
        "type": "text",
        "body": "Hello",
        "file": null,
        "review": null,
        "bot": null,
        "agent": null,
        "endUser": {
            "id": "3132ad01-1d3c-4d14-ad05-19ae73c07556",
            "websocketToken": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIzMTMyYWQwMS0xZDNjLTRkMTQtYWQwNS0xOWFlNzNjMDc1NTYifQ.cjKtgNraxCceKS-44SLH1SrKGsksvPgzlTX523C7lPw",
            "createdAt": 1562228238,
            "updatedAt": 1562228238
        },
        "microseconds": 1562242173465326,
        "createdAt": 1562242173,
        "updatedAt": 1562242173
    }
}

Send File Message

POST https://widget.blinger.io/api/external/v1/conversation/:id/send-file-message

Path Parameters

NameTypeDescription

id

string

ID of the conversation.

Headers

NameTypeDescription

Authorization

string

Authorization token.

Request Body

NameTypeDescription

file

string

Url of the file.

uuid

string

Unique generated ID of the message

{
    "status": 200,
    "data": {
        "id": "b01f7d2f-7003-4cc2-9a95-ac20d6374358",
        "status": "delivered",
        "type": "file",
        "body": null,
        "file": {
            "id": "6350e4fa-7b69-4f6b-b24e-228a05d62c21",
            "type": "image",
            "meta": {
                "width": 1920,
                "height": 1080
            },
            "info": {
                "name": "phpanbHIN",
                "ext": "png",
                "mimeType": "image/png",
                "size": 327743,
                "path": "/c2/9b/f1/734b2fce15c08f9ddae842c2daae809d1362e3d98ead08c26678f0707a776b72.png"
            },
            "url": {
                "120x120": "http://static.widget.blinger.io/120x120/c2/9b/f1/734b2fce15c08f9ddae842c2daae809d1362e3d98ead08c26678f0707a776b72.png",
                "520x400": "http://static.widget.blinger.io/520x400/c2/9b/f1/734b2fce15c08f9ddae842c2daae809d1362e3d98ead08c26678f0707a776b72.png",
                "default": "http://static.widget.blinger.io/c2/9b/f1/734b2fce15c08f9ddae842c2daae809d1362e3d98ead08c26678f0707a776b72.png"
            },
            "createdAt": 1562242573,
            "updatedAt": 1562242573
        },
        "review": null,
        "bot": null,
        "agent": null,
        "endUser": {
            "id": "3132ad01-1d3c-4d14-ad05-19ae73c07556",
            "websocketToken": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIzMTMyYWQwMS0xZDNjLTRkMTQtYWQwNS0xOWFlNzNjMDc1NTYifQ.cjKtgNraxCceKS-44SLH1SrKGsksvPgzlTX523C7lPw",
            "createdAt": 1562228238,
            "updatedAt": 1562228238
        },
        "microseconds": 1562242573548953,
        "createdAt": 1562242573,
        "updatedAt": 1562242573
    }
}

Request Review

POST https://widget.blinger.io/api/external/v1/conversation/:id/request-review

Path Parameters

NameTypeDescription

id

string

ID of the conversation

Headers

NameTypeDescription

Authorization

string

Authorization token.

{
    "status": 200,
    "data": {
        "id": "b2737f3a-eaee-4271-b705-2bc9bb951ca1",
        "status": "delivered",
        "type": "review",
        "body": null,
        "file": null,
        "review": {
            "id": "6bc1f3b9-c972-400d-b5cd-1ca4e2d9a8fc",
            "agent": {
                "id": "c671d030-584e-4422-8710-9215c04b6a64",
                "serviceUserId": "12345",
                "name": "Vadim Belorusov",
                "status": "online",
                "avatar": {
                    "id": "76d94b6b-a45c-4d62-8010-bd2f52d8c846",
                    "type": "image",
                    "meta": {
                        "width": 400,
                        "height": 400
                    },
                    "info": {
                        "ext": "jpeg",
                        "name": "5d1db8373db3a",
                        "path": "/c2/b1/62/be16b35869e9491a6761c013cbae7548f23b17abb225eaa82efd214264779825.jpeg",
                        "size": 5106,
                        "mimeType": "image/jpeg"
                    },
                    "url": {
                        "120x120": "http://static.widget.blinger.io/120x120/c2/b1/62/be16b35869e9491a6761c013cbae7548f23b17abb225eaa82efd214264779825.jpeg",
                        "520x400": "http://static.widget.blinger.io/520x400/c2/b1/62/be16b35869e9491a6761c013cbae7548f23b17abb225eaa82efd214264779825.jpeg",
                        "default": "http://static.widget.blinger.io/c2/b1/62/be16b35869e9491a6761c013cbae7548f23b17abb225eaa82efd214264779825.jpeg"
                    },
                    "createdAt": 1562198400,
                    "updatedAt": 1562198400
                },
                "active": true,
                "createdAt": 1562228791,
                "updatedAt": 1562228791
            },
            "endUser": {
                "id": "3132ad01-1d3c-4d14-ad05-19ae73c07556",
                "websocketToken": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIzMTMyYWQwMS0xZDNjLTRkMTQtYWQwNS0xOWFlNzNjMDc1NTYifQ.cjKtgNraxCceKS-44SLH1SrKGsksvPgzlTX523C7lPw",
                "createdAt": 1562228238,
                "updatedAt": 1562228238
            },
            "mark": 0,
            "confirmed": false,
            "text": "",
            "createdAt": 1562242470,
            "updatedAt": 1562242470
        },
        "bot": {
            "id": "ad92f7ab-388f-4e86-a20a-4425885bfa40",
            "name": "Blinger bot",
            "createdAt": 1562228206,
            "updatedAt": 1562228206
        },
        "agent": null,
        "endUser": null,
        "microseconds": 1562242470285931,
        "createdAt": 1562242470,
        "updatedAt": 1562242470
    }
}

Last updated