Create a bodycopy asset

After you have created a new standard page, you must add a bodycopy asset as a child of the standard page. Bodycopy assets usually appear with the name Page Contents under standard pages in the asset tree.

Table of Contents

Command

Use the following command to create a bodycopy asset:

POST https://website.matrix.squiz.cloud/__management_api/v1/assets

Payload

Set the following fields as shown on the example bodycopy asset payload:

"asset": {
        "type": "bodycopy",            (1)
        "attributes": {
            "name": "Page Contents"    (2)
        },
        "published": null,
        "metadata_schemas": [],
        "metadata_values": null
    },
    "parent": {
        "asset_id": "1821",            (3)
        "link_type": "hidden",
        "value": "",
        "sort_order": -1,
        "is_dependent": true,
        "is_exclusive": true
    }
}
1 Set the type field to bodycopy.
2 Add a descriptive name to the name field.
3 Set the parent:asset_id to the value of the id field in the response of your newly created page asset.

Response

The API response will contain:

{
    "id": "1822",                   (1)
    "type": "bodycopy",             (2)
    "attributes": {
        "name": "Page Contents"     (3)
    },
    "status": "under_construction",
    "version": "0.0.1",
    "created": {
        "date_time_unix": 1643676269,
        "user_id": "1227"
    },
    "updated": {
        "date_time_unix": 1643676270,
        "user_id": "1227"
    },
    "published": null,
    "status_changed": {
        "date_time_unix": 1643676269,
        "user_id": "1227"
    },
    "metadata_schemas": [],
    "metadata_values": null,
    "paint_layouts": {
        "asset_level": null,
        "asset_level_override": null,
        "url_based": {},
        "user_defined": {}
    },
    "web_paths": null
}
1 The asset ID in the id field.
2 The asset type created in the type field.
3 The name specified in the payload.