# Chat Transcript Retrieve the full conversation transcript for a chat session --- Retrieve the full conversation transcript for any chat session in your application. This is useful for logging conversations, syncing chat data to your CRM, or building analytics on top of your Chipp app. > **Note:** This endpoint uses the same API key as the Chat Completions API. Create a key in your application's **Launch > Access** tab (Builder API Keys section). ## Endpoint ``` GET https://build.chipp.ai/api/v1/chat/transcript/{sessionId} ``` ## Authentication Include your application's API key as a Bearer token: ```bash Authorization: Bearer YOUR_API_KEY ``` This is the same API key used for the [Chat Completions API](/docs/api/reference). The key must have read access to **Sessions**. Keys created without custom permissions have it. ## Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `sessionId` | string (UUID) | Yes | The chat session ID to retrieve. This is the `chatSessionId` from a [Chat Completions](/docs/api/reference) response or [stream](/docs/api/streaming) | ## Example Request ```bash curl https://build.chipp.ai/api/v1/chat/transcript/550e8400-e29b-41d4-a716-446655440000 \ -H "Authorization: Bearer YOUR_API_KEY" ``` ## Response ### Success (200) ```json { "sessionId": "550e8400-e29b-41d4-a716-446655440000", "title": "Conversation about pricing", "messageCount": 6, "userMessageCount": 3, "botMessageCount": 3, "messages": [ { "role": "user", "content": "Hi, I have a question about your pricing plans.", "timestamp": "2026-01-15T10:30:00.000Z" }, { "role": "assistant", "content": "Of course! I'd be happy to help with pricing. What would you like to know?", "timestamp": "2026-01-15T10:30:02.000Z" } ], "truncated": false, "encrypted": false, "zeroDataRetention": false, "createdAt": "2026-01-15T10:29:55.000Z", "updatedAt": "2026-01-15T10:35:12.000Z" } ``` ### Response Fields | Field | Type | Description | |-------|------|-------------| | `sessionId` | string | The chat session ID | | `title` | string or null | Auto-generated session title (null until one is generated) | | `messageCount` | number | Total number of user and assistant messages in the session | | `userMessageCount` | number | Number of user messages | | `botMessageCount` | number | Number of assistant messages | | `messages` | array | User and assistant messages, oldest first | | `messages[].role` | string | `"user"` or `"assistant"` | | `messages[].content` | string | The message text | | `messages[].timestamp` | string | ISO 8601 timestamp | | `truncated` | boolean | `true` when the session has more than 1,000 messages. `messages` then holds the oldest 1,000; the counts still cover the whole session | | `encrypted` | boolean | `true` for an end-to-end encrypted session. See [Encrypted Sessions](#encrypted-sessions) | | `zeroDataRetention` | boolean | `true` when your organization has Zero Data Retention on. See [Zero Data Retention](#zero-data-retention) | | `createdAt` | string | When the session was created | | `updatedAt` | string | When the session last had activity | Internal messages (system prompts, tool calls and results, and conversation summaries Chipp makes to fit long chats into the model's context) are not part of the transcript. ### Encrypted Sessions If the end user's conversation is end-to-end encrypted, only that user can read it. The transcript keeps the roles, timestamps, and counts, and each `content` is the placeholder `"[Encrypted - only visible to the consumer]"`. This matches the [Builder API sessions endpoints](/docs/builder-api/sessions). ### Zero Data Retention With Zero Data Retention on, Chipp never stores message content, so `messages` is empty and all counts are `0`. The session itself (title and timestamps) is still returned. This matches the [Builder API sessions endpoints](/docs/builder-api/sessions). ## Error Responses ### Authentication Failed (401) ```json { "error": "Missing API key" } ``` No `Authorization` header provided. ```json { "error": "Invalid API key" } ``` The API key is incorrect, revoked, expired, or doesn't belong to any application. ### Missing Permission (403) ```json { "error": "API key does not have read access to sessions" } ``` The key was created with custom permissions that do not include Sessions. ### Session Not Found (404) ```json { "error": "Session not found" } ``` The session ID doesn't exist, isn't a valid UUID, or doesn't belong to your application. For security, the same error is returned in all three cases. ### Rate Limit Exceeded (429) ```json { "error": "Rate limit exceeded" } ``` More than 120 transcript requests in one minute with the same API key. Wait for the number of seconds in the `Retry-After` header. This limit is separate from the Chat Completions limit, so reading transcripts does not slow down your chats. ### Server Error (500) ```json { "error": "Failed to fetch session" } ``` ## Common Use Cases ### Webhook Integration If your Chipp app uses a [custom action](/docs/custom-actions/overview) to send data to a webhook, you can include the session ID in the webhook payload and then fetch the full transcript from your backend: ```python # Your webhook handler receives the session ID session_id = webhook_payload["chatSessionId"] # Fetch the full transcript import requests response = requests.get( f"https://build.chipp.ai/api/v1/chat/transcript/{session_id}", headers={"Authorization": "Bearer YOUR_API_KEY"} ) transcript = response.json() # Store or process the transcript for message in transcript["messages"]: print(f"{message['role']}: {message['content']}") ``` ### CRM Sync After a conversation ends, fetch the transcript and attach it to a contact record in your CRM: ```javascript const response = await fetch( `https://build.chipp.ai/api/v1/chat/transcript/${sessionId}`, { headers: { Authorization: `Bearer ${process.env.CHIPP_API_KEY}` }, } ); const { messages, messageCount } = await response.json(); // Format for CRM note const note = messages .map((m) => `${m.role === "user" ? "Customer" : "Bot"}: ${m.content}`) .join("\n\n"); ``` ## Security - Each API key is scoped to a single application. You can only retrieve transcripts for sessions that belong to your application. - Attempting to access a session from a different application returns a `404` (not `403`) to prevent leaking information about session existence. - For paginated message lists with tags, feedback, and tool details, use the [Builder API sessions endpoints](/docs/builder-api/sessions) (`GET /api/v1/apps/{appId}/sessions/{sessionId}/messages`).