> For the complete documentation index, see [llms.txt](https://docs.ibexa.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ibexa.ai/developers/rest-api/messages/list-messages.md).

# List Messages

List messages for a conversation with cursor-based pagination.

Messages are returned in reverse chronological order (newest first). Use the `next_cursor` from the response to fetch the next page.

* Omit cursor to start from the newest message
* Use next\_cursor to paginate through older messages

```json
{"openapi":"3.1.0","info":{"title":"Ibexa Agentic Marketing Platform","version":"0.1.0"},"security":[{"OAuth2PasswordBearer":[]}],"components":{"securitySchemes":{"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"/api/v1/login/access-token"}}}},"schemas":{"MessageListResponseSchema":{"properties":{"messages":{"items":{"$ref":"#/components/schemas/app__api__routes__message__message__MessageResponseSchema"},"type":"array","title":"Messages"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"has_more":{"type":"boolean","title":"Has More"}},"type":"object","required":["messages","next_cursor","has_more"],"title":"MessageListResponseSchema","description":"Pydantic schema for paginated message list response."},"app__api__routes__message__message__MessageResponseSchema":{"properties":{"id":{"type":"integer","title":"Id"},"conversation_id":{"type":"integer","title":"Conversation Id"},"role":{"type":"string","title":"Role"},"content":{"type":"string","title":"Content"},"action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"},"tool_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool Name"},"tool_status":{"anyOf":[{"$ref":"#/components/schemas/ToolCallStatus"},{"type":"null"}],"description":"How a tool call ended. Null on every message that is not a tool result, and on tool results from runs that predate the outcome being recorded — null never means the call succeeded"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","conversation_id","role","content","action","tool_name","created_at"],"title":"MessageResponseSchema","description":"Pydantic schema for message response."},"ToolCallStatus":{"type":"string","enum":["success","error"],"title":"ToolCallStatus","description":"How a tool call ended, as the model was told.\n\nA failing tool does not end the run: tool errors are turned into ordinary\ntool messages carrying this status, so the agent can read the failure and\ncarry on. That makes this the only record of which calls actually worked —\nabsence of the status means unknown, never success."}}},"paths":{"/api/v1/conversations/{conversation_id}/messages/":{"get":{"tags":["messages","public"],"summary":"List Messages","description":"List messages for a conversation with cursor-based pagination.\n\nMessages are returned in reverse chronological order (newest first).\nUse the `next_cursor` from the response to fetch the next page.\n\n- Omit cursor to start from the newest message\n- Use next_cursor to paginate through older messages","operationId":"messages-list_messages","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"integer","title":"Conversation Id"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pagination cursor (base64 encoded)","title":"Cursor"},"description":"Pagination cursor (base64 encoded)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of messages to return","default":25,"title":"Limit"},"description":"Maximum number of messages to return"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageListResponseSchema"}}}},"401":{"description":"User not authenticated","content":{"application/json":{}}},"403":{"description":"User lacks permission","content":{"application/json":{}}},"404":{"description":"Resource not found or user has no permission to access it","content":{"application/json":{}}}}}}}}
```
