API reference/Sections
Add a section
Try itAdds a section to a draft page. Its content is checked against the type's content_schema; leave content out for placeholder copy to replace. Goes live with the next publish.
POST
/api/v1/sites/{site_id}/pages/{page_id}/sectionsAuthentication
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 requiredMCP tool: add_section
Parameters
Named placeholders go in the path; the rest in a JSON body.
typestringBody · required- A section type key (List section types).One of: hero, text, image_text, gallery, services, testimonials, team, faq, contact_form, map_hours, cta, video, logos, stats, blog_list, price_list, newsletter, marquee, booking, products, events, collection, donate, instagram, custom_html
contentobjectBody · optional- The section's content (its type's content_schema). Omitted = friendly placeholder copy to replace.
hiddenbooleanBody · optional- Default
false site_idstringPath · required- The site's id.1 to 100 characters
page_idstringPath · required- The page's id.1 to 100 characters
positionintegerBody · optional- 0-based place on the page. Omitted = last.0 to 200
Response
201 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 POST 'https://websites.workflowcorp.com/api/v1/sites/SITE_ID/pages/PAGE_ID/sections' \
-H "Authorization: Bearer $WEBSITEBUDDY_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"type":"faq","content":{"heading":"Good to know","items":[{"question":"Do you deliver?","answer":"Within five miles, free over $40."}]}}'{
"site_id": "SITE_ID",
"page_id": "PAGE_ID",
"type": "faq",
"content": {
"heading": "Good to know",
"items": [
{
"question": "Do you deliver?",
"answer": "Within five miles, free over $40."
}
]
}
}{
"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
}