List Conversations
curl --request GET \
--url https://api.sublay.io/api/v6/:projectId/api/v7/conversationsimport requests
url = "https://api.sublay.io/api/v6/:projectId/api/v7/conversations"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.sublay.io/api/v6/:projectId/api/v7/conversations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sublay.io/api/v6/:projectId/api/v7/conversations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sublay.io/api/v6/:projectId/api/v7/conversations"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sublay.io/api/v6/:projectId/api/v7/conversations")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sublay.io/api/v6/:projectId/api/v7/conversations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"conversations": [
{
"unreadCount": 123,
"memberCount": 123,
"lastMessageId": {},
"lastMessagePreview": {},
"lastMessageCreatedAt": {},
"lastMessageUserId": {},
"otherMembers": [
{}
]
}
],
"hasMore": true
}Chat — Conversations
List Conversations
Get the current user’s conversations, ordered by most recent activity
GET
/
:projectId
/
api
/
v7
/
conversations
List Conversations
curl --request GET \
--url https://api.sublay.io/api/v6/:projectId/api/v7/conversationsimport requests
url = "https://api.sublay.io/api/v6/:projectId/api/v7/conversations"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.sublay.io/api/v6/:projectId/api/v7/conversations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sublay.io/api/v6/:projectId/api/v7/conversations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sublay.io/api/v6/:projectId/api/v7/conversations"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sublay.io/api/v6/:projectId/api/v7/conversations")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sublay.io/api/v6/:projectId/api/v7/conversations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"conversations": [
{
"unreadCount": 123,
"memberCount": 123,
"lastMessageId": {},
"lastMessagePreview": {},
"lastMessageCreatedAt": {},
"lastMessageUserId": {},
"otherMembers": [
{}
]
}
],
"hasMore": true
}Returns a cursor-paginated list of
ConversationPreview objects for the authenticated user. Only active memberships are included. Results are ordered by lastMessageAt descending (conversations with no messages appear last, ordered by createdAt).
Query Parameters
string
Comma-separated list of conversation types to include. Valid values:
direct, group, space. If omitted, all types are returned. Example: types=direct,groupstring
The
lastMessageAt timestamp of the last item in the previous page. Used for cursor pagination. Omit for the first page.string
The
createdAt timestamp of the last item in the previous page. Required together with cursor when paginating.number
Number of conversations to return per page. Defaults to
20. Maximum 50.Response
ConversationPreview[]
Array of conversation preview objects. Each item is a Conversation extended with the following fields:
Show ConversationPreview fields
Show ConversationPreview fields
number
Number of unread messages in this conversation for the current user.
number
Number of active members.
string | null
ID of the most recent message.
null if no messages exist.string | null
Content of the most recent message, truncated to 100 characters.
null if no messages exist.string | null
ISO timestamp of the most recent message.
null if no messages exist.string | null
ID of the user who sent the most recent message.
null if no messages exist.object[]
Up to 5 active members of the conversation other than the requesting user, each with public user fields (
id, name, username, avatar). Populated for direct and group conversations only — a DM/group has no name, so the counterparty is how a client renders the title and avatar. Capped at 5 (a preview avatar stack needs a few, not all — use memberCount for the full group total). Always an empty array ([]) for space conversations (whose membership can be large and which carry their own name). Ordered by member join time.boolean
Whether more conversations exist beyond this page.

