---
updatedAt: 2026-04-20T23:20:34.000Z
agentTools:
  projectIndex: https://docs.sivo.xyz/llms.txt
---

# List all messages

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Sivo DeFi API",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://core.sivo.xyz"
    }
  ],
  "security": [
    {
      "APIKeyAuth": []
    },
    {
      "OAuth2": []
    }
  ],
  "components": {
    "securitySchemes": {
      "APIKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization"
      },
      "OAuth2": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://core.sivo.xyz/oauth/token",
            "scopes": {}
          },
          "authorizationCode": {
            "authorizationUrl": "https://sivo.xyz/oauth/authorize",
            "tokenUrl": "https://core.sivo.xyz/oauth/token",
            "refreshUrl": "https://core.sivo.xyz/oauth/token",
            "scopes": {}
          }
        }
      }
    }
  },
  "paths": {
    "/threads/{id}/messages": {
      "get": {
        "summary": "List all messages",
        "tags": [
          "AI agent"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{3,7}_[0-9A-Za-z]{27}$",
              "description": "An object id with prefix",
              "example": "user_0123456789ABCDEFGHIJKLMNOPq"
            },
            "required": true,
            "description": "An object id with prefix",
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": [
                "number",
                "null"
              ]
            },
            "required": false,
            "name": "per_page",
            "in": "query"
          },
          {
            "schema": {
              "type": [
                "number",
                "null"
              ]
            },
            "required": false,
            "name": "page",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "role": {
                        "type": "string",
                        "enum": [
                          "user",
                          "assistant",
                          "system"
                        ]
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time",
                        "description": "[ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time. See [Dates and Times](/docs/dates-and-times).",
                        "example": "2024-01-15T10:30:00Z"
                      },
                      "content": {
                        "type": "object",
                        "properties": {
                          "parts": {
                            "type": "array",
                            "items": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "text": {
                                      "type": "string"
                                    },
                                    "type": {
                                      "type": "string",
                                      "enum": [
                                        "text"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "text",
                                    "type"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "enum": [
                                        "tool_invocation"
                                      ]
                                    },
                                    "toolInvocation": {}
                                  },
                                  "required": [
                                    "type"
                                  ]
                                }
                              ]
                            }
                          },
                          "content": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "parts"
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "role",
                      "content"
                    ]
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
```