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

# List documents

> Returns a paginated list of documents in your organization. Supports filtering by name and archived status.



## OpenAPI

````yaml /api-reference/openapi.json get /documents
openapi: 3.1.0
info:
  title: ClearPolicy API
  description: >-
    Programmatic access to your organization's people, documents, and
    attestation requests.


    Each API token is limited to 60 requests per minute. Successful responses
    and `429 Too Many Requests` responses include `X-RateLimit-Limit`,
    `X-RateLimit-Remaining`, and `X-RateLimit-Reset` headers.
  version: 1.0.0
servers:
  - url: https://api.clearpolicy.app/api/v1
security:
  - bearerAuth: []
paths:
  /documents:
    get:
      tags:
        - Documents
      summary: List documents
      description: >-
        Returns a paginated list of documents in your organization. Supports
        filtering by name and archived status.
      operationId: listDocuments
      parameters:
        - name: name
          in: query
          description: Filter by document name (case-insensitive partial match).
          schema:
            type: string
            maxLength: 255
        - name: archived
          in: query
          description: >-
            When `true` or `1`, returns only archived documents. When omitted or
            `false`, returns only active documents.
          schema:
            type: string
            enum:
              - 'true'
              - 'false'
              - '1'
              - '0'
            default: 'false'
        - name: per_page
          in: query
          description: Number of results per page (1–100).
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
        - name: page
          in: query
          description: Page number to retrieve.
          schema:
            type: integer
            minimum: 1
            default: 1
      responses:
        '200':
          description: A paginated list of documents.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedDocuments'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '429':
          $ref: '#/components/responses/TooManyRequests'
components:
  schemas:
    PaginatedDocuments:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Document'
        links:
          $ref: '#/components/schemas/PaginationLinks'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
    Document:
      type: object
      required:
        - id
        - organization_id
        - name
        - default_attestation_type
        - has_published_revision
        - attestation_counts
        - created_at
        - updated_at
      properties:
        id:
          type: string
          description: The ULID of the document.
        organization_id:
          type: string
          description: The ULID of the organization.
        name:
          type: string
          description: The name of the document.
        default_attestation_type:
          type: string
          enum:
            - acknowledgment
            - signature
          description: The default attestation type for this document.
        renewal_interval_days:
          type:
            - integer
            - 'null'
          description: Number of days before attestations must be renewed, or null.
        auto_renew:
          type: boolean
          description: Whether attestation requests are automatically re-issued on renewal.
        archived_at:
          type:
            - string
            - 'null'
          format: date-time
          description: When the document was archived, or null if active.
        has_published_revision:
          type: boolean
          description: Whether the document has at least one published revision.
        last_updated_at:
          type:
            - string
            - 'null'
          format: date-time
          description: When the latest revision was published, or null.
        attestation_counts:
          $ref: '#/components/schemas/AttestationCounts'
        created_at:
          type: string
          format: date-time
          description: When the document was created.
        updated_at:
          type: string
          format: date-time
          description: When the document was last updated.
    PaginationLinks:
      type: object
      properties:
        first:
          type:
            - string
            - 'null'
        last:
          type:
            - string
            - 'null'
        prev:
          type:
            - string
            - 'null'
        next:
          type:
            - string
            - 'null'
    PaginationMeta:
      type: object
      properties:
        current_page:
          type: integer
        from:
          type:
            - integer
            - 'null'
        last_page:
          type: integer
        per_page:
          type: integer
        to:
          type:
            - integer
            - 'null'
        total:
          type: integer
    Error:
      type: object
      properties:
        error:
          type: string
          description: A human-readable error message.
    AttestationCounts:
      type: object
      required:
        - attested_latest
        - pending_attested
        - attested_outdated
        - unrequested
        - renewal_due
        - total
      properties:
        attested_latest:
          type: integer
          description: People who have attested to the latest revision.
        pending_attested:
          type: integer
          description: People with a pending attestation request.
        attested_outdated:
          type: integer
          description: People who attested to an older revision.
        unrequested:
          type: integer
          description: People who have not been sent an attestation request.
        renewal_due:
          type: integer
          description: People whose attestation renewal is due.
        total:
          type: integer
          description: Total number of people assigned to this document.
  responses:
    Unauthorized:
      description: Missing or invalid access token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    PaymentRequired:
      description: Trial expired or subscription inactive.
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
              payment_url:
                type: string
                format: uri
    TooManyRequests:
      description: >-
        Rate limit exceeded. Each API token is limited to 60 requests per
        minute.
      headers:
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            type: integer
            example: 42
        X-RateLimit-Limit:
          description: Maximum requests allowed per minute for this token.
          schema:
            type: integer
            example: 60
        X-RateLimit-Remaining:
          description: Requests remaining in the current window.
          schema:
            type: integer
            example: 0
        X-RateLimit-Reset:
          description: Unix timestamp when the rate limit resets.
          schema:
            type: integer
            example: 1719532800
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                example: Too Many Attempts.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer token created in ClearPolicy API settings with the `api:use`
        scope.

````