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

# Lay out pages from the rules

> For a brand with no pages: an overview, then a page per group of rules, each in the templates it fits. A start to edit from; 409 when the brand has pages. With `set`, one topic's pages (Our X, Using X, In product, In marketing, Best practices, Showcase) go in beside the pages there are, under `parent`; 409 only when one of their slugs is taken.

Scope: `write`.



## OpenAPI

````yaml /openapi.json post /api/v1/brands/{slug}/pages
openapi: 3.1.0
info:
  title: artbucket
  version: '1'
  description: >-
    Agent-first asset management. The web UI is built on this API and nothing
    else, beside signing in at /api/auth. Send `Authorization: Bearer <key>`: a
    key works in one workspace with one scope, and scopes are a ladder: read <
    propose < write < admin. People signed in to the app carry a session cookie
    instead, and their scope is what their grants add up to: on the
    organization, the workspace, or single collections and assets. A scope shown
    as needed on the workspace is also enough on the one collection or asset a
    route acts on. Agents (MCP at POST /api/v1/mcp) usually get `propose`: what
    they add waits for a human.
servers:
  - url: http://localhost:3000
security:
  - bearer: []
  - session: []
  - {}
paths:
  /api/v1/brands/{slug}/pages:
    parameters:
      - name: slug
        in: path
        required: true
        description: Brand slug
        schema:
          type: string
    post:
      summary: Lay out pages from the rules
      description: >-
        For a brand with no pages: an overview, then a page per group of rules,
        each in the templates it fits. A start to edit from; 409 when the brand
        has pages. With `set`, one topic's pages (Our X, Using X, In product, In
        marketing, Best practices, Showcase) go in beside the pages there are,
        under `parent`; 409 only when one of their slugs is taken.


        Scope: `write`.
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                set:
                  description: Six pages on one topic under parent, beside pages that exist
                  type: object
                  properties:
                    topic:
                      type: string
                      minLength: 1
                      maxLength: 40
                      description: e.g. logo
                    parent:
                      description: >-
                        The page they go under; a new page named for the topic
                        when left out
                      type: string
                      maxLength: 60
                      pattern: ^[a-z0-9]+(-[a-z0-9]+)*$
                  required:
                    - topic
                  additionalProperties: false
              additionalProperties: false
      responses:
        '201':
          description: The pages made
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      brand:
                        type: string
                      pages:
                        type: array
                        items:
                          type: object
                          properties:
                            slug:
                              type: string
                            title:
                              type: string
                            sections:
                              type: integer
                              minimum: -9007199254740991
                              maximum: 9007199254740991
                          required:
                            - slug
                            - title
                            - sections
                          additionalProperties: false
                    required:
                      - brand
                      - pages
                    additionalProperties: false
                required:
                  - data
                additionalProperties: false
        default:
          description: An error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail: {}
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
components:
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: 'An API key: ab_...'
    session:
      type: apiKey
      in: cookie
      name: better-auth.session_token
      description: Signed in, at /api/auth

````