Site
Update Site
Update the site for a workspace.
You can use head_code and footer_code parameters to inject custom code. Use head_code_mode and footer_code_mode to control whether code is appended or replaced.
put/workspaces/{workspace_id}/site
Path parameters
workspace_idinteger required
Query parameters
expand[]string[]
Expand additional data in the response. Use expand[]=field_name to include optional fields (e.g., expand[]=head_code&expand[]=footer_code). See the Expanding guide for available fields and examples.
Request body
Example request
{
"site": {
"site": {
"name": "My Updated Website",
"head_code": "<script>console.log('site');</script>",
"head_code_mode": "append",
"homepage_id": "RcHPAt"
}
}
}Response
OK
Example response
{
"id": 1,
"public_id": "aBcDeF",
"workspace_id": 42000,
"name": "My Website",
"created_at": "2025-01-01T00:00:00.000Z",
"updated_at": "2025-01-01T00:00:00.000Z",
"homepage_id": "RcHPAt",
"theme_id": "dkGlMT",
"blog_theme_id": null,
"store_theme_id": null
}