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

require_once('gosquared-php-sdk/main.php');

$GS = new GoSquared(array(
  'site_token' => 'GSN-106863-S',
  'api_key' => 'demo'
));

$result = $GS->chat->chats();

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

require_once('gosquared-php-sdk/main.php');

$GS = new GoSquared(array(
  'site_token' => 'GSN-106863-S',
  'api_key' => 'demo'
));

$result = $GS->chat->chats->{chatID}();

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

The PHP library does not support this function at this time

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

require_once('gosquared-php-sdk/main.php');

$GS = new GoSquared(array(
  'site_token' => 'GSN-106863-S',
  'api_key' => 'demo'
));

$result = $GS->chat->chats->{chatID}->feed();

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

require_once('gosquared-php-sdk/main.php');

$GS = new GoSquared(array(
  'site_token' => 'GSN-106863-S',
  'api_key' => 'demo'
));

$result = $GS->chat->chats->{chatID}->messages();

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

The PHP library does not support this function at this time

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

require_once('gosquared-php-sdk/main.php');

$GS = new GoSquared(array(
  'site_token' => 'GSN-106863-S',
  'api_key' => 'demo'
));

$result = $GS->chat->chats->{chatID}->messages->{messageID}();

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

The PHP library does not support this function at this time

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

The PHP library does not support this function at this time

Live Responseundefined undefined

Your API Key is not authorised for this endpoint