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

# List documents

> Returns documents in the workspace, newest change first. Use `search` to resolve a document you did not create through the API into a `document_id`: it matches the title.

⚠️ `content` is **not** included here — a document holds up to 2MB of it. Fetch the single document to read it.



## OpenAPI

````yaml /docs/api/openapi-v2.yaml get /documents
openapi: 3.1.0
info:
  title: Sleekplan API v2
  version: '2.0'
  description: >-
    The `/v2` namespace sits alongside the existing [`/v1`
    API](/docs/api/overview) — it is not a replacement. The same API key
    authenticates both.


    `/v2` accepts **Bearer tokens only**, and carries no workspace ID in the URL
    because the key identifies the workspace. Changes are additive: fields and
    endpoints are added, never removed or renamed.


    See [API v2](/docs/api/v2) for authentication, the error keys, and the rate
    limit.
servers:
  - url: https://api.sleekplan.com/v2
    description: API Version 2
security:
  - BearerAuth: []
tags:
  - name: Group
    description: B2B groups — companies, accounts or teams — and their members.
  - name: Document
    description: >-
      The thinking behind your feedback — a plan, a spec, research, or the
      record of a decision.
paths:
  /documents:
    get:
      tags:
        - Document
      summary: List documents
      description: >-
        Returns documents in the workspace, newest change first. Use `search` to
        resolve a document you did not create through the API into a
        `document_id`: it matches the title.


        ⚠️ `content` is **not** included here — a document holds up to 2MB of
        it. Fetch the single document to read it.
      operationId: v2-list-documents
      parameters:
        - in: query
          name: search
          schema:
            type: string
          description: Partial match on the title.
        - in: query
          name: type
          schema:
            type: string
          description: Filter by document type key.
        - in: query
          name: status
          schema:
            type: string
            enum:
              - draft
              - published
              - archived
        - in: query
          name: page
          schema:
            type: integer
            default: 0
        - in: query
          name: per_page
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 30
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                  data:
                    type: object
                    properties:
                      items:
                        type: array
                        items:
                          $ref: '#/components/schemas/DocumentListItem'
                      has_more:
                        type: boolean
                      page:
                        type: integer
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  schemas:
    DocumentListItem:
      type: object
      description: >-
        A document as the list endpoint returns it — the full shape minus
        `content`.
      properties:
        document_id:
          type: integer
        title:
          type: string
        slug:
          type: string
        document_type:
          type: string
        tags:
          type: array
          items:
            type: string
        status:
          type: string
          enum:
            - draft
            - published
            - archived
        current_version:
          type: integer
        created:
          type: string
        updated:
          type: string
    Error:
      type: object
      properties:
        status:
          type: string
          example: error
        data:
          type: object
          properties:
            key:
              type: string
            message:
              type: string
  responses:
    Unauthorized:
      description: Missing, malformed, or non-API-key credential
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: The key's user lacks the permission for this action
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RateLimited:
      description: Over 300 requests in 60 seconds
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: '`Authorization: Bearer YOUR_API_KEY`. /v2 accepts no other method.'

````