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

# Update page

> Update a page's attributes



## OpenAPI

````yaml patch /pages/{page_id}
openapi: 3.0.3
info:
  version: 0.1.1
  title: Datagrid API
  description: Datagrid API
servers:
  - url: https://api.datagrid.com/v1
security:
  - BearerAuth: []
paths:
  /pages/{page_id}:
    patch:
      tags:
        - Pages
      summary: Update page
      description: Update a page's attributes
      operationId: UpdatePage
      parameters:
        - name: page_id
          in: path
          required: true
          description: The ID of the page to update
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdatePageRequest'
      responses:
        '200':
          description: Updated page
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Page'
        '404':
          description: >-
            Not found. The requested page does not exist, or the authenticated
            user does not have permission to access it.
        '429':
          description: >-
            Rate limit exceeded. The request has been throttled because the rate
            limit for this endpoint has been reached. Check the `Retry-After`
            response header and retry after the specified number of seconds.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateLimitError'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Datagrid from 'datagrid-ai';

            const client = new Datagrid({
              apiKey: process.env['DATAGRID_API_KEY'], // This is the default and can be omitted
            });

            const page = await client.pages.update('page_id');

            console.log(page.id);
        - lang: Python
          source: |-
            import os
            from datagrid_ai import Datagrid

            client = Datagrid(
                api_key=os.environ.get("DATAGRID_API_KEY"),  # This is the default and can be omitted
            )
            page = client.pages.update(
                page_id="page_id",
            )
            print(page.id)
components:
  schemas:
    UpdatePageRequest:
      type: object
      properties:
        name:
          type: string
          nullable: true
          description: The new name for the page
          maxLength: 255
        scope:
          $ref: '#/components/schemas/KnowledgeScope'
          nullable: true
        parent:
          $ref: '#/components/schemas/ParentObject'
          description: Move the page to a different parent.
          nullable: true
    Page:
      type: object
      description: >-
        The `page` object represents a page that can contain knowledge and other
        pages in a hierarchical structure.
      required:
        - object
        - id
        - name
        - created_at
        - parent
        - teamspace_id
        - scope
      properties:
        object:
          type: string
          enum:
            - page
          description: The object type, always 'page'
        id:
          type: string
          description: Unique identifier for the page (document resource ID)
        name:
          type: string
          description: The name of the page
        teamspace_id:
          type: string
          description: The ID of the teamspace that owns this page.
        scope:
          $ref: '#/components/schemas/KnowledgeScope'
        parent:
          $ref: '#/components/schemas/ParentObject'
        created_at:
          type: string
          format: date-time
          description: The ISO string for when the page was created
    RateLimitError:
      type: object
      description: >-
        Returned when the rate limit is exceeded. Rate limits are enforced per
        teamspace, endpoint path, and HTTP method over a 60-second sliding
        window. Each endpoint may have its own limit — check the
        X-RateLimit-Limit response header for the effective value.
      required:
        - error
        - message
        - retryable
        - status_code
      properties:
        status_code:
          type: integer
          description: The HTTP status code (429).
        statusCode:
          type: integer
          deprecated: true
          description: Deprecated. Use status_code instead.
        error:
          type: string
          enum:
            - rate_limit_exceeded
          description: The error code identifying this as a rate limit error.
        message:
          type: string
          description: A human-readable error message.
        mitigation:
          type: string
          description: Suggested action to resolve the error.
        retryable:
          type: boolean
          description: Whether the request can be retried after a delay.
        details:
          type: object
          properties:
            reason:
              type: string
              description: A detailed explanation of why the rate limit was exceeded.
    KnowledgeScope:
      type: string
      enum:
        - teamspace
        - organization
      description: >-
        The visibility scope of the knowledge. 'teamspace' means visible only
        within the owning teamspace. 'organization' means visible across all
        teamspaces in the same organization.
    ParentObject:
      type: object
      description: >-
        The parent object, indicating where the object is located in the
        hierarchy
      oneOf:
        - $ref: '#/components/schemas/ParentPage'
        - $ref: '#/components/schemas/RootPage'
    ParentPage:
      type: object
      description: The parent page reference, indicating where this page is nested
      required:
        - type
        - page_id
      properties:
        type:
          type: string
          enum:
            - page
          description: The type of parent. 'page' indicates nested under a specific page
        page_id:
          type: string
          description: The ID of the parent page. Required when type is 'page'
    RootPage:
      type: object
      description: The root level object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - root
          description: The type of parent. 'root' indicates at the root level
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````