Fetch AI-generated content and layout for a set of block IDs.
Fetch AI-generated content and layout for the given block IDs from the generated_blocks table.
Auth: API key (x-api-key header or api_key query param).
| Param | Type | Required | Notes |
|---|---|---|---|
websiteId | uuid | no | Target website; falls back to Host header / config. Only checked when blockIds is non-empty. |
blockIds | string | no | Comma-separated block UUIDs. Empty or missing β empty object. |
api_key | string | no | Alternative to the x-api-key header. |
{
"generatedBlocks": {
"<block_id>": {
"id": "...",
"generated_content": {},
"generated_layout": {},
"schema_name": "hero-block",
"status": "ready"
}
}
}
The outer map is keyed by the requested block_id; the inner id is the generated row's own id.
curl '{CMS_API_URL}/blocks/generated?websiteId=<uuid>&blockIds=<id1>,<id2>' \
-H 'x-api-key: <key>'
400 β invalid UUID in blockIds, or unresolvable website401 β invalid API key