Chats

Retrieve a list of active chats

GETchat/chats

Retrieve a list of active chat conversations.

Query String Parameters

limit

StringDefault Value: 0,10

The maximum number of results e.g. 10 to return with an optional offset e.g. 5,10. You can request a maximum of 250 results

from

String

The start date-time for the query

to

String

The end date-time for the query

Definition

GET https://api.gosquared.com/chat/v1/chats

Example Request

curl "https://api.gosquared.com/chat/v1/chats?api_key=demo&site_token=GSN-106863-S" 

Live Responseundefined undefined

Your API Key is not authorised for this endpoint

Please fill in the required fields in the Query Builder

Retrieve a chat

GETchat/chats/{chatID}

Retrieve a chat conversation by ID.

Path Parameters

chatID

StringRequired

The ID of the chat (same as the person_id of the client)

Definition

GET https://api.gosquared.com/chat/v1/chats/{chatID}

Example Request

curl "https://api.gosquared.com/chat/v1/chats/{chatID}?api_key=demo&site_token=GSN-106863-S" 

Live Responseundefined undefined

Your API Key is not authorised for this endpoint

Please fill in the required fields in the Query Builder

Archive chat

POSTchat/chats/{chatID}/archive

Archive a chat conversation.

Path Parameters

chatID

StringRequired

The ID of the chat (same as the person_id of the client)

Definition

POST https://api.gosquared.com/chat/v1/chats/{chatID}/archive

Example Request

curl -X POST -H "Content-Type: application/json" \
  "https://api.gosquared.com/chat/v1/chats/{chatID}/archive?api_key=demo&site_token=GSN-106863-S" 

Live Responseundefined undefined

Your API Key is not authorised for this endpoint

Retrieve a list of messages and events from a conversation

GETchat/chats/{chatID}/feed

Retrieve a list of messages and events from a conversation.

Path Parameters

chatID

StringRequired

The ID of the chat (same as the person_id of the client)

Query String Parameters

limit

StringDefault Value: 0,10

The maximum number of results e.g. 10 to return with an optional offset e.g. 5,10. You can request a maximum of 250 results

from

String

The start date-time for the query

to

String

The end date-time for the query

Definition

GET https://api.gosquared.com/chat/v1/chats/{chatID}/feed

Example Request

curl "https://api.gosquared.com/chat/v1/chats/{chatID}/feed?api_key=demo&site_token=GSN-106863-S" 

Live Responseundefined undefined

Your API Key is not authorised for this endpoint

Please fill in the required fields in the Query Builder

Retrieve a list of messages

GETchat/chats/{chatID}/messages

Retrieve a list of messages from a conversation.

Path Parameters

chatID

StringRequired

The ID of the chat (same as the person_id of the client)

Query String Parameters

limit

StringDefault Value: 0,10

The maximum number of results e.g. 10 to return with an optional offset e.g. 5,10. You can request a maximum of 250 results

from

String

The start date-time for the query

to

String

The end date-time for the query

Definition

GET https://api.gosquared.com/chat/v1/chats/{chatID}/messages

Example Request

curl "https://api.gosquared.com/chat/v1/chats/{chatID}/messages?api_key=demo&site_token=GSN-106863-S" 

Live Responseundefined undefined

Your API Key is not authorised for this endpoint

Please fill in the required fields in the Query Builder

Send a message

POSTchat/chats/{chatID}/messages

Send a message to a person as an agent or client.

When sending a message as an agent, the agent will be set to the owner of the API key.

To send a message as a client, you will need to include their "Person Signature" as the "auth" value in your query params. The "Person Signature" should be generated on your server by combining the user's unique identifier with your project's Secure Mode Secret using a SHA-256 HMAC function (keyed-hash message authentication code.)

Path Parameters

chatID

StringRequired

The ID of the chat (same as the person_id of the client)

POST Body

content

StringRequired

from

Accepted values: agent, client, bot

timestamp

Number

Definition

POST https://api.gosquared.com/chat/v1/chats/{chatID}/messages

Example Request

curl -X POST -H "Content-Type: application/json" \
  "https://api.gosquared.com/chat/v1/chats/{chatID}/messages?api_key=demo&site_token=GSN-106863-S" 

Live Responseundefined undefined

Your API Key is not authorised for this endpoint

Retrieve a message

GETchat/chats/{chatID}/messages/{messageID}

Retrieve a specific message by ID.

Path Parameters

chatID

StringRequired

The ID of the chat (same as the person_id of the client)

messageID

StringRequired

The ID of the message

Definition

GET https://api.gosquared.com/chat/v1/chats/{chatID}/messages/{messageID}

Example Request

curl "https://api.gosquared.com/chat/v1/chats/{chatID}/messages/{messageID}?api_key=demo&site_token=GSN-106863-S" 

Live Responseundefined undefined

Your API Key is not authorised for this endpoint

Please fill in the required fields in the Query Builder

Leave a note

POSTchat/chats/{chatID}/notes

Leave a note in a conversation.

Path Parameters

chatID

StringRequired

The ID of the chat (same as the person_id of the client)

POST Body

content

StringRequired

timestamp

Number

Definition

POST https://api.gosquared.com/chat/v1/chats/{chatID}/notes

Example Request

curl -X POST -H "Content-Type: application/json" \
  "https://api.gosquared.com/chat/v1/chats/{chatID}/notes?api_key=demo&site_token=GSN-106863-S" 

Live Responseundefined undefined

Your API Key is not authorised for this endpoint

Un-archive chat

POSTchat/chats/{chatID}/unarchive

Un-archive a chat conversation.

Path Parameters

chatID

StringRequired

The ID of the chat (same as the person_id of the client)

Definition

POST https://api.gosquared.com/chat/v1/chats/{chatID}/unarchive

Example Request

curl -X POST -H "Content-Type: application/json" \
  "https://api.gosquared.com/chat/v1/chats/{chatID}/unarchive?api_key=demo&site_token=GSN-106863-S" 

Live Responseundefined undefined

Your API Key is not authorised for this endpoint