Skip to content
Dashboard

Get a conversation transcript

GET
/conversations/{leadId}/messages
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.

leadId
required
string
limit
integer
default: 25 >= 1 <= 100
cursor
string

Opaque cursor from the previous page’s pagination.next_cursor.

Page of messages

Media typeapplication/json
object
data
Array<object>
object
id
string
direction
string
Allowed values: inbound outbound
text
string | null
type

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.

string | null
variant

The prompt variant that wrote this message, when one did. See GET /campaigns/{id}/prompts.

string | null
Allowed values: A B C D
has_media
boolean
sent_at
string | null format: date-time
pagination
object
has_more
boolean
next_cursor
string | null
Example
{
"data": [
{
"direction": "inbound",
"variant": "A"
}
]
}

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"
}
}

Invalid parameter or body (also an invalid or expired cursor)

Media typeapplication/json
object
error
object
code
string
message
string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}