| name | laravel-miro |
| description | Interact with the Miro REST API v2 — manage boards, sticky notes, frames, and board items using typed DTOs and Response objects via the Miro facade or connector. |
Laravel Miro
When to use this skill
Use this skill when working with Miro boards, sticky notes, frames, or board items via the codebar-ag/laravel-miro package.
Setup
Requires MIRO_ACCESS_TOKEN in .env. Generate a personal access token at miro.com/app/settings/user-profile/apps.
Key concepts
- All methods are available via the
Miro facade or the MiroConnector directly.
- Input always uses typed DTOs — never plain arrays.
- Output is always a typed
*Response object (wraps the Saloon response) or Saloon\Http\Response (for deletes).
- Call
->dto() on the response to get the typed DTO or array of DTOs. Returns null on failure.
- Always check
->successful() before calling ->dto().
Response Handling
$response = Miro::getBoard('board_id');
if ($response->successful()) {
$board = $response->dto();
} else {
$response->status();
$response->error();
$response->errorCode();
}
All *Response objects expose: successful(), failed(), status(), error(), errorCode(), dto().
Boards
use CodebarAg\Miro\Dto\Boards\CreateBoardDto;
use CodebarAg\Miro\Dto\Boards\GetBoardsDto;
use CodebarAg\Miro\Dto\Boards\UpdateBoardDto;
use CodebarAg\Miro\Facades\Miro;
$response = Miro::getBoards();
$response = Miro::getBoards(new GetBoardsDto(teamId: 'team_123', limit: 10));
$response = Miro::getBoard('board_id');
$response = Miro::createBoard(new CreateBoardDto(name: 'My Board', description: 'Optional'));
$response = Miro::updateBoard('board_id', new UpdateBoardDto(name: 'Renamed'));
Miro::deleteBoard('board_id');
BoardDto properties
$board->id;
$board->name;
$board->description;
$board->type;
$board->viewLink;
$board->teamId;
$board->projectId;
$board->createdAt;
$board->modifiedAt;
Sticky Notes
use CodebarAg\Miro\Dto\StickyNotes\CreateStickyNoteDto;
use CodebarAg\Miro\Dto\StickyNotes\GetStickyNotesDto;
use CodebarAg\Miro\Dto\StickyNotes\UpdateStickyNoteDto;
use CodebarAg\Miro\Facades\Miro;
$response = Miro::getStickyNotes('board_id');
$response = Miro::getStickyNotes('board_id', new GetStickyNotesDto(limit: 20));
$response = Miro::getStickyNote('board_id', 'note_id');
$response = Miro::createStickyNote('board_id', new CreateStickyNoteDto(
content: 'Hello!',
shape: 'square', // square | rectangle
fillColor: 'light_yellow',
textAlign: 'center', // left | center | right
textAlignVertical: 'top', // top | middle | bottom
positionX: 0.0,
positionY: 0.0,
positionOrigin: 'center',
width: 199.0,
parentId: 'frame_id', // optional, place inside a frame
));
$response = Miro::updateStickyNote('board_id', 'note_id', new UpdateStickyNoteDto(
content: 'Updated',
fillColor: 'light_pink',
));
Miro::deleteStickyNote('board_id', 'note_id');
StickyNoteDto properties
$note->id;
$note->type;
$note->content;
$note->shape;
$note->fillColor;
$note->textAlign;
$note->textAlignVertical;
$note->positionX;
$note->positionY;
$note->width;
$note->height;
$note->parentId;
$note->createdAt;
$note->modifiedAt;
Frames
use CodebarAg\Miro\Dto\Frames\CreateFrameDto;
use CodebarAg\Miro\Dto\Frames\GetFramesDto;
use CodebarAg\Miro\Dto\Frames\UpdateFrameDto;
use CodebarAg\Miro\Facades\Miro;
$response = Miro::getFrames('board_id');
$response = Miro::getFrames('board_id', new GetFramesDto(limit: 20));
$response = Miro::getFrame('board_id', 'frame_id');
$response = Miro::createFrame('board_id', new CreateFrameDto(
title: 'Sprint 1',
positionX: 0.0,
positionY: 0.0,
width: 1920.0,
height: 1080.0,
fillColor: '#ffffff',
));
$response = Miro::updateFrame('board_id', 'frame_id', new UpdateFrameDto(
title: 'Sprint 1 – Updated',
));
Miro::deleteFrame('board_id', 'frame_id');
FrameDto properties
$frame->id;
$frame->type;
$frame->title;
$frame->fillColor;
$frame->positionX;
$frame->positionY;
$frame->width;
$frame->height;
$frame->parentId;
$frame->createdAt;
$frame->modifiedAt;
Board Items
use CodebarAg\Miro\Dto\BoardItems\GetBoardItemsDto;
use CodebarAg\Miro\Facades\Miro;
$response = Miro::getBoardItems('board_id');
$response = Miro::getBoardItems('board_id', new GetBoardItemsDto(
type: 'sticky_note',
limit: 50,
cursor: 'next_page_cursor',
));
$response = Miro::getBoardItem('board_id', 'item_id');
BoardItemDto properties
$item->id;
$item->type;
$item->data;
$item->position;
$item->geometry;
$item->createdAt;
$item->modifiedAt;
$item->parentId;
Using the connector directly
Use the connector methods (not ->send()) to get typed *Response objects:
use CodebarAg\Miro\MiroConnector;
$connector = new MiroConnector();
$response = $connector->getBoards();
$boards = $response->dto();
$response = $connector->getBoard('board_id');
$board = $response->dto();
Input DTOs reference
| DTO | Namespace | Fields |
|---|
CreateBoardDto | Dto\Boards | name (required), description, teamId |
UpdateBoardDto | Dto\Boards | name, description (all optional) |
GetBoardsDto | Dto\Boards | teamId, projectId, query, owner, limit, offset, sort |
GetBoardItemsDto | Dto\BoardItems | limit, cursor, type |
CreateStickyNoteDto | Dto\StickyNotes | content, shape, fillColor, textAlign, textAlignVertical, positionX, positionY, positionOrigin, width, parentId |
UpdateStickyNoteDto | Dto\StickyNotes | same as Create, all optional |
GetStickyNotesDto | Dto\StickyNotes | limit, cursor |
CreateFrameDto | Dto\Frames | title (required), fillColor, positionX, positionY, positionOrigin, width, height, parentId |
UpdateFrameDto | Dto\Frames | same as Create, all optional |
GetFramesDto | Dto\Frames | limit, cursor |