Get Conversation History
API Reference
Get Conversation History
Retrieve the full message history of a conversation programmatically
GET
Get Conversation History
Overview
This endpoint returns the complete message history for a contact’s conversation with your bot — every message sent by both the user and the bot, in chronological order, along with delivery status details. Use this to capture lead data, sync conversations to your CRM, or trigger downstream automations (e.g. in n8n or Make) whenever a conversation completes.Authentication: Requires a Bearer token. Pass your API key in the
Authorization header as Bearer <your-api-key>.Bot Integration ID: The
botIntegrationId in the path identifies a specific channel of a bot (its WhatsApp or SMS integration) — it is not the bot ID. Find it in the bot’s Integrations settings under the WhatsApp or Twilio integration. See Send Message for details.Platform-specific parameters
The query parameter you need depends on your bot’s platform:Example request (WhatsApp)
Response
Each item in thedata array is a single message:
senderType—"user"or"bot"content— the message textcreatedAt— ISO 8601 timestamplatestStatus— delivery status (e.g.sent,delivered,read,failed)failureReason/errorCode/errorMessage— populated only whenlatestStatusisfailed
metadata.contextStartsAt field indicates when the bot’s active context window begins. Messages before this timestamp are still returned in full but fall outside the bot’s current context.
Getting Your API Key
API keys can be generated from your Setter AI dashboard under Settings > API Keys. Keep your API key secure and never expose it in client-side code.Authorizations
Bearer token authentication using your API key
Path Parameters
The ID of your bot integration
Query Parameters
The contact's phone number (WhatsApp or SMS integrations)
The session ID (Playground or Embed integrations)

