HOC SiteDocumentation

save_chrome

Save site header or footer. Pass content (sparse merge, or contentMode replace) OR ops (block-id patch: set/reset/insert/remove/move/pinDefaults)—not both. contentByLocale writes several locales in one call (same rules as save_page). Omitted keys stay. null deletes a key. Block arrays match by id; unlisted blocks stay; a new id is appended; {id, props:null} removes that block. A block without props.id receives one on save. remove with blockId root and path content.N splices that top-level block. Reordering stays an ops move. A non-block array replaces that array. Do not send a summary response as content. remove {blockId,path?} deletes a prop when path is set, otherwise the block. An op may omit op: block + parentBlockId is read as insert, path as set. Ops default to slim response {changedBlockIds,contentLocale,hasWarnings}. response=full returns the compact document. The response includes revisionId, revisionNo, baseRevisionId, settingKeys, and a render report. dryRun does not save. warnings=new (default) returns only new design warnings plus preExistingWarningCount. Errors: design.block_not_found, design.op_bad_path, design.ops_or_content, design.json_parse. set value and insert block are JSON-parsed when the string starts with {, [, or a quote. A {{bind:…}}, {{var:…}}, or {{icon:…}} token is stored as that text. A quoted JSON string unwraps to the token. Any other string starting with { or [ that is not JSON fails with design.json_parse at ops[n].value.

save_chrome · Group: design

Inputs

websiteId

required

kind

required

channel

optional — website (default) writes the site header/footer. email writes the email template header/footer, which accepts content only.

content

optional

contentMode

optional — merge (default) updates listed blocks by id and keeps the rest. replace writes this content as the whole document.

ops

optional — [{op,blockId|parentBlockId,path?,value?,mode?,index?,block?,slot?}]. Object set merges by default; mode:replace replaces the object at that path.

contentByLocale

optional — { "en-GB": { content|ops }, "tr-TR": { content|ops } }

contentLocale

optional

response

optional — full | slim

warnings

optional — new (default) | all | none

dryRun

optional

previewToken

optional — From a prior dryRun; pass on a follow-up write when re-auth is needed (do not scrape from previewUrl)

Schema

{
  "name": "save_chrome",
  "group": "design",
  "inputFields": [
    {
      "name": "websiteId",
      "required": true
    },
    {
      "name": "kind",
      "required": true
    },
    {
      "name": "channel",
      "required": false,
      "description": "website (default) writes the site header/footer. email writes the email template header/footer, which accepts content only."
    },
    {
      "name": "content",
      "required": false
    },
    {
      "name": "contentMode",
      "required": false,
      "description": "merge (default) updates listed blocks by id and keeps the rest. replace writes this content as the whole document."
    },
    {
      "name": "ops",
      "required": false,
      "description": "[{op,blockId|parentBlockId,path?,value?,mode?,index?,block?,slot?}]. Object set merges by default; mode:replace replaces the object at that path."
    },
    {
      "name": "contentByLocale",
      "required": false,
      "description": "{ \"en-GB\": { content|ops }, \"tr-TR\": { content|ops } }"
    },
    {
      "name": "contentLocale",
      "required": false
    },
    {
      "name": "response",
      "required": false,
      "description": "full | slim"
    },
    {
      "name": "warnings",
      "required": false,
      "description": "new (default) | all | none"
    },
    {
      "name": "dryRun",
      "required": false
    },
    {
      "name": "previewToken",
      "required": false,
      "description": "From a prior dryRun; pass on a follow-up write when re-auth is needed (do not scrape from previewUrl)"
    }
  ]
}

Maps to

  • PUT /api/v1/{locale}/{websiteId}/chrome/header → API
  • PUT /api/v1/{locale}/{websiteId}/chrome/footer → API
  • PUT /api/v1/{locale}/{websiteId}/email-chrome/header → API
  • PUT /api/v1/{locale}/{websiteId}/email-chrome/footer → API