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

# Edit a builder page with patches

> Requires page.update. Applies up to 30 patches to a builder page and saves it; call publishPage again to update the live page. Node ids come from getPage (payload.tree). Operations: set-prop { nodeId, key, value }; set-style { nodeId, key, value } (CSS property in camelCase); replace-subtree { nodeId, node }; insert-child { parentId ("__root__" for a new section), index, node }; remove-node { nodeId }; move-node { nodeId, newParentId, newIndex }; set-theme { key: primary | accent, value } (mode is not applied to saved pages); patch-page-settings { seo?, customCss?, scripts?, preconnectUrls? }. A node is { type, props?, styles?, children? } with type one of: badge, button, container, divider, feature-line, grid, heading, icon, image, spacer, text, video. Text lives in props (heading.text, text.content as HTML, button.label, image.src/alt, badge.text). Rejected patches are explained in warnings.



## OpenAPI

````yaml https://api.trackup.me/openapi.json post /v1/projects/{id}/pages/{pageId}/patches
openapi: 3.1.0
info:
  title: Trackup API
  description: >-
    API-key-accessible Trackup operations. Send your key in the `X-Api-Key`
    header.


    Keys belong to a team. `X-Team-Id` is not required; if supplied, it must
    match that team.


    Each operation lists its required key permission. The key creator must
    remain a team member and normally hold that permission. The ingest-only
    permissions `visitor.create`, `conversion.create`, and `request.create` do
    not need to be held by the creator.


    Project access and selection are described per operation. Session-only
    account, administration and OAuth operations are not part of this reference.


    The same operations are available as MCP tools at `/mcp` (Streamable HTTP).
    Authenticate with `X-Api-Key` or connect through OAuth, which issues an API
    key on consent.


    Schema validation errors return HTTP 422 with an `errors` object. Other
    errors generally contain `error` and `message`; operation-specific responses
    describe exceptions.
  version: 1.0.0
servers:
  - url: /
    description: Current API environment
security:
  - ApiKey: []
paths:
  /v1/projects/{id}/pages/{pageId}/patches:
    post:
      tags:
        - Pages
      summary: Edit a builder page with patches
      description: >-
        Requires page.update. Applies up to 30 patches to a builder page and
        saves it; call publishPage again to update the live page. Node ids come
        from getPage (payload.tree). Operations: set-prop { nodeId, key, value
        }; set-style { nodeId, key, value } (CSS property in camelCase);
        replace-subtree { nodeId, node }; insert-child { parentId ("__root__"
        for a new section), index, node }; remove-node { nodeId }; move-node {
        nodeId, newParentId, newIndex }; set-theme { key: primary | accent,
        value } (mode is not applied to saved pages); patch-page-settings {
        seo?, customCss?, scripts?, preconnectUrls? }. A node is { type, props?,
        styles?, children? } with type one of: badge, button, container,
        divider, feature-line, grid, heading, icon, image, spacer, text, video.
        Text lives in props (heading.text, text.content as HTML, button.label,
        image.src/alt, badge.text). Rejected patches are explained in warnings.
      operationId: editBuilderPage
      parameters:
        - in: path
          name: id
          schema:
            type: string
            format: uuid
          required: true
        - in: path
          name: pageId
          schema:
            type: string
            format: uuid
          required: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                patches:
                  type: array
                  items:
                    type: object
                    properties:
                      op:
                        type: string
                        enum:
                          - set-prop
                          - set-style
                          - replace-subtree
                          - insert-child
                          - remove-node
                          - move-node
                          - set-theme
                          - patch-page-settings
                    required:
                      - op
                    additionalProperties: true
                  minItems: 1
                  maxItems: 30
              required:
                - patches
      responses:
        '200':
          description: Saved page, applied patch count and warnings.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EditedBuilderPage'
        '401':
          description: The X-Api-Key header is missing or the API key is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '403':
          description: >-
            The key is expired, revoked, lacks permission, or its creator no
            longer has the required team access. A conflicting X-Team-Id is also
            rejected.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '404':
          description: >-
            The requested resource was not found or is outside the permitted
            scope.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '409':
          description: The page is not a builder page.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '422':
          description: >-
            Invalid input. Each field path maps to its first validation message;
            _form identifies an object-level error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '500':
          description: An unexpected error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
