> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://notion.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://notion.ferndocs.com/_mcp/server.

# Caption property is now supported for code block type

We have added support for adding, updating, and retrieving the `caption` property for `code` block types.

Below is an example response from [append block children](/reference/patch-block-children) containing a code block, with a caption, uploaded to Notion.

**`JSON`**

```json JSON
{
    "object": "list",
    "results": [
        {
            "object": "block",
            "id": "block-id",
            "created_time": "2021-10-14T18:10:00.000Z",
            "last_edited_time": "2021-10-14T18:10:00.000Z",
            "has_children": false,
            "archived": false,
            "type": "code",
            "code": {
                "caption": [
                    {
                        "type": "text",
                        "text": {
                            "content": "Hello Caption!",
                            "link": null
                        },
                        "annotations": {
                            "bold": false,
                            "italic": false,
                            "strikethrough": false,
                            "underline": false,
                            "code": false,
                            "color": "default"
                        },
                        "plain_text": "Hello Caption!",
                        "href": null
                    }
                ],
                "text": [
                    {
                        "type": "text",
                        "text": {
                            "content": "const foo = \"bar\"",
                            "link": null
                        },
                        "annotations": {
                            "bold": false,
                            "italic": false,
                            "strikethrough": false,
                            "underline": false,
                            "code": false,
                            "color": "default"
                        },
                        "plain_text": "const foo = \"bar\"",
                        "href": null
                    }
                ],
                "language": "javascript"
            }
        },
    ],
    "next_cursor": null,
    "has_more": false
}
```