> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sidenet.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# List conversation threads

> Returns a paginated list of conversation threads filtered by the authenticated user's resourceId (orgId_userId). Requires authentication.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/threads
openapi: 3.1.0
info:
  title: Sidenet API
  version: 1.0.0
  description: >-
    Custom HTTP endpoints exposed by the Sidenet Mastra server. All routes
    require a bearer token and resolve org context from the API key (or the
    `X-Organization-Id` header). This reference is generated from the live route
    definitions in `src/mastra/routes`.
servers:
  - url: ''
security:
  - bearerAuth: []
paths:
  /v1/threads:
    servers:
      - url: /
    get:
      tags:
        - V1
      summary: List conversation threads
      description: >-
        Returns a paginated list of conversation threads filtered by the
        authenticated user's resourceId (orgId_userId). Requires authentication.
      parameters:
        - name: page
          in: query
          required: false
          description: Page number (default 1)
          schema:
            type: number
            minimum: 1
            default: 1
        - name: perPage
          in: query
          required: false
          description: Items per page (default 20, max 100)
          schema:
            type: number
            minimum: 1
            maximum: 100
            default: 20
        - name: orderBy
          in: query
          required: false
          description: 'Field to order by: createdAt or updatedAt (default updatedAt)'
          schema:
            type: string
            enum:
              - createdAt
              - updatedAt
            default: updatedAt
        - name: order
          in: query
          required: false
          description: 'Sort order: asc or desc (default desc)'
          schema:
            type: string
            enum:
              - asc
              - desc
            default: desc
        - name: threadId
          in: query
          required: false
          description: Filter by specific thread ID
          schema:
            type: string
        - name: X-Organization-Id
          in: header
          required: false
          schema:
            type: string
          description: >-
            Organization to scope the request to. Optional when authenticating
            with an org API key (the org is taken from the key; if sent, it must
            match). Required when authenticating with the trusted key.
        - name: X-User-Id
          in: header
          required: false
          schema:
            type: string
          description: >-
            End-user identity for the request; user-scoped data (threads,
            memory) resolves to `{orgId}_{userId}`. Required by endpoints that
            read or write user-scoped resources. A `userId` query param (or body
            field, where documented) is accepted as a fallback.
      responses:
        '200':
          description: Paginated list of threads
          content:
            application/json:
              schema:
                type: object
                properties:
                  threads:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        title:
                          type: string
                        resourceId:
                          type: string
                        createdAt:
                          type: string
                          format: date-time
                        updatedAt:
                          type: string
                          format: date-time
                        metadata:
                          type: object
                  page:
                    type: number
                  perPage:
                    type: number
                  total:
                    type: number
                  hasMore:
                    type: boolean
        '400':
          description: Bad request - missing organization or user ID
        '500':
          description: Internal server error
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Org API key (scopes the request to its organization) or the shared
        trusted key (requires `X-Organization-Id` on every request).

````