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

# Create a page

> Born a DRAFT: it answers nobody until `POST :id/publish`. An `agent` page (default) needs an agent; a `document` page (D-47) renders an uploaded markdown body.



## OpenAPI

````yaml /openapi.json post /v1/pages
openapi: 3.0.0
info:
  title: wondeya Developer API
  description: >-
    The public REST API for building on wondeya: agents, projects, pages,
    knowledge, assets, brand, theme, usage, retrieval and chat, authenticated by
    a workspace API key (`Authorization: Bearer wdy_live_…`).
  version: 0.1.0
  contact:
    name: wondeya
    url: https://wondeya.com
    email: team@wondeya.com
  license:
    name: Proprietary
    url: https://wondeya.com/terms
servers:
  - url: https://api.wondeya.com
    description: Production
  - url: http://localhost:8080
    description: Development
security: []
tags:
  - name: Identity
  - name: Agents
  - name: Projects
  - name: Pages
  - name: Knowledge
  - name: Assets
  - name: Brand
  - name: Usage
  - name: Chat
paths:
  /v1/pages:
    post:
      tags:
        - Pages
      summary: Create a page
      description: >-
        Born a DRAFT: it answers nobody until `POST :id/publish`. An `agent`
        page (default) needs an agent; a `document` page (D-47) renders an
        uploaded markdown body.
      operationId: PublicPagesController_create_v1
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePublicPageDto'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicPageDto'
        '402':
          description: '`wondeya.billing.limit_reached`: the plan is at its page cap'
      security:
        - api-key: []
components:
  schemas:
    CreatePublicPageDto:
      type: object
      properties:
        name:
          type: string
          maxLength: 80
          description: >-
            Optional at create (C10): a page can be born as a minimal draft from
            its kind alone and be named on its settings screen. Publishing does
            not require a name; the console shows a placeholder for an unnamed
            draft.
        kind:
          type: string
          enum:
            - agent
            - document
          description: >-
            What the page is (D-47). `agent` (default) is a conversational page
            with an agent and editorial; `document` renders an uploaded markdown
            `body` and takes no agent or editorial.
        agentId:
          type: string
          description: >-
            The agent that answers on this page. Optional: a draft may leave it
            unset (auto-assigned when the workspace has exactly one agent), but
            publishing an `agent` page requires one. A `document` page has none.
        body:
          description: >-
            The markdown of a `document` page (D-47), per language. Optional at
            create (a document draft may start empty; publishing requires the
            source language); absent for an `agent` page.
          allOf:
            - $ref: '#/components/schemas/PageBodyDto'
        path:
          type: string
          maxLength: 200
          description: >-
            The address under the workspace host. `/` is the home page, and
            exactly one page per workspace has it. Otherwise up to 4 segments of
            letters, digits and single hyphens (`/pymes`, `/enterprise/latam`).
            Case-insensitive and stored lowercase. Never percent-encoded, never
            a dot segment. Reserved by the platform (and their whole subtree):
            admin, api, app, cdn, console, docs, embed, mail, status, storage,
            well-known, widget, www. Defaults to `/` when nothing serves the
            home page yet, and otherwise to a path derived from the name.
        defaultLocale:
          type: string
          enum:
            - es
            - en
          description: >-
            The language the owner writes this page in (D-44). Must be one the
            SITE serves; defaults to the project’s source language. Which
            languages are SERVED is the project’s setting.
        projectId:
          type: string
          description: >-
            The site (project) this page is created inside. Optional only while
            the workspace has exactly one; required with several.
    PublicPageDto:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        kind:
          type: string
          enum:
            - agent
            - document
          description: '`agent` or `document` (D-47).'
        path:
          type: string
          description: The address under the site host. `/` is home.
        status:
          type: string
          description: '`draft` or `published`.'
        agentId:
          type: string
          description: The brain that answers here. Absent for a document page.
        projectId:
          type: string
          description: The site (project) the page lives in.
        defaultLocale:
          type: string
          enum:
            - es
            - en
        editorial:
          description: The owner-written framing (agent page). Empty for a document.
          allOf:
            - $ref: '#/components/schemas/PublicPageEditorialDto'
        seo:
          $ref: '#/components/schemas/PublicPageSeoDto'
        sitemap:
          $ref: '#/components/schemas/PublicPageSitemapDto'
        body:
          description: The markdown of a document page. Empty for an agent page.
          allOf:
            - $ref: '#/components/schemas/PublicLocalizedTextDto'
        publishedAt:
          type: string
          format: date-time
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - id
        - name
        - kind
        - path
        - status
        - defaultLocale
        - editorial
        - seo
        - sitemap
        - body
        - createdAt
        - updatedAt
    PageBodyDto:
      type: object
      properties:
        es:
          type: string
          description: Spanish markdown.
        en:
          type: string
          description: English markdown.
    PublicPageEditorialDto:
      type: object
      properties:
        badge:
          $ref: '#/components/schemas/PublicLocalizedTextDto'
        title:
          $ref: '#/components/schemas/PublicLocalizedTextDto'
        titleAccent:
          $ref: '#/components/schemas/PublicLocalizedTextDto'
        description:
          $ref: '#/components/schemas/PublicLocalizedTextDto'
      required:
        - badge
        - title
        - titleAccent
        - description
    PublicPageSeoDto:
      type: object
      properties:
        title:
          $ref: '#/components/schemas/PublicLocalizedTextDto'
        description:
          $ref: '#/components/schemas/PublicLocalizedTextDto'
      required:
        - title
        - description
    PublicPageSitemapDto:
      type: object
      properties:
        priority:
          type: number
          minimum: 0
          maximum: 1
        changefreq:
          type: string
          enum:
            - always
            - hourly
            - daily
            - weekly
            - monthly
            - yearly
            - never
        sitemapExclude:
          type: boolean
          description: Keep the page OUT of the sitemap.
    PublicLocalizedTextDto:
      type: object
      properties:
        es:
          type: string
        en:
          type: string
  securitySchemes:
    api-key:
      scheme: bearer
      bearerFormat: opaque
      type: http
      description: >-
        A workspace API key: wdy_live_… / wdy_test_…. Created at POST
        /workspaces/{tenantId}/keys and shown exactly once.

````