components:
  schemas:
    EditedBuilderPage:
      type: object
      properties:
        page:
          $ref: '#/components/schemas/Page'
        applied:
          type: integer
        warnings:
          type: array
          items:
            type: string
      required:
        - page
        - applied
        - warnings
    ApiError:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
      required:
        - error
        - message
      additionalProperties: true
    ValidationError:
      type: object
      properties:
        errors:
          type: object
          additionalProperties:
            type: string
      required:
        - errors
    Page:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        type:
          type: string
          enum:
            - redirect
            - builder
            - html
        createdAt:
          type: string
          format: date-time
        purpose:
          type: string
          enum:
            - landing
            - checkout
        payload:
          oneOf:
            - type: object
              properties:
                type:
                  type: string
                  const: redirect
                url:
                  type: string
                  format: uri
                statusCode:
                  type: integer
                  minimum: 300
                  maximum: 399
                  default: 302
              required:
                - type
                - url
                - statusCode
            - type: object
              properties:
                type:
                  type: string
                  const: builder
                tree:
                  type: array
                  items: {}
                pageTheme:
                  type: object
                  additionalProperties: {}
                rootCss:
                  type: string
                  default: ''
                pageSettings:
                  type: object
                  additionalProperties: {}
              required:
                - type
                - tree
                - pageTheme
                - rootCss
                - pageSettings
            - type: object
              properties:
                type:
                  type: string
                  const: html
                source:
                  type: string
                  enum:
                    - upload
                    - clone
                sourceUrl:
                  type: string
                  format: uri
                cloneStatus:
                  type: string
                  enum:
                    - pending
                    - processing
                    - ready
                    - failed
                cloneError:
                  type: string
                files:
                  type: array
                  items:
                    type: string
                  default: []
                publicAssetBase:
                  type: string
              required:
                - type
                - source
                - files
        publishedAt:
          type:
            - string
            - 'null'
          format: date-time
        updatedAt:
          type: string
          format: date-time
        link:
          oneOf:
            - $ref: '#/components/schemas/PageLink'
            - type: 'null'
        projectId:
          type: string
          format: uuid
      required:
        - id
        - name
        - type
        - createdAt
        - purpose
        - payload
        - publishedAt
        - updatedAt
        - link
        - projectId
      example:
        id: 33333333-3333-4333-8333-333333333333
        name: Autumn offer
        type: redirect
        createdAt: '2026-10-26T12:00:00.000Z'
        purpose: landing
        payload:
          type: redirect
          url: https://shop.example.com/autumn
          statusCode: 302
        publishedAt: null
        updatedAt: '2026-10-26T12:30:00.000Z'
        link:
          id: 99999999-9999-4999-8999-999999999999
          name: Autumn offer
          pathname: /autumn-offer
          type: generic
          urls:
            - id: aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa
              pageId: 33333333-3333-4333-8333-333333333333
              salesPlatformId: null
              name: Autumn offer
              weight: 1
              isActive: true
        projectId: 11111111-1111-4111-8111-111111111111
    PageLink:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        pathname:
          type: string
        type:
          type: string
          enum:
            - generic
            - traffic_source
            - sales_platform
        urls:
          type: array
          items:
            $ref: '#/components/schemas/UrlVariant'
      required:
        - id
        - name
        - pathname
        - type
        - urls
      example:
        id: 99999999-9999-4999-8999-999999999999
        name: Autumn offer
        pathname: /autumn-offer
        type: generic
        urls:
          - id: aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa
            pageId: 33333333-3333-4333-8333-333333333333
            salesPlatformId: null
            name: Autumn offer
            weight: 1
            isActive: true
    UrlVariant:
      type: object
      properties:
        id:
          type: string
          format: uuid
        pageId:
          type: string
          format: uuid
        salesPlatformId:
          type:
            - string
            - 'null'
          format: uuid
        name:
          type: string
        weight:
          type: number
        isActive:
          type: boolean
      required:
        - id
        - pageId
        - salesPlatformId
        - name
        - weight
        - isActive
      example:
        id: 55555555-5555-4555-8555-555555555555
        pageId: 33333333-3333-4333-8333-333333333333
        salesPlatformId: null
        name: Landing A
        weight: 50
        isActive: true
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: X-Api-Key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.