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

# Update a CMS Page

> Updates a CMS Page



## OpenAPI

````yaml /api-reference/platform.yaml patch /api/v2/platform/cms_pages/{id}
openapi: 3.0.3
info:
  title: Platform API
  contact:
    name: Vendo Connect Inc.
    url: https://getvendo.com
    email: sales@getvendo.com
  description: Spree Platform API
  version: v2
servers:
  - url: http://{defaultHost}
    variables:
      defaultHost:
        default: localhost:3000
security: []
tags:
  - name: Addresses
  - name: Adjustments
  - name: Classifications
  - name: Countries
  - name: CMS Pages
  - name: CMS Sections
  - name: Digital Assets
  - name: Digital Links
  - name: Line Items
  - name: Menus
  - name: Menu Items
  - name: Option Types
  - name: Option Values
  - name: Orders
  - name: Payments
  - name: Payment Methods
  - name: Products
  - name: Promotions
  - name: Promotion Actions
  - name: Promotion Categories
  - name: Promotion Rules
  - name: Roles
  - name: Shipments
  - name: Shipping Categories
  - name: Shipping Methods
  - name: States
  - name: Stock Items
  - name: Stock Locations
  - name: Store Credit Categories
  - name: Store Credit Types
  - name: Store Credits
  - name: Tax Categories
  - name: Tax Rates
  - name: Taxons
  - name: Taxonomies
  - name: Users
  - name: Variants
  - name: Vendors
  - name: Webhook Events
  - name: Webhook Subscribers
  - name: Wishlists
  - name: Wished Items
  - name: Zones
paths:
  /api/v2/platform/cms_pages/{id}:
    patch:
      tags:
        - CMS Pages
      summary: Update a CMS Page
      description: Updates a CMS Page
      operationId: update-cms-page
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
        - name: include
          in: query
          description: >-
            Select which associated resources you would like to fetch, see: <a
            href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>
          example: cms_sections
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/update_standard_cms_page_params'
                - $ref: '#/components/schemas/update_homepage_cms_page_params'
                - $ref: '#/components/schemas/update_feature_cms_page_params'
      responses:
        '200':
          description: Record updated
          content:
            application/vnd.api+json:
              examples:
                Example:
                  value:
                    data:
                      id: '8'
                      type: cms_page
                      attributes:
                        title: My Super Page
                        meta_title: null
                        content: null
                        meta_description: null
                        visible: true
                        slug: cumque-excepturi-nisi-cupiditate-dolore
                        type: Spree::Cms::Pages::StandardPage
                        locale: en
                        deleted_at: null
                        created_at: '2022-11-08T19:34:02.188Z'
                        updated_at: '2022-11-08T19:34:02.420Z'
                      relationships:
                        cms_sections:
                          data: []
              schema:
                $ref: '#/components/schemas/resource'
        '401':
          description: Authentication Failed
          content:
            application/vnd.api+json:
              examples:
                Example:
                  value:
                    error: The access token is invalid
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Record not found
          content:
            application/vnd.api+json:
              examples:
                Example:
                  value:
                    error: The resource you were looking for could not be found.
              schema:
                $ref: '#/components/schemas/error'
        '422':
          description: Invalid request
          content:
            application/vnd.api+json:
              examples:
                Example:
                  value:
                    error: Title can't be blank
                    errors:
                      title:
                        - can't be blank
              schema:
                $ref: '#/components/schemas/validation_errors'
      security:
        - bearer_auth: []
components:
  schemas:
    update_standard_cms_page_params:
      type: object
      properties:
        cms_page:
          type: object
          properties:
            title:
              type: string
              example: About Us
              description: Update the page title.
            type:
              type: string
              enum:
                - Spree::Cms::Pages::StandardPage
                - Spree::Cms::Pages::Homepage
                - Spree::Cms::Pages::FeaturePage
              description: Change the type of page.
            meta_title:
              type: string
              nullable: true
              example: Learn More About Super-Shop
              description: >-
                Update the meta title for this page, this appears in the title
                bar of the browser.
            content:
              type: string
              nullable: true
              example: Lot's of text..
              description: >-
                Update the text content of a standard page, this can be HTML
                from a rich text editor.
            meta_description:
              type: string
              nullable: true
              example: Learn more about us on this page here...
              description: >-
                Update the meta description, used for SEO and displayed in
                search results.
            visible:
              type: boolean
              enum:
                - true
                - false
              description: This page is publicly visible when set to `true`.
            slug:
              type: string
              nullable: true
              example: about-us
              description: Update the slug for this page.
            locale:
              type: string
              example: en-US
              description: Update the language of this page.
      required:
        - cms_page
      title: Update a Standard Page
      x-internal: false
    update_homepage_cms_page_params:
      type: object
      properties:
        cms_page:
          type: object
          properties:
            title:
              type: string
              example: Our Flash Homepage
              description: Update the page title.
            type:
              type: string
              enum:
                - Spree::Cms::Pages::StandardPage
                - Spree::Cms::Pages::Homepage
                - Spree::Cms::Pages::FeaturePage
              description: Change the type of page.
            meta_title:
              type: string
              nullable: true
              example: Visit Our Store - Great Deals
              description: >-
                Update the meta title for this page, this appears in the title
                bar of the browser.
            meta_description:
              type: string
              nullable: true
              example: Discover great new products that we sell in this store...
              description: >-
                Update the meta description, used for SEO and displayed in
                search results.
            visible:
              type: boolean
              enum:
                - true
                - false
              description: This page is publicly visible when set to `true`.
            locale:
              type: string
              example: en-US
              description: Update the language of this page.
      required:
        - cms_page
      title: Update a Homepage
      x-internal: false
    update_feature_cms_page_params:
      type: object
      properties:
        cms_page:
          type: object
          properties:
            title:
              type: string
              example: Featured Product
              description: Update the page title.
            type:
              type: string
              enum:
                - Spree::Cms::Pages::StandardPage
                - Spree::Cms::Pages::Homepage
                - Spree::Cms::Pages::FeaturePage
              description: Change the type of page.
            meta_title:
              type: string
              nullable: true
              example: Learn More About This Featured Product
              description: >-
                Update the meta title for this page, this appears in the title
                bar of the browser.
            meta_description:
              type: string
              nullable: true
              example: >-
                Learn more about us this amazing product that we sell right
                here...
              description: >-
                Update the meta description, used for SEO and displayed in
                search results.
            visible:
              type: boolean
              enum:
                - true
                - false
              description: This page is publicly visible when set to `true`.
            slug:
              type: string
              nullable: true
              example: about-us
              description: Update the slug for this page.
            locale:
              type: string
              example: en-US
              description: Update the language of this page.
      required:
        - cms_page
      title: Update a Feature Page
      x-internal: false
    resource:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/resource_properties'
      required:
        - data
      x-internal: false
    error:
      type: object
      properties:
        error:
          type: string
      required:
        - error
      x-internal: false
    validation_errors:
      type: object
      properties:
        error:
          type: string
        errors:
          type: object
      required:
        - error
        - errors
      x-internal: false
    resource_properties:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
        attributes:
          type: object
        relationships:
          type: object
      required:
        - id
        - type
        - attributes
      x-internal: false
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer

````