Retrieve a list of messages

Retrieve a list of messages.

Get message list

GET https://{{account_id}}.acquire.io/api/v1/crm/messenger/chat/messages?contactId={{contactId}}&threadId={{threadId}}

Retrieve a list of messages. The following query parameters must be present: threadId and contactId.

Query Parameters

NameTypeDescription

-x-user-type

string

Send this parameter with a value of "contact" to send messages to Acquire

threadId

integer

ID of the thread.

contactId

integer

ID of the customer/contact.

Headers

NameTypeDescription

Authorization*

string

Bearer {{API_KEY}}

{
    "data": [
        {
            "dateCreated": "2021-04-13T05:22:19.000Z",
            "dateUpdated": "2021-04-13T12:17:02.000Z",
            "id": 854,
            "contactId": 750940,
            "closedBy": null,
            "visitId": 222,
            "title": "#750940  : hi",
            "description": "lk",
            "channel": "chat",
            "status": "active",
            "closingState": "handled",
            "dateQueue": "2021-04-13T05:22:19.000Z",
            "datePending": "2021-04-13T05:22:19.000Z",
            "dateActive": "2021-04-13T05:22:23.000Z",
            "dateClosed": null,
            "queueId": null,
            "queueOrder": 0,
            "parentId": null,
            "userId": null,
            "waitTime": 4,
            "cases": [],
            "users": [
                {
                    "id": 2126,
                    "caseId": 854,
                    "type": "user",
                    "userId": 12,
                    "role": "owner",
                    "status": "active",
                    "dateCreated": "2021-04-13T05:22:18.000Z",
                    "dateLastAssigned": "2021-04-13T05:22:19.000Z",
                    "closed": "no",
                    "meta": null,
                    "user": {
                        "roles": [],
                        "id": 12,
                        "name": "vivek",
                        "firstName": "vivek",
                        "lastName": "",
                        "photo": "",
                        "email": "vivek@acquire.io",
                        "clientId": "",
                        "parentId": 0,
                        "type": "user",
                        "accessLevel": null
                    }
                },
                {
                    "id": 2125,
                    "caseId": 854,
                    "type": "contact",
                    "userId": 750940,
                    "role": "owner",
                    "status": "active",
                    "dateCreated": "2021-04-13T05:22:18.000Z",
                    "dateLastAssigned": "2021-04-13T05:22:18.000Z",
                    "closed": "no",
                    "meta": null,
                    "user": {
                        "type": "contact",
                        "id": 750940,
                        "name": "#750940",
                        "photo": null
                    }
                }
            ],
            "threadId": 854,
            "lastMessage": {
                "id": 3391,
                "caseId": 854,
                "channel": "chat",
                "senderId": 12,
                "senderType": "user",
                "type": "message",
                "message": "lk",
                "dateCreated": "2021-04-13T12:17:02.000Z",
                "dateUpdated": null,
                "seen": "no",
                "meta": {}
            }
        }
    ]
}

Last updated