> ## 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.

# Create site pages

> Deprecated, will be removed in future versions. Please use the Apps equivalent.



## OpenAPI

````yaml /api-reference/openapi.json post /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:
    post:
      tags:
        - Content
      summary: Create site pages
      description: >-
        Deprecated, will be removed in future versions. Please use the Apps
        equivalent.
      operationId: postSitePages
      requestBody:
        required: true
        content:
          application/json:
            schema:
              anyOf:
                - type: object
                  properties:
                    productId:
                      type: string
                      minLength: 1
                      description: >-
                        Product ID. Provide exactly one of `productId` or
                        `productSlug` in the request body (the server enforces
                        this).
                    productSlug:
                      type: string
                      minLength: 1
                      description: >-
                        Product slug. Provide exactly one of `productId` or
                        `productSlug` in the request body (the server enforces
                        this).
                    pages:
                      type: array
                      items:
                        type: object
                        properties:
                          slug:
                            type: string
                            description: Page slug or file path, for example 'blog/my-post'
                          title:
                            type: string
                            description: Page title
                          content:
                            type: string
                            description: Markdown content for the page
                          description:
                            type: string
                            description: Optional page description
                          metaTitle:
                            type: string
                            description: Optional SEO meta title
                          metaDescription:
                            type: string
                            description: Optional SEO meta description
                          domainIds:
                            type: array
                            items:
                              type: string
                            description: >-
                              Optional custom domain IDs to attach to the page.
                              Domains must belong to the product and be active
                              web domains.
                          canonicalDomainId:
                            type: string
                            description: >-
                              Optional attached custom domain ID to mark as
                              canonical and use for the page source URL.
                        required:
                          - slug
                          - title
                          - content
                      minItems: 1
                      maxItems: 25
                  required:
                    - productId
                    - pages
                - type: object
                  properties:
                    productId:
                      type: string
                      minLength: 1
                      description: >-
                        Product ID. Provide exactly one of `productId` or
                        `productSlug` in the request body (the server enforces
                        this).
                    productSlug:
                      type: string
                      minLength: 1
                      description: >-
                        Product slug. Provide exactly one of `productId` or
                        `productSlug` in the request body (the server enforces
                        this).
                    pages:
                      type: array
                      items:
                        type: object
                        properties:
                          slug:
                            type: string
                            description: Page slug or file path, for example 'blog/my-post'
                          title:
                            type: string
                            description: Page title
                          content:
                            type: string
                            description: Markdown content for the page
                          description:
                            type: string
                            description: Optional page description
                          metaTitle:
                            type: string
                            description: Optional SEO meta title
                          metaDescription:
                            type: string
                            description: Optional SEO meta description
                          domainIds:
                            type: array
                            items:
                              type: string
                            description: >-
                              Optional custom domain IDs to attach to the page.
                              Domains must belong to the product and be active
                              web domains.
                          canonicalDomainId:
                            type: string
                            description: >-
                              Optional attached custom domain ID to mark as
                              canonical and use for the page source URL.
                        required:
                          - slug
                          - title
                          - content
                      minItems: 1
                      maxItems: 25
                  required:
                    - productSlug
                    - pages
      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
                      createdCount:
                        type: integer
                        minimum: 0
                      failedCount:
                        type: integer
                        minimum: 0
                      created:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            slug:
                              type: string
                            title:
                              type: string
                            sourceUrl:
                              type: string
                            status:
                              type: string
                            domains:
                              type: array
                              items:
                                type: object
                                properties:
                                  id:
                                    type: string
                                  domain:
                                    type: string
                                  isCanonical:
                                    type: boolean
                                required:
                                  - id
                                  - domain
                                  - isCanonical
                          required:
                            - id
                            - slug
                            - title
                            - sourceUrl
                            - status
                            - domains
                      failed:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            slug:
                              type: string
                            message:
                              type: string
                          required:
                            - slug
                            - message
                    required:
                      - scope
                      - createdCount
                      - failedCount
                      - created
                      - failed
                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.

````