Chat Transcript

Retrieve the full conversation transcript for a chat session

|View as Markdown

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.

💡

This endpoint uses the same API key as the Chat Completions API. Find your key in the Share tab of your application.

Endpoint

GET https://app.chipp.ai/api/v1/chat/transcript/{sessionId}

Authentication

Include your application's API key as a Bearer token:

Authorization: Bearer YOUR_API_KEY

This is the same API key used for the Chat Completions API. Both your test and live API keys are accepted.

Path Parameters

ParameterTypeRequiredDescription
sessionIdstring (UUID)YesThe chat session ID to retrieve

Example Request

curl https://app.chipp.ai/api/v1/chat/transcript/550e8400-e29b-41d4-a716-446655440000 \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

Success (200)

{
  "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"
    }
  ],
  "createdAt": "2026-01-15T10:29:55.000Z",
  "updatedAt": "2026-01-15T10:35:12.000Z"
}
21 lines

Response Fields

FieldTypeDescription
sessionIdstringThe chat session ID
titlestringAuto-generated session title (may be null)
messageCountnumberTotal number of messages
userMessageCountnumberNumber of user messages
botMessageCountnumberNumber of assistant messages
messagesarrayOrdered list of messages
messages[].rolestring"user" or "assistant"
messages[].contentstringThe message text
messages[].timestampstringISO 8601 timestamp
createdAtstringWhen the session was created
updatedAtstringWhen the session was last updated

Error Responses

Authentication Failed (401)

{ "error": "Missing API key" }

No Authorization header provided.

{ "error": "Invalid API key" }

The API key is incorrect or doesn't belong to any application.

Session Not Found (404)

{ "error": "Session not found" }

The session ID doesn't exist or doesn't belong to your application. For security, the same error is returned in both cases.

Server Error (500)

{ "error": "Failed to fetch session" }

Common Use Cases

Webhook Integration

If your Chipp app uses a custom action 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:

# Your webhook handler receives the session ID
session_id = webhook_payload["chatSessionId"]

# Fetch the full transcript
import requests

response = requests.get(
    f"https://app.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:

const response = await fetch(
  `https://app.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.
  • Both test and live API keys are accepted.