Skip to main content
Melso Agents is available only internally or by private invitation. Agents-specific features require existing access. For the autónomo fiscal service, see Get started.
Melso has no universal list envelope. Read the endpoint’s response type before iterating.

Tasks: limit and offset

GET /api/tasks accepts limit (default and maximum 100) and offset, and returns tasks with total. Set MELSO_URL and MELSO_API_KEY as in the quickstart.
Increase offset by the number of rows received. Stop at an empty page or when you have read total. New writes can change the result between requests; deduplicate by Task ID when you need a stable local view.

Conversation messages: a two-field cursor

GET /api/tasks/{id}/messages/page returns messages, limit, has_more, and next_cursor. The first page contains the newest messages. When has_more is true, pass the returned cursor’s created_at and id as before_created_at and before_id, respectively. Set TASK_ID to your Task UUID, and the two cursor values to next_cursor.created_at and next_cursor.id from the previous response:
Set the two cursor variables from next_cursor; do not construct a timestamp from the last message alone. Messages and interactions describes ordering and compatibility routes. Other collections may return a bare array or a resource-specific envelope. An array does not imply offset support.