microCMS
Documentation
  • Pricing
  • Blog
  • FAQ
  • Contact
  • Sign In
  • Get started for free
Navigation
Tutorial
Next.js
  • Integration with Next.js
  • Getting Started with App Router
  • Tutorial (App Router)
  • Getting Started with Pages Router
  • Tutorial (Pages Router)
Astro
  • Getting Started
  • Integration with Astro
  • Tutorial
Nuxt
  • Integration with Nuxt
  • Getting Started
  • Tutorial
Gatsby
  • Integration with Gatsby
  • Getting Started
  • Tutorial
JavaScript
  • Integration with JavaScript
  • Getting Started (Browser)
  • Getting Started (Server)
PHP
  • Integration with PHP
  • Getting Started
Ruby
  • Integration with Ruby
  • Getting Started
Go
  • Integration with Go
  • Getting Started with microCMS
Manual
  • Introduction
Account & Login
  • Account Registration
  • Login
  • Email Address Authentication
Services
  • Creating a Service
  • Service Configuration
  • Template
  • Service Deletion
Payment
  • Change of Pricing Plan
  • Registering and Changing Payment Methods
API
  • Creating and Managing APIs
  • API Settings
  • Export/Import of API Schema
Fields
  • Text Field
  • Text Area
  • Image
  • Multiple Images
  • Date
  • Boolean
  • Selectable Field
  • Content Reference
  • Multiple Content References
  • Number
  • File
  • Extended Field
  • Repetition
  • Custom
Contents
  • CSV Export of Content
  • Content Creation
  • Content Editing
  • Content Management
  • View
  • Content Status
  • Custom Status
  • Setting the Content ID
  • Automatically Assigned Values for Content
  • CSV Import of Content
  • API Preview
  • Examples of Using Query Parameters with API Preview
  • Integration Methods by Rendering Type
  • Screen Preview
  • Setting Up Webhooks for Content
Rich Editor
  • How to Use the Rich Editor
  • Rich Editor WRITE API
  • How to Use the Old Rich Editor
Reviews
  • Review
  • AI Review
Media
  • Media Management
  • Changing Media Filters and Display Order
  • Media Tag Configuration
  • Setting Up Media Webhooks
  • Custom Domain Settings for Media
Permission Management
  • Member Management
  • Roles (Permission Management in the Admin Panel)
Environments
  • Multiple Environments (Development Environment)
  • Merging API Settings Between Environments
Connection
  • Amazon S3 Integration
Logs
  • Audit Log
  • Data Transfer Volume
Security
  • Content Update History
  • IP Restrictions for Management Dashboard
  • IP Restrictions for APIs
Authentication
  • Setting Up Two-Factor Authentication
  • Mandatory Two-Factor Authentication
  • Single Sign-On
Specifications & Limitations
  • Recommended Environment
  • Limitations / Precautions
Content API
  • What is the Content API?
Basic Operations
  • GET /api/v1/{endpoint}
  • GET /api/v1/{endpoint}/{content_id}
  • POST /api/v1/{endpoint}
  • PUT /api/v1/{endpoint}/{content_id}
  • PATCH /api/v1/{endpoint}/{content_id}
  • DELETE /api/v1/{endpoint}/{content_id}
API Keys
  • API Key (API Authentication and Authorization Management)
  • Migration from the Old API (X-API-KEY, etc.)
Responses & Error Handling
  • Response format for each field in the GET API
  • Specifying Query Parameters in the GET API
  • Error Responses of the Content API
Management API (Beta)
  • What is the Management API?
Content Operations
  • PUT /api/v1/contents/{endpoint}/{content_id}/reservation
  • GET /api/v1/contents/{endpoint}
  • GET /api/v1/contents/{endpoint}/{content_id}
  • PATCH /api/v1/contents/{endpoint}/{content_id}/status
  • PATCH /api/v1/contents/{endpoint}/{content_id}/createdBy
