Get Conversation History
API Reference
Get Conversation History
Retrieve the full message history of a conversation programmatically
GET
Get Conversation History
Documentation Index
Fetch the complete documentation index at: https://docs.trysetter.com/llms.txt
Use this file to discover all available pages before exploring further.
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>.Platform-specific parameters
The query parameter you need depends on your bot’s platform:| Platform | Required parameter |
|---|---|
userNumber — the contact’s phone number | |
| SMS (Twilio) | userNumber — the contact’s phone number |
| Playground / Embed | sessionId — the session ID |
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)

