Chats
Retrieve a list of active chats
GETchat/chats
Retrieve a list of active chat conversations.
Query String Parameters
limit | StringDefault Value: The maximum number of results e.g. |
from | String The start date-time for the query |
to | String The end date-time for the query |
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) |
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) |
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: The maximum number of results e.g. |
from | String The start date-time for the query |
to | String The end date-time for the query |
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: The maximum number of results e.g. |
from | String The start date-time for the query |
to | String The end date-time for the query |
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: |
timestamp | Number |
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 |
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 |
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) |
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