Media Operations
  • GET /api/v2/media
  • GET /api/v1/media
  • POST /api/v1/media
  • DELETE /api/v2/media
Member Operations
  • GET /api/v1/members
  • GET /api/v1/members/{member_id}
API Operations
  • POST /api/v1/apis
  • GET /api/v1/apis
  • GET /api/v1/apis/{endpoint}
Service Operations
  • GET /api/v1/service
Responses & Error Handling
  • Management API Error Responses
Image API
  • What is the Image API?
Parameters
  • Image Size
  • Quality
  • Resolution and Screen Size
  • Format
  • Text
  • Border
  • Padding
  • Shape
  • Download
  • Watermark
MCP Server
  • microCMS MCP
  • microCMS Document MCP Server
  • Top
  • Content API

PATCH /api/v1/{endpoint}/{content_id}

Last updated: 2026/04/27

By using the PATCH API, you can edit content via the API.

Request Header

X-MICROCMS-API-KEY

This is the authentication key required for PATCH API requests.
Please enable "PATCH" with default permissions or individual permissions and include it in the request header when sending.

Caution

If the X-MICROCMS-API-KEY is identifiable, it may allow unauthorized manipulation of content by third parties. Please handle it with care. For more details, please refer to "API Key (API Authentication and Authorization Management)".

Content-Type

Specifies the format of the data being sent.
Since microCMS only handles data in JSON format, please specify application/json.

Query Parameters

status

This parameter is used to update or add draft content. Please add status=draft as a parameter.
For the behavior during updates, please refer to “Behavior for Each Status on Successful Requests.”

Request Body

Please prepare the JSON of the content you want to send according to the API schema and pass it as a string.
Example:

{"title":"Sample Title","category": ["Sample Category"]}

Field-Specific Specification Methods

Text Field

Please specify any string.
(Example: "Text 1")

Text Area

You can specify a multi-line string using newline characters.
(Example: "Input multiple lines of text\nInput multiple lines of text")

Rich Editor

You can specify decorations and images using HTML strings. For more details, please refer to the Rich Editor WRITE API.
(Example: "<h1>Heading</h1><p>You can submit in HTML like this</p>")

Old Rich Editor

You can specify a multi-line string using newline characters.
(Example: "Input multiple lines of text\nInput multiple lines of text")

Registration with HTML tags is not supported.
※If HTML is registered, it will be escaped as follows.
<p>Text 1</p> → &lt;p&gt;Text 1&lt;/p&gt;

Image

Please specify the URL of the image uploaded to the same service of microCMS.
(Example: "https://images.microcms-assets.io/assets/xxxxxxxx/yyyyyyyy/sample.png")

About Specifiable Image URLs

If a custom domain for media is set, both the custom domain and the default domain (microcms-assets.io) are accepted.

Also, specifying an invalid URL as follows will result in an error.

  • URL of an image not uploaded to microCMS
  • URL of an image uploaded to a different service of microCMS (※Services created with the multiple environment feature are also treated as different services)

Multiple Images

Please specify the URLs of images uploaded to the same service of microCMS as an array.
(Example: ["https://images.microcms-assets.io/assets/xxxxxxxx/yyyyyyyy/sample1.png", "https://images.microcms-assets.io/assets/xxxxxxxx/yyyyyyyy/sample2.png"])

The specifications for image URLs are the same as for the image field.

Date and Time

Please specify as a string in ISO format (ISO 8601).
(Example: "2020-04-23T14:32:38.163Z")

Number

Please specify a number.
(Example: 123)

Boolean

Please specify a boolean value.
(Example: true)

Select Field

Please specify the elements of the select field as an array.
(Example: ["Element 1","Element 2"])

Content Reference

Please specify the contentId of the referenced content.
(Example: "Referenced id")

Multiple Content References

Please specify the contentIds of the referenced contents as an array.
(Example: ["Referenced id 1","Referenced id 2"])

Custom Field

