List agent chats
Returns paginated in-app agent chats for the authenticated user in the current workspace. Pinned chats are returned first, ordered by most recently pinned. Pass q to search by chat title instead of browsing history.
GET
/agent-chatsAuthorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:reador
AuthorizationBearer token (JWT) · headerrequiredQuery parameters
pagenumbermin 0 · default: 0
pageSizenumbermin 1 · max 100 · default: 30
qstringOptional title search query
Responses
200
hasMorebooleanrequireditemsAgentChatListItemDto[]requiredShow propertiesHide properties
Array of
AgentChatListItemDtoagentAgentChatAgentDtoShow propertiesHide properties
botUserIdobjectlabelstringproviderobjecttypestringrequiredchatTitleobject | nullcreatedAtstringrequiredidstringrequiredisDraftbooleanrequiredisEmptyDraftbooleanrequiredlastMessageAtstringrequiredpinnedAtobject | nullrunIdstringrequiredstatusstringrequiredAllowed:
queuedrunningwaitingInputwaitingApprovaldonefailedcanceledpagenumberrequiredpageSizenumberrequired401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient API scopes or permissions
Request
curl -X GET "https://leadtime.app/api/public/agent-chats" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"const response = await fetch("https://leadtime.app/api/public/agent-chats", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
}
});import requests
response = requests.get(
"https://leadtime.app/api/public/agent-chats",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
},
)Response
{
"hasMore": true,
"items": [
{
"agent": {
"botUserId": {},
"label": "string",
"provider": {},
"type": "string"
},
"chatTitle": {},
"createdAt": "string",
"id": "string",
"isDraft": true,
"isEmptyDraft": true,
"lastMessageAt": "string",
"pinnedAt": {},
"runId": "string",
"status": "queued"
}
],
"page": 0,
"pageSize": 0
}Unauthorized - Invalid or missing authentication token
Forbidden - Insufficient API scopes or permissions