microCMS

Response format for each field in the GET API

Response by Field

1. Text Field

This is a field where you can freely input text in a single line.

Response Type

String

Example

"textField": "some text"

Response When the Field is Empty

There are the following patterns depending on the input method.
No key / null

informationInformation

For details on the response when the field is empty, please also check the list at the bottom of this page.

2. Text Area

A field that allows free input of text over multiple lines. The input will be in plain text.

Response Type

String

Example

"textArea": "some\ntext"

Response When the Field is Empty

There are the following patterns depending on the input method.
No key / null

informationInformation

If it includes line breaks, it will be output as \n.

3. Rich Editor

A field that allows free input of multi-line formatted text.

Response Type

String (HTML format)

Example

"richEditor": "<p>some text</p>"

Response when the field is empty

There are the following patterns depending on the input method.
No key / null

4. Old Rich Editor

This is a field where you can freely input multi-line formatted text.

Response Type

String (HTML format)

Example

"richEditorOld": "<p>some text</p>"

Response When the Field is Empty

There are the following patterns depending on the input method.
No key / ""

5. Image

This is a field for images.

Response Type

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.

Example

"image": {
        "url": "https://images.microcms-assets.io/assets/xxxx/yyyy/image.png.",
        "height": 630,
        "width": 1200,
        "alt": "Some sample alt text."
}

Response When the Field is Empty

No keys

6. Multiple Images

This is a field for multiple images.

Response Type

Array (an array of image objects)

Example

"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."
        }
]

Response When the Field is Empty

Empty array ([])

7. Date and Time

This is a field of type Date.

Response Type

String (date and time in ISO 8601 format, UTC)

Example

"date": "2023-01-01T00:00:00.000Z"

Response when the field is empty

No key

8. Boolean Values

This is a field of type Boolean.

Response Type

Boolean value (true or false)

Example

"boolean": true

Response When the Field is Null

false

informationInformation

The value of the boolean field is set to false by default.

9. Select Field

This is a field for selecting a value from a predefined list.

Response Type

Array (an array of predefined options)

Example

// When multiple selection is OFF
"selectField": ["Apple"]

// When multiple selection is ON and multiple options are selected
"selectField": ["Apple", "ORANGE"]

Response when the field is empty

Empty array ([])

10. Content Reference

This field references other content.

Response Type

Object (data of other content)

Example

"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"  
}

Response when the field is null

null

11. Multiple Content References

This field references multiple other contents.

Response Type

Array (an array of data from other contents)

Example

"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" 
        }
]

Response When the Field is Empty

Empty array ([])

12. Number

This is a field of type Number.

Response Type

Numeric value

Example

"number": 42

Response When the Field is Null

There are the following patterns depending on the input method.
No key / null

13. Custom Field

This is a field that utilizes an already created custom field.

Response Type

Object

Example

"customField": {
        "fieldId": "someCustomField",
        // The content follows the created custom field
        "title": "some title"
}

Response When the Field is Null

There are the following patterns depending on the input method.
null / {"fieldId": "someFieldId"}

14. Repeating Fields

This is a field that allows you to select multiple existing Custom Fields and input them repeatedly.

Response Type

Array (an array of Custom Field objects)

Example

"repeatField": [
        {
                "fieldId": "someCustomField",
                "title": "some title"
        },
        {
                "fieldId": "someCustomField",
                "title": "some title 2"
        }
]

Response When the Field is Empty

There are the following patterns depending on the input method.
Empty array ([]) / null

15. File

This is a field for files. The response includes the file's URL and file size (in Bytes).

Response Type

Object

Example

"file": {
        "url": "https://files.microcms-assets.io/assets/xxxxx/yyyy/files.zip",
        "fileSize": 10000
}

Response when the field is empty

No key

16. Extended Fields

This is a field that can load external data.

Response Type

Object (an object of data linked from the application)

Example

"iframe": {
        "id": "123"
}

Response when the field is empty

No key

informationInformation

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

Response List for Empty Field Values

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
(※3)

Text Field

No key

No key

null

Text Area

No key

No key

null

Rich Editor

No key

No key

null

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

false

false

false

Select Field

[]

[]

[]

Content Reference

null

null

null

Multiple Content References

[]

[]

[]

Number

No key

No key

null

Custom Field

{"fieldId": "someFieldId", ...}

(※4)

null

{"fieldId": "someFieldId", ...}

(※4)

Repeating Field

[]

null

[]

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.

informationInformation

"Without a key" refers to a state where the key for the corresponding field is not included in the response at all.