Ai chats

Retrieve ai chat

Changed on

Retrieves the details of an existing AI chat.

Required permissions:

  • ai_chat:read
get/ai_chats/{id}

Request

  • Base URL
    https://api.whop.com/api/v1
  • Auth
    HTTP bearer

Path parameters

id, string required
Example:aich_xxxxxxxxxxxxx

The unique identifier of the AI chat to retrieve.

Response

A successful response

AiChat required

An AI-powered chat conversation belonging to a user, with optional scheduled automation.

agent_identifier, 'general' | 'support' required

The AI agent that handles this chat. Set when the chat is created and fixed for its lifetime.

blended_token_usage, string required

The total number of tokens consumed across all messages in this conversation.

created_at, string date-time required

The datetime the ai chat was created.

id, string required

The unique identifier for the ai chat.

last_message_at, string date-time nullable required

The timestamp of the most recent message in this conversation. Null if no messages have been sent yet.

message_count, integer required

The total number of messages exchanged in this conversation.

notification_preference, 'all' | 'none' required

The notification preference for this AI chat. all delivers AI chat notifications and badges, while none mutes them.

title, string nullable required

A short descriptive title for this AI chat conversation. Null if no title has been set.

updated_at, string date-time required

The datetime the ai chat was last updated.

user, object required

The user who owns this AI chat conversation.

Example response

{
  "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