API Reference / Steam chat
Count chat conversations across the workspace
Return the number of Steam account and counterpart pairs matching the same filter as the conversation list, with the unread messages they hold, so the list's segments and the unread badge agree with the rows.
/ steam. v1. Steam/ CountWorkspaceConversationsRequest body
application/jsonRequired
Request for the number of conversation pairs matching a filter across the caller's workspace, with the unread messages they hold.
filter?WorkspaceConversationFilterThe same filter as the conversation list.
Show attributes
accountName?stringOptional exact Steam account name, so the list reads one account's conversations. Absent or empty reads every active account's.
partnerSteamId?stringOptional exact counterpart SteamID for an authorized workspace conversation lookup, including older threads outside loaded sidebar pages. Intersects the other fields when present. Absent or empty reads all matching counterparts.
query?stringCase-insensitive literal substring across partner SteamID, the account name holding the thread, and last-known persona names observed by active workspace accounts. Whitespace is trimmed. Absent or empty matches every conversation.
unread?booleanTrue keeps only pairs with unread inbound messages, false keeps only pairs with none, absent keeps both.
Response body
application/json
Success
count?stringNumber of account and counterpart pairs matching the filter, across the whole workspace rather than the loaded page.
Format"int64"
historyReadPause?ChatHistoryReadPauseSet when the reading of chat history from before the workspace's accounts were added is paused, with the reason. Unset when nothing is paused.
Show attributes
messageQuota?integerThe workspace's chat history messages quota in force.
Format"int32"
messagesStored?integerMessages the workspace's reads stored so far.
Format"int32"
reason?stringWhy it is paused.
Value in"CHAT_
unreadMessageCount?stringSum of the unread inbound messages over the matching pairs.
Format"int64"
application/json
The request was malformed, such as a missing required field or an unparseable cursor.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
application/json
The request lacks a valid API key in the Authorization header.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
application/json
The API key is not allowed to perform this action on this workspace.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
application/json
An internal server error occurred.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
curl -X POST "https://api.goldmine.to/steam.v1.Steam/CountWorkspaceConversations" \
-H "Authorization: Bearer $CSTRADER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"filter": {
"unread": true
}
}'const res = await fetch("https://api.goldmine.to/steam.v1.Steam/CountWorkspaceConversations", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.CSTRADER_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"filter": {
"unread": true
}
}),
});
const data = await res.json();body := strings.NewReader(`{
"filter": {
"unread": true
}
}`)
req, err := http.NewRequestWithContext(ctx, http.MethodPost, "https://api.goldmine.to/steam.v1.Steam/CountWorkspaceConversations", body)
if err != nil {
return err
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("CSTRADER_API_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)import os, requests
res = requests.post(
"https://api.goldmine.to/steam.v1.Steam/CountWorkspaceConversations",
headers={"Authorization": f"Bearer {os.environ['CSTRADER_API_KEY']}"},
json={
"filter": {
"unread": true
}
},
)
data = res.json(){
"count": "4",
"unreadMessageCount": "11"
}{
"code": "invalid_argument",
"message": "The request was malformed, such as a missing required field or an unparseable cursor."
}{
"code": "unauthenticated",
"message": "The request lacks a valid API key in the Authorization header."
}{
"code": "permission_denied",
"message": "The API key is not allowed to perform this action on this workspace."
}{
"code": "internal",
"message": "An internal server error occurred."
}