> ## Documentation Index > Fetch the complete documentation index at: https://docs.mapp.com/llms.txt > Use this file to discover all available pages before exploring further. # Render a CMS block > Substitutes the given variables into the block content. The body is optional. variables holds the values to substitute for this render only, as a JSON object serialized as a string, e.g. {"defaultBGColor": "#CCCCCC"}. Nothing is saved. ## OpenAPI ````json POST /cmsBlocks/render { "openapi": "3.0.4", "info": { "title": "Engage public API", "version": "1" }, "servers": [ { "url": "https://your-engage-domain.com/api/rest" } ], "tags": [ { "name": "Address Attributes" }, { "name": "Async" }, { "name": "Audit Log" }, { "name": "Automation" }, { "name": "Blacklist" }, { "name": "CMS (legacy)" }, { "name": "CMS Blocks" }, { "name": "CMS Frameworks" }, { "name": "CMS Messages" }, { "name": "CMS Templates" }, { "name": "Contact" }, { "name": "Content" }, { "name": "Coupon" }, { "name": "Draft Message" }, { "name": "Ecommerce" }, { "name": "Group" }, { "name": "Group Attributes" }, { "name": "Landing Page" }, { "name": "Member Attributes" }, { "name": "Membership" }, { "name": "Message" }, { "name": "Meta" }, { "name": "Mobile Push" }, { "name": "Prepared Message" }, { "name": "Process" }, { "name": "Profile Attributes" }, { "name": "Related Data" }, { "name": "Segmentation" }, { "name": "System" }, { "name": "System User" }, { "name": "Usage Statistics" }, { "name": "User" }, { "name": "Whiteboard" } ], "paths": { "/cmsBlocks/render": { "post": { "tags": [ "CMS Blocks" ], "summary": "Renders a block's content with the given variables substituted in.", "description": "Substitutes the given variables into the block content. The body is optional. variables holds the values to substitute for this render only, as a JSON object serialized as a string, e.g. {\"defaultBGColor\": \"#CCCCCC\"}. Nothing is saved.", "operationId": "cmsBlocksRender", "parameters": [ { "name": "blockId", "in": "query", "description": "The numeric ID of the block.", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "requestBody": { "description": "Optional. The variables to substitute in.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VariablesPayload" } } }, "x-bodyName": "body" }, "responses": { "200": { "description": "The block with its content rendered.\n\nExample response:\n```json\n{\n \"id\": 9405,\n \"name\": \"Welcome text\",\n \"content\": \"
Welcome to our newsletter
\",\n \"renderedContent\": \"Welcome to our newsletter
\",\n \"tags\": \"welcome,onboarding\",\n \"type\": null,\n \"usageArea\": \"BODY\",\n \"description\": \"Greeting used in onboarding mails\",\n \"contentStatus\": \"UNLOCKED\",\n \"encoding\": \"UTF-8\",\n \"lifecycleStatus\": \"ACTIVE\",\n \"folder\": \"Onboarding\",\n \"validationCode\": \"\",\n \"lastError\": null\n}\n```", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RenderedBlock" } } } }, "400": { "description": "Error. All errors are returned as HTTP 400; errorCode in the body says what went wrong: INVALID_PARAMETER or MISSING_PARAMETER (a parameter is missing or invalid), NO_SUCH_OBJECT (no object with this ID in your account), PERMISSION_DENIED (your user lacks the CMS permission for this action), UNEXPECTED_ERROR (backend error). Example: {\"errorActor\": \"CLIENT\", \"errorCode\": \"NO_SUCH_OBJECT\", \"message\": \"...\", \"objectType\": null, \"propertyName\": null, \"propertyValue\": null}", "content": { "application/json": {} } } } } } }, "components": { "schemas": { "VariablesPayload": { "type": "object", "properties": { "variables": { "type": "string" } } }, "RenderedBlock": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" }, "content": { "type": "string" }, "renderedContent": { "type": "string" }, "tags": { "type": "string" }, "type": { "type": "string" }, "usageArea": { "type": "string" }, "description": { "type": "string" }, "contentStatus": { "enum": [ "LOCKED", "UNLOCKED" ], "type": "string" }, "encoding": { "type": "string" }, "lifecycleStatus": { "enum": [ "ACTIVE", "ARCHIVED" ], "type": "string" }, "folder": { "type": "string" }, "validationCode": { "type": "string" }, "lastError": { "type": "string" } } } } } } ````