GET
/
messages
/
list
curl --request GET \
  --url https://api.duohub.ai/messages/list \
  --header 'X-API-Key: <api-key>'
{
  "messages": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "sessionID": "987fcdeb-51a2-43b7-91fa-987654321000",
      "role": "user",
      "content": "Hello, how can I help you today?",
      "userID": "d99e7428-40e1-7073-aa50-94cee086b518",
      "customerUserID": "cust-123",
      "createdAt": "2024-01-01T00:00:00.000Z",
      "updatedAt": "2024-01-01T00:00:00.000Z"
    }
  ],
  "nextToken": "eyJpZCI6eyJTIjoiNDU2In0sInVwZGF0ZWRBdCI6eyJTIjoiMjAyNC0wMS0wMlQwMDowMDowMFoifX0=",
  "previousToken": null,
  "count": 1
}

Authorizations

X-API-Key
string
header
required

Your duohub API key. Type: str

Query Parameters

sessionID
string

Filter messages by session ID

customerUserID
string

Filter messages by customer user ID

role
enum<string>

Filter messages by role

Available options:
norole,
system,
assistant,
user,
function,
tool
limit
integer
default:10

Maximum number of messages to return

nextToken
string

Token for getting the next page of results

previousToken
string

Token for getting the previous page of results

Response

200
application/json
Messages retrieved successfully
messages
object[]
nextToken
string | null

Token for the next page of results

previousToken
string | null

Token for the previous page of results

count
integer

Number of messages in the current page