# Code block

> Create a syntax-highlighted code block from a snippet of source code.

Source: https://mockflow.com/developers/reference/item-types/code-block

Send `"type": "code_block"`.

Create a syntax-highlighted code block from a snippet of source code.

Also available as the MCP tool `render_codeblock`. The same payload works through either surface.

### Fields

- `code` (string, required): Raw source code. Preserve newlines and indentation exactly.
- `language` (string): Programming language, lowercase (e.g. "javascript", "python", "sql", "bash")
- `title` (string): Short title for the code block title bar (e.g. "Bubble Sort")

## Example

```json
{
  "type": "code_block",
  "data": {
    "code": "string",
    "language": "string",
    "title": "Q4 Launch Planning"
  }
}
```
