Ai chats
List ai chats
Changed onReturns a paginated list of AI chat threads for the current authenticated user.
Required permissions:
- ai_chat:read
get/ai_chats
Request
- Base URLhttps://api.whop.com/api/v1
- AuthHTTP bearer
Query parameters
after, string
Returns the elements in the list that come after the specified cursor.
before, string
Returns the elements in the list that come before the specified cursor.
first, integer
Returns the first n elements from the list.
Example:42
last, integer
Returns the last n elements from the list.
Example:42
agent_identifier, 'general' | 'support'
Only return chats handled by this agent.
account_id, string
Only return chats associated with this business account.
only_active_crons, boolean
When true, returns only chats with an active cron schedule
Response
A successful response
object required
The connection type for AiChat.
data, Ai Chat List Item[] required
A list of nodes.
page_info, Page Info required
Information to aid in pagination.
Example response
{
"data": [
{
"blended_token_usage": "123.45",
"created_at": "2023-12-01T05:00:00.401Z",
"id": "aich_xxxxxxxxxxxxx",
"last_message_at": "2023-12-01T05:00:00.401Z",
"message_count": 42,
"title": "Weekly Revenue Analysis",
"updated_at": "2023-12-01T05:00:00.401Z",
"user": {
"id": "user_xxxxxxxxxxxxx"
}
}
]
}Changes
- info
the security scope
ai_chat:readwas added to the endpoint's security schemebearerAuth
- info
- info
added the new optional
queryrequest parameteraccount_id
- info