Send a message

Add a new message via a channel

Send Chat Message

POST https://{{account_id}}.acquire.io/api/v1/crm/messenger/chat/add-message

Send a chat message to a conversation. To send a message to a contact, you must pass a "message" object. Only active cases may receive messages via the API. "type", "message", and "caseId" are required keys in the message object. See example body below. You can also add translateLangKey to the message object for message translation. caseId - You can retrieve caseId from a Webhook, by sending a GET request to the Retrieve a list of messages endpoint or from the Acquire Dashboard. Type - This indicates the type of message. There are three options: message, note, and event. Set "type" to "message" to send a chat message.

Query Parameters

Name
Type
Description

x-user-type

string

Specifies the type user/contact. If adding as an agent, then use 'user'. If adding if message needs to be added from agent then it is user and if it is to be added from agent then it is contact

contactId*

integer

Specify the contact ID

Headers

Name
Type
Description

Authorization*

string

Bearer {{API_KEY}}

Request Body

Name
Type
Description

translateLangKey

string

HTML ISO language code

caseId*

integer

The case ID

message

string

The chat message you would like to send

type*

string

"message"

message*

object

message object

{
    "data": {
        "channel": "chat",
        "senderType": "user",
        "senderId": 25,
        "type": "message",
        "seen": "no",
        "message": "Hey added from the api",
        "meta": {
            "additionalProp1": {}
        },
        "dateCreated": "2021-03-30T16:05:46.000Z",
        "case": {
            "dateCreated": "2021-03-30T16:04:10.000Z",
            "dateUpdated": "2021-03-30T16:04:11.000Z",
            "id": 2069,
            "closedBy": null,
            "visitId": 1379,
            "title": "#597759 has just started a chat",
            "description": "fdgdfgd",
            "channel": "chat",
            "status": "active",
            "closingState": "handled",
            "dateQueue": "2021-03-30T16:04:10.000Z",
            "datePending": "2021-03-30T16:04:10.000Z",
            "dateActive": "2021-03-30T16:04:10.000Z",
            "dateClosed": null,
            "queueId": null,
            "queueOrder": null,
            "meta": {},
            "parentId": 1875,
            "userId": null,
            "waitTime": 0,
            "contact": {
                "dateCreated": "2021-03-26T08:34:29.000Z",
                "dateUpdated": "2021-03-30T16:04:10.000Z",
                "id": 597759,
                "clientType": "web",
                "clientName": "Chrome",
                "clientVersion": "87.0",
                "clientOsName": "Linux",
                "clientOsVersion": "x86_64",
                "clientDeviceType": "Desktop",
                "clientDeviceVendor": null,
                "clientDeviceModel": null,
                "clientDetails": {
                    "ua": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36",
                    "engine": {
                        "name": "Blink",
                        "version": "87.0.4280.66"
                    },
                    "network": {
                        "type": "3g",
                        "speed": "2.3400000000000003"
                    }
                },
                "meta": {},
                "archive": "no",
                "companyId": null
            },
            "users": [
                {
                    "id": 4607,
                    "caseId": 2069,
                    "type": "user",
                    "userId": 1,
                    "role": "owner",
                    "status": "active",
                    "dateCreated": "2021-03-30T16:04:10.000Z",
                    "dateLastAssigned": "2021-03-30T16:04:10.000Z",
                    "closed": "no",
                    "meta": null,
                    "user": {
                        "roles": [],
                        "id": 1,
                        "name": "David Guetta",
                        "firstName": "David Guetta",
                        "lastName": "",
                        "photo": "",
                        "email": "[email protected]",
                        "clientId": ""
                    }
                },
                {
                    "id": 4606,
                    "caseId": 2069,
                    "type": "contact",
                    "userId": 597759,
                    "role": "owner",
                    "status": "active",
                    "dateCreated": "2021-03-30T16:04:10.000Z",
                    "dateLastAssigned": "2021-03-30T16:04:10.000Z",
                    "closed": "no",
                    "meta": null,
                    "user": {
                        "type": "contact",
                        "id": 597759,
                        "name": "#597759",
                        "photo": null
                    }
                }
            ],
            "threadId": 1875
        },
        "sender": {
            "roles": [],
            "id": 25,
            "name": "a",
            "firstName": "a",
            "lastName": "",
            "photo": "",
            "email": "",
            "clientId": "",
            "parentId": 0,
            "type": "user",
            "accessLevel": null
        },
        "dateUpdated": null,
        "id": 8289,
        "caseId": 2069,
        "threadId": 1875,
        "contactId": 597759
    }
}

Body(raw)

Send Mail Message

POST https://{{account_id}}.acquire.io/api/v1/mail/add-message

Send an email message. The email address in the "To" attribute must be an inbox connected to Acquire. See body example below of required attributes.

Headers

Name
Type
Description

Authorization*

string

Bearer {{API_KEY}}

Request Body

Name
Type
Description

htmlBody*

string

the email message

type*

string

"message"

subject*

string

the subject of the email

bcc*

array

blind carbon copy email addresses

cc*

array

carbon copy email addresses

from*

string

your Acquire-connected email address

to*

array

an array of recipients' email addresses

contactId*

integer

the contact's ID

caseId*

integer

the case's ID

data*

object

data object

attachments*

array

attachments array

Body(raw)

Send SMS

POST https://{{account_id}}.acquire.io/api/v1/voip/send-sms

Send a message through an SmS channel. You must have a phone number connected to your Acquire account. To find the threadId and timelineId, send a GET rquest to Retrieve a list of messages or to Case List where ID={{contactId}}.

Query Parameters

Name
Type
Description

Authorization

string

Bearer {{api_key}}

x-user-type

string

Specifies the type user/contact if message needs to be added from agent then it is user and if it is to be added from agent then it is contact

Request Body

Name
Type
Description

From

string

The phone number in your Acquire platform (must include country and area code)

To

string

The contact's phone number (must include country and area code)

contactId

integer

The contact's ID

Body

string

The message you intend to send

threadId

integer

The case ID

timelineId

integer

The thread's timeline ID

Body(raw)

Last updated