Get a conversation transcript
GET
/conversations/{leadId}/messages
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”leadId
required
string
Query Parameters
Section titled “Query Parameters”limit
integer
cursor
string
Opaque cursor from the previous page’s pagination.next_cursor.
Responses
Section titled “Responses”Page of messages
Media typeapplication/json
object
data
Array<object>
object
id
string
direction
string
text
string | null
type
Internal interaction type (e.g. USER_MESSAGE, LEAD_WELCOME)
string | null
has_media
boolean
sent_at
string | null format: date-time
pagination
object
has_more
boolean
next_cursor
string | null
Example
{ "data": [ { "direction": "inbound" } ]}Missing, unknown or revoked API key
Media typeapplication/json
object
error
object
code
string
message
string
Examplegenerated
{ "error": { "code": "example", "message": "example" }}Resource not found in this workspace
Media typeapplication/json
object
error
object
code
string
message
string
Examplegenerated
{ "error": { "code": "example", "message": "example" }}
