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

# List site pages

> List pages for a product. You must provide exactly one of `productId` or `productSlug` as a query parameter to identify the target product.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/site/pages
openapi: 3.1.0
info:
  title: The Prompting Company API
  version: 0.1.0
  description: >-
    Machine-readable contract for The Prompting Company organization-scoped API
    routes.
  contact:
    name: The Prompting Company
    url: https://promptingcompany.com/support
    email: support@promptingcompany.com
  license:
    name: Proprietary
    url: https://promptingcompany.com/terms
  termsOfService: https://promptingcompany.com/terms
servers:
  - url: https://app.promptingco.com
    description: Production
  - url: http://localhost:3000
    description: Local development
security: []
tags:
  - name: Visibility & Mentions
  - name: Knowledge
  - name: Content
  - name: Simulations
  - name: Apps & Publishing
paths:
  /api/v1/site/pages:
    get:
      tags:
        - Content
      summary: List site pages
      description: >-
        List pages for a product. You must provide exactly one of `productId` or
        `productSlug` as a query parameter to identify the target product.
      operationId: getSitePages
      parameters:
        - schema:
            type: string
            minLength: 1
            description: >-
              Product ID. Provide exactly one of `productId` or `productSlug`
              (the server enforces this at runtime).
          required: false
          description: >-
            Product ID. Provide exactly one of `productId` or `productSlug` (the
            server enforces this at runtime).
          name: productId
          in: query
        - schema:
            type: string
            minLength: 1
            description: >-
              Product slug. Provide exactly one of `productId` or `productSlug`
              (the server enforces this at runtime).
          required: false
          description: >-
            Product slug. Provide exactly one of `productId` or `productSlug`
            (the server enforces this at runtime).
          name: productSlug
          in: query
        - schema:
            type: integer
          required: false
          name: page
          in: query
        - schema:
            type: integer
          required: false
          name: pageSize
          in: query
        - schema:
            type: string
            enum:
              - createdAt
              - updatedAt
              - deletedAt
          required: false
          name: orderBy
          in: query
        - schema:
            type: string
            enum:
              - asc
              - desc
          required: false
          name: orderByDirection
          in: query
        - schema:
            type: string
          required: false
          name: query
          in: query
        - schema:
            type: string
          required: false
          name: q
          in: query
        - schema:
            type: string
            enum:
              - draft
              - published
          required: false
          name: status
          in: query
        - schema:
            type: string
          required: false
          name: type
          in: query
        - schema:
            type: boolean
          required: false
          name: isManual
          in: query
        - schema:
            type: string
          required: false
          name: pathPrefix
          in: query
        - schema:
            type: boolean
          required: false
          name: hasContent
          in: query
        - schema:
            type: string
          required: false
          name: domainId
          in: query
        - schema:
            type: string
          required: false
          name: domain
          in: query
        - schema:
            type: string
            enum:
              - active
              - archived
              - all
          required: false
          name: archivedStatus
          in: query
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                      - true
                  data:
                    type: object
                    properties:
                      scope:
                        type: object
                        properties:
                          product:
                            type: object
                            properties:
                              id:
                                type: string
                              name:
                                type: string
                              slug:
                                type:
                                  - string
                                  - 'null'
                            required:
                              - id
                              - name
                              - slug
                          organization:
                            type: object
                            properties:
                              id:
                                type: string
                              name:
                                type: string
                              slug:
                                type: string
                            required:
                              - id
                              - name
                              - slug
                        required:
                          - product
                          - organization
                      page:
                        type: integer
                        exclusiveMinimum: 0
                      pageSize:
                        type: integer
                        exclusiveMinimum: 0
                      query:
                        type:
                          - string
                          - 'null'
                      status:
                        type:
                          - string
                          - 'null'
                      type:
                        type:
                          - string
                          - 'null'
                      isManual:
                        type:
                          - boolean
                          - 'null'
                      pathPrefix:
                        type:
                          - string
                          - 'null'
                      hasContent:
                        type:
                          - boolean
                          - 'null'
                      domainId:
                        type:
                          - string
                          - 'null'
                      domain:
                        type:
                          - string
                          - 'null'
                      archivedStatus:
                        type: string
                        enum:
                          - active
                          - archived
                          - all
                      orderBy:
                        type: string
                        enum:
                          - createdAt
                          - updatedAt
                          - deletedAt
                      orderByDirection:
                        type: string
                        enum:
                          - asc
                          - desc
                      total:
                        type: integer
                        minimum: 0
                      totalPages:
                        type: integer
                        minimum: 0
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            title:
                              type: string
                            filePath:
                              type: string
                            sourceUrl:
                              type: string
                            status:
                              type: string
                            type:
                              type: string
                            isManual:
                              type: boolean
                            metaTitle:
                              type:
                                - string
                                - 'null'
                            metaDescription:
                              type:
                                - string
                                - 'null'
                            publishedAt:
                              type:
                                - string
                                - 'null'
                              format: date-time
                            deletedAt:
                              type:
                                - string
                                - 'null'
                              format: date-time
                            createdAt:
                              type: string
                              format: date-time
                            updatedAt:
                              type: string
                              format: date-time
                            domains:
                              type: array
                              items:
                                type: object
                                properties:
                                  id:
                                    type: string
                                  domain:
                                    type: string
                                  isCanonical:
                                    type: boolean
                                required:
                                  - id
                                  - domain
                                  - isCanonical
                          required:
                            - id
                            - title
                            - filePath
                            - sourceUrl
                            - status
                            - type
                            - isManual
                            - metaTitle
                            - metaDescription
                            - publishedAt
                            - deletedAt
                            - createdAt
                            - updatedAt
                            - domains
                    required:
                      - scope
                      - page
                      - pageSize
                      - query
                      - status
                      - type
                      - isManual
                      - pathPrefix
                      - hasContent
                      - domainId
                      - domain
                      - archivedStatus
                      - orderBy
                      - orderByDirection
                      - total
                      - totalPages
                      - items
                required:
                  - ok
                  - data
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                      - false
                  code:
                    type: string
                  message:
                    type: string
                  details: {}
                required:
                  - ok
                  - code
                  - message
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                      - false
                  code:
                    type: string
                  message:
                    type: string
                  details: {}
                required:
                  - ok
                  - code
                  - message
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                      - false
                  code:
                    type: string
                  message:
                    type: string
                  details: {}
                required:
                  - ok
                  - code
                  - message
        '404':
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                      - false
                  code:
                    type: string
                  message:
                    type: string
                  details: {}
                required:
                  - ok
                  - code
                  - message
        '422':
          description: Validation failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                      - false
                  code:
                    type: string
                  message:
                    type: string
                  details: {}
                required:
                  - ok
                  - code
                  - message
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                      - false
                  code:
                    type: string
                  message:
                    type: string
                  details: {}
                required:
                  - ok
                  - code
                  - message
      security:
        - apiKeyAuth: []
        - bearerAuth: []
        - cookieAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Organization-scoped API key. Available scopes:

        - content:read: Read site pages, markdown content, and llms.txt files

        - content:write: Create, update, and delete site pages and content

        - prompts:read: Read prompts, topics, and prompt analysis results

        - prompts:write: Create, update, archive prompts

        - simulations:read: Read agent-simulation tasks, runs, environments, and
        analytics

        - simulations:write: Create and trigger simulation runs

        - logs:read: Read AI-traffic logs and request-level audit events

        - analytics:read: Read analytics aggregates (rankings, mentions,
        sources, SOV)

        - products:read: Read product metadata and competitor data

        - products:write: Update product settings and competitor lists
      x-scopes:
        content:read: Read site pages, markdown content, and llms.txt files
        content:write: Create, update, and delete site pages and content
        prompts:read: Read prompts, topics, and prompt analysis results
        prompts:write: Create, update, archive prompts
        simulations:read: Read agent-simulation tasks, runs, environments, and analytics
        simulations:write: Create and trigger simulation runs
        logs:read: Read AI-traffic logs and request-level audit events
        analytics:read: Read analytics aggregates (rankings, mentions, sources, SOV)
        products:read: Read product metadata and competitor data
        products:write: Update product settings and competitor lists
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Bearer session or OAuth access token. Available OAuth scopes:

        - content:read: Read site pages, markdown content, and llms.txt files

        - content:write: Create, update, and delete site pages and content

        - prompts:read: Read prompts, topics, and prompt analysis results

        - prompts:write: Create, update, archive prompts

        - simulations:read: Read agent-simulation tasks, runs, environments, and
        analytics

        - simulations:write: Create and trigger simulation runs

        - logs:read: Read AI-traffic logs and request-level audit events

        - analytics:read: Read analytics aggregates (rankings, mentions,
        sources, SOV)

        - products:read: Read product metadata and competitor data

        - products:write: Update product settings and competitor lists
      x-scopes:
        content:read: Read site pages, markdown content, and llms.txt files
        content:write: Create, update, and delete site pages and content
        prompts:read: Read prompts, topics, and prompt analysis results
        prompts:write: Create, update, archive prompts
        simulations:read: Read agent-simulation tasks, runs, environments, and analytics
        simulations:write: Create and trigger simulation runs
        logs:read: Read AI-traffic logs and request-level audit events
        analytics:read: Read analytics aggregates (rankings, mentions, sources, SOV)
        products:read: Read product metadata and competitor data
        products:write: Update product settings and competitor lists
    cookieAuth:
      type: apiKey
      in: cookie
      name: better-auth.session_token
      description: First-party browser session cookie.

````