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

# Admin Put Page Tree



## OpenAPI

````yaml /openapi/mio-openapi.json put /api/v1/teams/{team_id}/hubs/{hub_id}/pages/{page_id}/tree
openapi: 3.1.0
info:
  description: >-
    Production API reference for Membership.io. Use the authored guides for
    workflows and the generated endpoint pages for exact parameters and schemas.
  title: Membership.io API
  version: 0.1.0
servers:
  - description: Production
    url: https://api.member.dev
security:
  - bearerAuth: []
paths:
  /api/v1/teams/{team_id}/hubs/{hub_id}/pages/{page_id}/tree:
    put:
      tags:
        - pages-admin
      summary: Admin Put Page Tree
      operationId: >-
        pages_admin.put_pages_admin_put_teams_by_team_id_hubs_by_hub_id_pages_by_page_id_tree
      parameters:
        - in: path
          name: team_id
          required: true
          schema:
            title: Team Id
            type: string
        - in: path
          name: hub_id
          required: true
          schema:
            title: Hub Id
            type: string
        - in: path
          name: page_id
          required: true
          schema:
            title: Page Id
            type: string
        - in: header
          name: If-Match
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: If-Match
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/DraftTreeWriteEnvelope'
        required: true
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/DraftTreeResponse'
          description: Successful Response
          headers:
            ETag:
              description: >-
                New draft_version (quoted). Send back as If-Match on the next
                tree write or publish.
              schema:
                type: string
        '422':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - HTTPBearer: []
components:
  schemas:
    DraftTreeWriteEnvelope:
      additionalProperties: false
      description: Top-level JSON:API envelope for PUT .../pages/{id}/tree.
      properties:
        data:
          $ref: '#/components/schemas/DraftTreeWriteResource'
      required:
        - data
      title: DraftTreeWriteEnvelope
      type: object
    DraftTreeResponse:
      additionalProperties: false
      description: Top-level JSON:API response envelope for PUT .../pages/{id}/tree.
      properties:
        data:
          $ref: '#/components/schemas/DraftTreeResource'
      required:
        - data
      title: DraftTreeResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    DraftTreeWriteResource:
      additionalProperties: false
      description: JSON:API resource wrapper for the draft-tree write request.
      properties:
        attributes:
          $ref: '#/components/schemas/DraftTreeWriteAttributes'
        type:
          const: page_draft_trees
          title: Type
          type: string
      required:
        - type
        - attributes
      title: DraftTreeWriteResource
      type: object
    DraftTreeResource:
      additionalProperties: false
      description: JSON:API resource object for a page draft tree (write response).
      properties:
        attributes:
          $ref: '#/components/schemas/DraftTreeReadAttributes'
        id:
          title: Id
          type: string
        type:
          const: page_draft_trees
          default: page_draft_trees
          title: Type
          type: string
      required:
        - id
        - attributes
      title: DraftTreeResource
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
    DraftTreeWriteAttributes:
      additionalProperties: false
      properties:
        tree:
          additionalProperties: true
          title: Tree
          type: object
      required:
        - tree
      title: DraftTreeWriteAttributes
      type: object
    DraftTreeReadAttributes:
      additionalProperties: false
      properties:
        draft_version:
          title: Draft Version
          type: integer
        tree:
          additionalProperties: true
          title: Tree
          type: object
      required:
        - draft_version
        - tree
      title: DraftTreeReadAttributes
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT or mio_sk API key
      description: >-
        Send platform JWTs, contact JWTs, or team API keys as `Authorization:
        Bearer <token>`.
      scheme: bearer
      type: http
    HTTPBearer:
      scheme: bearer
      type: http

````