New Endpoints: Create and Manage Code Widgets < ⁄ >
We're excited to announce a new set of endpoints that allow you to manage Code Widgets directly via the REST API. You can now programmatically create, retrieve, update, move, and delete code widgets on your Miro boards.
💡 What is a "Code Widget"?
Code Widgets are native Miro items designed to display formatted source code on the canvas with syntax highlighting—perfect for technical documentation, code reviews, architecture discussions, and engineering workshops.
🛠️ New Endpoints
You can now automate the full lifecycle of Code Widgets using the following methods:
- Create code widget item
POST
Add a new code widget to a specific board. - Get code widget items
GET
Retrieve a paginated list of code widgets on a board. - Get code widget item
GET
Retrieve details about a specific code widget. - Update code widget item
PATCH
Update the content, position, geometry, or parent of an existing code widget. - Move code widget item
PATCH
Reposition a code widget on the board using x/y coordinates. - Delete code widget item
DELETE
Remove a code widget from the board.
⚠️ Good to Know: Content Limits
Code Widget content is currently capped at 6,000 characters (plain text). Content exceeding this limit will be truncated. We're working on increasing this limit soon—stay tuned!
Note: These endpoints are available under the
v2-experimentalAPI. We'd love your feedback as we work toward general availability—stay tuned!