Skip to main content
GET
List a session's messages

Authorizations

Authorization
string
header
required

A Parley API key.

Path Parameters

id
string
required

The session ID.

Minimum string length: 1

Query Parameters

role
enum<string>

Only messages with this role.

Available options:
user,
assistant
sort
enum<string>
default:-createdAt

Sort order: a field name, prefixed with - for descending. Pass createdAt to read the conversation from its first message. Defaults to -createdAt.

Available options:
createdAt,
-createdAt
cursor
string

Opaque cursor from nextCursor. Pass the same filters and sort. Omit for the first page.

Minimum string length: 1
limit
integer
default:50

Maximum number of items to return.

Required range: 1 <= x <= 250

Response

OK

data
object[]
required
nextCursor
string | null
required

Cursor for the next page, or null on the last page.