Please specify the content of the field you want to update in object format. Include fieldId and at least one value of the field you want to update.
(Example: { "fieldId": "YOURFIELDID", "some_value": "" })

Repeating Field

Please specify the target data as an array of custom fields. Each element of the array should include fieldId and all field values.
Example:

[
  {
    "fieldId": "YOURFIRSTFIELDID",
    "sometext_value": ""
  },
  {
    "fieldId": "YOUR_SECOND_FIELD_ID",
    "some_int_value": 10
  }
]
Tips

For implementation examples, please refer to the help site "How should I specify the value of a specific field when updating a repeated field using the PATCH API?".

File

Please specify the URL of the media uploaded to the same microCMS service.
(Example: "https://files.microcms-assets.io/assets/xxxxxxxx/yyyyyyyy/manual.pdf")

About Specifiable File URLs

If a custom domain for media is set, both the custom domain and the default domain (microcms-assets.io) are accepted.

Additionally, specifying an invalid URL as follows will result in an error.

  • URL of a file not uploaded to microCMS
  • URL of a file uploaded to a different microCMS service (Note: Services created with the multiple environment feature are also treated as different services)

Extended Fields

Please specify the target data (the message part) in object format. You can update only the properties you want to change.
For details on each value, please refer to Extended Fields.
Example:

{
  "id": "some-id",
  "title": "some-title",
  "description": "some-description",
  "imageUrl": "https://images.microcms-assets.io/assets/xxxx/yyyy/{fileName}.png",
  "updatedAt": "2024-01-01T00:00:00Z",
  "data": { "id": "123" }
}

How to Specify Automatically Assigned Fields

Publication Date (publishedAt)

Please specify it as a string in ISO format (ISO 8601).
(Example: "2024-01-01T00:00:00Z")

How to Specify Empty Values for Fields

If you want to register a field value as empty in the PATCH API, please specify the following values according to the field type and make the request.

Field Type

Value to Specify for Empty Registration

Text Field

""

Text Area

""

Rich Editor

""

Old Rich Editor (Deprecated)

""

Image

""

Multiple Images

[]

Date and Time

""

Boolean

null

Select Field

[]

Content Reference

{}

Multiple Content References

[]

Number

null

Custom Field

{}

Repeating Field

[]

File

""

Extended Field

{}

Information

When updating content, you do not need to specify all fields. Please specify only the fields you want to update.

Response

If the content is created successfully, a 200 response will be returned.

Response Body

The response body when the request is executed successfully will be as follows:

{
    "id": "someId"
}

Behavior for Each Status Upon Successful Request

When a PATCH API request is successful, the behavior for each content status is as follows.

When Query Parameters Are Not Specified

Content Status

Behavior After Update

Published

The content will be updated while remaining in the published status.

Published and Draft

The content in published status will be updated.

The content in draft status will remain unchanged.

Draft

The content will be updated while remaining in the draft status.

Published Ended

Will not be updated.

When Specifying the Status Parameter

The behavior when requesting with status=draft is as follows.

Content Status

Behavior After Update

Published

The status will change to "Published and Drafting."

The published content will remain intact, while the updates will be saved as draft content.

Published and Drafting

The status will remain "Published and Drafting."

Only the draft content will be updated, while the published content will remain intact.

Drafting

The status will remain "Drafting."

The draft content will be updated.

Published Ended

No updates will be made.

Error Response

Please refer to the Content API Error Response.

Contents

  • Request Header
  • X-MICROCMS-API-KEY
  • Content-Type
  • Query Parameters
  • status
  • Request Body
  • Field-Specific Specification Methods
  • How to Specify Automatically Assigned Fields
  • How to Specify Empty Values for Fields
  • Response
  • Response Body
  • Behavior for Each Status Upon Successful Request
  • When Query Parameters Are Not Specified
  • When Specifying the Status Parameter
  • Error Response
  • Company
  • Legal Notice
  • Terms of Service
  • Privacy Policy

Copyright © microcms.io All rights reserved.