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

# List documents

> The documents of a workspace's knowledge base.



## OpenAPI

````yaml https://staging.soma.evarist.com/v1/openapi.json get /workspaces/{workspace_id}/documents
openapi: 3.1.0
info:
  title: Soma API
  summary: 'Your organization''s knowledge: documents, search, knowledge graph, answers.'
  description: >-
    Authenticate with `Authorization: Bearer <token>`: an OAuth access token
    (the Soma CLI and MCP clients get one by signing in) or an API key created
    in Soma under Account settings.
  version: 1.0.0
servers:
  - url: https://staging.soma.evarist.com/v1
security: []
paths:
  /workspaces/{workspace_id}/documents:
    get:
      tags:
        - Documents
      summary: List documents
      description: The documents of a workspace's knowledge base.
      operationId: list_documents_workspaces__workspace_id__documents_get
      parameters:
        - name: workspace_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Workspace Id
        - name: q
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter on the title (case-insensitive substring).
            title: Q
          description: Filter on the title (case-insensitive substring).
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 200
            minimum: 1
            default: 50
            title: Limit
        - name: cursor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Cursor
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Page_Document_'
        '404':
          description: Not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    Page_Document_:
      properties:
        data:
          items:
            $ref: '#/components/schemas/Document'
          type: array
          title: Data
        has_more:
          type: boolean
          title: Has More
          description: Whether another page follows.
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
          description: Pass as `cursor` to get the next page.
      type: object
      required:
        - data
        - has_more
      title: Page[Document]
    Error:
      properties:
        error:
          $ref: '#/components/schemas/Body'
      type: object
      required:
        - error
      title: Error
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Document:
      properties:
        id:
          type: string
          title: Id
        title:
          type: string
          title: Title
        provider:
          anyOf:
            - type: string
            - type: 'null'
          title: Provider
          description: gdrive, notion, github, upload…
        chunk_count:
          type: integer
          title: Chunk Count
        has_tables:
          type: boolean
          title: Has Tables
      type: object
      required:
        - id
        - title
        - chunk_count
        - has_tables
      title: Document
    Body:
      properties:
        type:
          type: string
          title: Type
        message:
          type: string
          title: Message
      type: object
      required:
        - type
        - message
      title: Body
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      description: An OAuth access token (`soma_at_…`) or an API key (`scribe_mcp_…`).
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.