Skip to main content

Chat

Get Get Active Chats

This endpoint allows a user to get a list of all of their active chats. The endpoint requires an access token that represents the user who wants to get a list of their active chats. The server then returns a list of all chats that the user is a part of.

gethttps://api.showwcase.com/chat
Query
FieldTypeDescription
skip

Default value: 0

numberThe number of messages to skip.
limit

Default value: 15

numberThe number of messages to return.

Post Send Chat Request

This endpoint allows a user to send a chat request to another user. The endpoint requires an access token that represents the user who wants to send a chat request. The server then creates a new chat between the two users and returns the chat object.

posthttps://api.showwcase.com/chat
Body
FieldTypeDescription
userIdnumberThe unique id of the user to send the chat request to.

Get Get Pending Chat Requests

This endpoint allows a user to get a list of all of their pending chat requests. The endpoint requires an access token that represents the user who wants to get a list of their pending chat requests. The server then returns a list of all pending chat requests that the user has sent.

gethttps://api.showwcase.com/chat/pending
Query
FieldTypeDescription
skip

Default value: 0

numberThe number of messages to skip.
limit

Default value: 15

numberThe number of messages to return.

Get Get Rejected Chat Requests

This endpoint allows a user to get a list of all of their rejected chat requests. The endpoint requires an access token that represents the user who wants to get a list of their rejected chat requests. The server then returns a list of all rejected chat requests that the user has sent.

gethttps://api.showwcase.com/chat/rejected
Query
FieldTypeDescription
skip

Default value: 0

numberThe number of messages to skip.
limit

Default value: 15

numberThe number of messages to return.

Accept Chat Request

This endpoint allows a user to accept a chat request from another user. The endpoint requires an access token that represents the user who wants to accept a chat request. The server then updates the status of the chat to "active" and returns the chat object.

posthttps://api.showwcase.com/chat/:chatId/accept
Parameters
FieldTypeDescription
chatIdstringThe unique id of the chat.

Decline Chat Request

This endpoint allows a user to decline a chat request from another user. The endpoint requires an access token that represents the user who wants to decline a chat request. The server then updates the status of the chat to "declined" and returns the chat object.

posthttps://api.showwcase.com/chat/:chatId/decline
Parameters
FieldTypeDescription
chatIdstringThe unique id of the chat.

Get Get Chat Messages

This endpoint allows a user to get a list of all of their chat messages. The endpoint requires an access token that represents the user who wants to get a list of their chat messages. The server then returns a list of all chat messages that the user has sent or received.

gethttps://api.showwcase.com/chat/:chatId/messages
Parameters
FieldTypeDescription
chatIdstringThe unique id of the chat.
Query
FieldTypeDescription
skip

Default value: 0

numberThe number of messages to skip.
limit

Default value: 15

numberThe number of messages to return.

Mark Chat Messages as Read

This endpoint allows a user to mark all of their unread chat messages as read. The endpoint requires an access token that represents the user who wants to mark all messages as read. The server then updates the status of all messages in the user's chat history to "read".

After a successful operation, the server returns a JSON response with a status message and a description of the result of the operation. If there was an error, the server returns an appropriate HTTP status code and an error message in the response body.

posthttps://api.showwcase.com/chat/:chatId/read
Parameters
FieldTypeDescription
chatIdstringThe unique id of the chat.

Response

200 OK
HTTP/1.1 200 OK
Content-Type: application/json

{
"success": true,
"message": "All messages have been marked as read.",
}

Get Get Totals

This endpoint allows a user to get the total number of pending chat requests and total number of unread messages.

gethttps://api.showwcase.com/chat/totals
200 OK
HTTP/1.1 200 OK
Content-Type: application/json

{
"totalPendingRequest": 0,
"totalUnreadMessages": 0,
}

Get Get Total Unread Messages

This endpoint allows a user to get the total number of unread messages in all of their chats. The endpoint requires an access token that represents the user who wants to get the total number of unread messages. The server then returns the total number of unread messages.

gethttps://api.showwcase.com/chat/totalUnreadMessages

Post Send Chat Message

This endpoint allows a user to send a message to another user. The endpoint requires an access token that represents the user who wants to send a message. The server then creates a new message and returns the message object.

posthttps://api.showwcase.com/chat/:chatId/message
Parameters
FieldTypeDescription
chatIdstringThe unique id of the chat.
Body
FieldTypeDescription
textstringThe message to send.
imageUrlstringThe url of the image to send.
linkPreviewUrlstringThe url of the link to send.