Conversations
Get a conversation transcript
const url = 'https://app.whatsetter.com/api/v1/conversations/example/messages?limit=25';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://app.whatsetter.com/api/v1/conversations/example/messages?limit=25' \ --header 'Authorization: Bearer <token>'All messages exchanged with one lead, newest first.
leadId is the lead’s id from /leads or /conversations.
Requires scope conversations:read.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”Opaque cursor from the previous page’s pagination.next_cursor.
Responses
Section titled “Responses”Page of messages
object
object
What wrote the message: USER_MESSAGE (the lead), LEAD_WELCOME
(the agent’s first message, from its first_message prompt),
AI_RESPONSE (a reply, from its conversation prompt),
FOLLOWUP (a follow-up prompt), MANUAL_RESPONSE (a person, from
the dashboard or the API). Other internal values may appear.
The prompt variant that wrote this message, when one did. See GET /campaigns/{id}/prompts.
object
Example
{ "data": [ { "direction": "inbound", "variant": "A" } ]}Missing, unknown or revoked API key
object
object
Examplegenerated
{ "error": { "code": "example", "message": "example" }}Resource not found in this workspace
object
object
Examplegenerated
{ "error": { "code": "example", "message": "example" }}Invalid parameter or body (also an invalid or expired cursor)
object
object
Examplegenerated
{ "error": { "code": "example", "message": "example" }}