API reference/Sections
Change a section
Try itChanges a draft section. Fields you send in content replace those fields (the rest stay); the result is checked against the type's content_schema. A section can't change type — add a new one.
PATCH
/api/v1/sites/{site_id}/sections/{section_id}Authentication
An API key as Authorization: Bearer or x-api-key. It needs the sites:write scope — edit draft pages and sections.
sites:writeChanges the draft or a recordIdempotency-Key optionalMCP tool: update_section
Parameters
Named placeholders go in the path; the rest in a JSON body.
site_idstringPath · required- The site's id.1 to 100 characters
section_idstringPath · required- The section's id.1 to 100 characters
contentobjectBody · optional- Top-level content fields to replace.
hiddenbooleanBody · optionalpositionintegerBody · optional- 0-based place on its page.0 to 200
Response
200 with JSON on success (schema on the right). Errors use the standard envelope; a retry with the same Idempotency-Key gets the first answer back (how retries work).
curl -X PATCH 'https://websites.workflowcorp.com/api/v1/sites/SITE_ID/sections/SECTION_ID' \
-H "Authorization: Bearer $WEBSITEBUDDY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"content":{"heading":"Open seven days"}}'{
"site_id": "SITE_ID",
"section_id": "SECTION_ID",
"content": {
"heading": "Open seven days"
}
}{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"page_id": {
"type": "string"
},
"type": {
"type": "string"
},
"type_label": {
"type": "string"
},
"position": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"hidden": {
"type": "boolean"
},
"content": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {},
"description": "The section's content; its shape is the type's content_schema (List section types)."
},
"is_sample": {
"type": "boolean"
},
"saved_section_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "Set when this is a LINKED placement of a saved section (Saved sections): its content is the saved section's."
}
},
"required": [
"id",
"page_id",
"type",
"type_label",
"position",
"hidden",
"content",
"is_sample",
"saved_section_id"
],
"additionalProperties": false
}