This is a field where you can freely input text in a single line.
String
"textField": "some text"There are the following patterns depending on the input method.
No key / null
For details on the response when the field is empty, please also check the list at the bottom of this page.
A field that allows free input of text over multiple lines. The input will be in plain text.
String
"textArea": "some\ntext"There are the following patterns depending on the input method.
No key / null
If it includes line breaks, it will be output as \n.
A field that allows free input of multi-line formatted text.
String (HTML format)
"richEditor": "<p>some text</p>"There are the following patterns depending on the input method.
No key / null
This is a field where you can freely input multi-line formatted text.
String (HTML format)
"richEditorOld": "<p>some text</p>"There are the following patterns depending on the input method.
No key / ""
This is a field for images.
Object (Image Object)
※ The alt field is optional, so the key itself may not be included.
※ The height and width fields may also not be included depending on the file extension.
"image": {
"url": "https://images.microcms-assets.io/assets/xxxx/yyyy/image.png.",
"height": 630,
"width": 1200,
"alt": "Some sample alt text."
}No keys
This is a field for multiple images.
Array (an array of image objects)
"imageList": [
{
"url": "https://images.microcms-assets.io/assets/xxxx/yyyy/image1.png",
"height": 630,
"width": 1200,
"alt": "Some sample alt text."
},
{
"url": "https://images.microcms-assets.io/assets/xxxx/yyyy/image2.png",
"height": 630,
"width": 1200,
"alt": "Some sample alt text."
}
]Empty array ([])
This is a field of type Date.
String (date and time in ISO 8601 format, UTC)
"date": "2023-01-01T00:00:00.000Z"No key
This is a field of type Boolean.
Boolean value (true or false)
"boolean": truefalse
The value of the boolean field is set to false by default.
This is a field for selecting a value from a predefined list.
Array (an array of predefined options)
// When multiple selection is OFF
"selectField": ["Apple"]
// When multiple selection is ON and multiple options are selected
"selectField": ["Apple", "ORANGE"]Empty array ([])
This field references other content.
Object (data of other content)
"relationalContent": {
"id": "xxxxxxxxxx",
"createdAt": "2023-01-01T00:00:00.000Z",
"updatedAt": "2023-01-01T00:00:00.000Z",
"publishedAt": "2023-01-01T00:00:00.000Z",
"revisedAt": "2023-01-01T00:00:00.000Z",
"title": "some title"
}null
This field references multiple other contents.
Array (an array of data from other contents)
"relationalContentList": [
{
"id": "xxxxxxxxxx",
"createdAt": "2023-01-01T00:00:00.000Z",
"updatedAt": "2023-01-01T00:00:00.000Z",
"publishedAt": "2023-01-01T00:00:00.000Z",
"revisedAt": "2023-01-01T00:00:00.000Z",
"title": "some title"
},
{
"id": "yyyyyyyy",
"createdAt": "2023-02-01T00:00:00.000Z",
"updatedAt": "2023-02-01T00:00:00.000Z",
"publishedAt": "2023-02-01T00:00:00.000Z",
"revisedAt": "2023-02-01T00:00:00.000Z",
"title": "some title 2"
}
]Empty array ([])
This is a field of type Number.
Numeric value
"number": 42There are the following patterns depending on the input method.
No key / null
This is a field that utilizes an already created custom field.
Object
"customField": {
"fieldId": "someCustomField",
// The content follows the created custom field
"title": "some title"
}There are the following patterns depending on the input method.null / {"fieldId": "someFieldId"}
This is a field that allows you to select multiple existing Custom Fields and input them repeatedly.
Array (an array of Custom Field objects)
"repeatField": [
{
"fieldId": "someCustomField",
"title": "some title"
},
{
"fieldId": "someCustomField",
"title": "some title 2"
}
]There are the following patterns depending on the input method.
Empty array ([]) / null
This is a field for files. The response includes the file's URL and file size (in Bytes).
Object
"file": {
"url": "https://files.microcms-assets.io/assets/xxxxx/yyyy/files.zip",
"fileSize": 10000
}No key
This is a field that can load external data.
Object (an object of data linked from the application)
"iframe": {
"id": "123"
}No key
For more details on the response of extended fields, please also refer to the extended fields detail page.
External Data Integration with Extended Fields | microCMS Documentation
This section provides a list of responses for each field when the value is empty, categorized by input method.
Input from Management Screen | CSV Import POST/PUT API (※1) Add fields to existing API (※2) | PATCH API | |
|---|---|---|---|
Text Field | No key | No key |
|
Text Area | No key | No key |
|
Rich Editor | No key | No key |
|
Old Rich Editor (Deprecated) | No key | No key |
|
Image | No key | No key | No key |
Multiple Images |
|
|
|
Date and Time | No key | No key | No key |
Boolean |
|
|
|
Select Field |
|
|
|
Content Reference |
|
|
|
Multiple Content References |
|
|
|
Number | No key | No key |
|
Custom Field |
(※4) |
|
(※4) |
Repeating Field |
|
|
|
File | No key | No key | No key |
Extended Field | No key (※5) | No key | No key |
(Note 1) For registering empty values in the POST/PUT API, please refer to "POST /api/v1/{endpoint}" and "PUT /api/v1/{endpoint}/{content_id}".
(Note 2) This is the response when adding fields to an already registered API schema and requesting existing content. Once the content is updated, the response will be the same as "input from the management screen".
(Note 3) For registering empty values in the PATCH API, please refer to "PATCH /api/v1/{endpoint}/{content_id}".
(Note 4) The values in the response are determined by the schema structure of the Custom Fields.
(Note 5) If data is entered into a field and then cleared from the management screen, the key will remain, and an arbitrary empty value (such as "", null, [], etc.) will be entered.
"Without a key" refers to a state where the key for the corresponding field is not included in the response at all.
Contents