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

# Replace Space Page

> Replace a page's whole content, if it still has the content_hash you read. With propose access: 202 proposal.



## OpenAPI

````yaml /openapi-v1.json put /api/v1/spaces/pages
openapi: 3.1.0
info:
  title: AGO Public API
  version: 1.0.0
  description: Programmatic access to your AGO workspace.
servers:
  - url: https://{tenant_id}.api.useago.com
    description: AGO Public API v1
    variables:
      tenant_id:
        default: your-tenant-id
        description: Your AGO tenant identifier
security: []
paths:
  /api/v1/spaces/pages:
    put:
      tags:
        - Spaces
      summary: Replace Space Page
      description: >-
        Replace a page's whole content, if it still has the content_hash you
        read. With propose access: 202 proposal.
      operationId: core_api_v1_controllers_spaces_replace_space_page
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SpacePageReplaceIn'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpaceWriteOut'
        '202':
          description: Accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpaceProposalOut'
      security:
        - ScopedAPIKeyAuth: []
components:
  schemas:
    SpacePageReplaceIn:
      properties:
        address:
          description: >-
            '<space>' for a space root, '<space>/<path>' for a page (e.g.
            'handbook/onboarding/first-week').
          title: Address
          type: string
        content:
          description: New Markdown content of the whole page.
          title: Content
          type: string
        base_hash:
          description: content_hash returned by the read this write is based on.
          title: Base Hash
          type: string
        summary:
          anyOf:
            - type: string
            - type: 'null'
          description: Change summary recorded in the page history.
          title: Summary
      required:
        - address
        - content
        - base_hash
      title: SpacePageReplaceIn
      type: object
    SpaceWriteOut:
      properties:
        object:
          default: space_page
          title: Object
          type: string
        id:
          title: Id
          type: string
        address:
          title: Address
          type: string
        space:
          title: Space
          type: string
        path:
          anyOf:
            - type: string
            - type: 'null'
          title: Path
        title:
          title: Title
          type: string
        updated_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Updated At
        content_hash:
          title: Content Hash
          type: string
        version_number:
          anyOf:
            - type: integer
            - type: 'null'
          title: Version Number
        created:
          title: Created
          type: boolean
        changed:
          title: Changed
          type: boolean
        replacements:
          anyOf:
            - type: integer
            - type: 'null'
          title: Replacements
      required:
        - id
        - address
        - space
        - title
        - content_hash
        - created
        - changed
      title: SpaceWriteOut
      type: object
    SpaceProposalOut:
      description: >-
        A change to a page that was not applied: it waits for someone with write
        access to accept or reject it.
      properties:
        object:
          default: space_change_proposal
          title: Object
          type: string
        id:
          title: Id
          type: string
        status:
          description: '''pending'', ''accepted'' or ''rejected''.'
          title: Status
          type: string
        address:
          title: Address
          type: string
        page:
          $ref: '#/components/schemas/SpacePageRefOut'
        summary:
          title: Summary
          type: string
        base_hash:
          anyOf:
            - type: string
            - type: 'null'
          description: content_hash of the page the change was made against.
          title: Base Hash
        proposed_by:
          $ref: '#/components/schemas/SpaceProposalActorOut'
        created_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Created At
        reviewed_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Reviewed At
        reviewed_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Reviewed By
        review_notes:
          anyOf:
            - type: string
            - type: 'null'
          title: Review Notes
        applied:
          anyOf:
            - type: boolean
            - type: 'null'
          description: false when this proposal is the answer to an edit.
          title: Applied
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
        original_content:
          anyOf:
            - type: string
            - type: 'null'
          title: Original Content
        proposed_content:
          anyOf:
            - type: string
            - type: 'null'
          title: Proposed Content
        content_hash:
          anyOf:
            - type: string
            - type: 'null'
          description: The page's content_hash after an accepted proposal.
          title: Content Hash
        version_number:
          anyOf:
            - type: integer
            - type: 'null'
          title: Version Number
      required:
        - id
        - status
        - address
        - page
        - summary
        - proposed_by
      title: SpaceProposalOut
      type: object
    SpacePageRefOut:
      properties:
        object:
          default: space_page
          title: Object
          type: string
        id:
          title: Id
          type: string
        address:
          title: Address
          type: string
        space:
          title: Space
          type: string
        path:
          anyOf:
            - type: string
            - type: 'null'
          title: Path
        title:
          title: Title
          type: string
        updated_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Updated At
      required:
        - id
        - address
        - space
        - title
      title: SpacePageRefOut
      type: object
    SpaceProposalActorOut:
      properties:
        actor_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Actor Type
        actor_label:
          default: ''
          title: Actor Label
          type: string
        user:
          anyOf:
            - type: string
            - type: 'null'
          title: User
      title: SpaceProposalActorOut
      type: object
  securitySchemes:
    ScopedAPIKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````

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