Ir al contenido

Get user conversations with pagination

GET
/ai-agents/chat/conversations
curl --request GET \
--url 'https://api.matiasimpulso.com/ai-agents/chat/conversations?searchParam=session_123&page=1&limit=25&skip=0&sort=startedAt&dir=asc&status=active&includeTestConversations=false' \
--header 'Authorization: Bearer <token>'
searchParam
string

Example

session_123

Search parameter for filtering conversations

page
number
default: 1

Example

1

Page number for pagination

limit
number
default: 25

Example

25

Number of items per page

skip
number

Example

0

Number of items to skip

sort
string
default: startedAt
Allowed values: startedAt updatedAt status totalMessages

Example

startedAt

Field to sort by

dir
string
default: desc
Allowed values: asc desc ASC DESC

Example

desc

Sort direction

status
string
Allowed values: active closed pending

Example

active

Filter by conversation status

includeTestConversations
boolean

Example

false

Include test conversations (Sprint 2.7)

Paginated conversations retrieved successfully