Items

Create an item

Any creatable type. type selects the schema for data: a frame's schema is the MCP render tool's own, a primitive's is below. Omit position and the item goes below everything on the board. A connector needs no position; its data names the two items it joins.

The item is drawn by a browser, which mints its id. When the draw has landed within a few seconds the answer is 201 with the item; otherwise 202 with a Job whose result.itemIds carries the id once it appears. A board open in the editor draws it live either way.

post/boards/{boardId}/items

Request

  • Base URL
    https://api.mockflow.com/v1
  • Auth
    HTTP bearer

Headers

Idempotency-Keystring

A unique key per logical request. Replays within 24 hours return the original response.

Request body

callbackUrlstring uri

Optional. When the job this request starts finishes or fails, a short body is POSTed here once: { eventId, status, boardId, boardUrl, imageUrl }, where status is succeeded or failed and imageUrl is a picture of what the job drew, or null. Signed with the workspace's callback secret (GET /webhooks/callback-secret). https to a public host. The full job is on GET /jobs/{jobId}.

type'artifact' | 'audio' | 'calendar' | 'chart' | 'checklist' | 'cloud_architecture' | 'code_block' | 'comment' | 'connector' | 'customer_journey' | 'data_simulator' | 'database_diagram' | 'design' | 'floorplan' | 'flowchart' | 'gantt' | 'image' | 'kanban' | 'knowledge_graph' | 'map' | 'map_regions' | 'markdown' | 'mindmap' | 'model_3d' | 'mood_frame' | 'poll' | 'prototype' | 'reaction' | 'section' | 'shape' | 'spinning_wheel' | 'spreadsheet' | 'sticky_note' | 'storyboard' | 'strategy_map' | 'swimlane' | 'table' | 'text' | 'timeline' | 'tree_diagram' | 'upvote_ideas' | 'video' | 'whiteboard' | 'whiteboard_frame' | 'wireframe' required

Item types, generated from the MockFlow component registry. Primitive types are drawn by the editor; frame types are rich components whose data schema is the same one the MCP render_* tool accepts.

Example request

{
  "callbackUrl": "https://hooks.zapier.com/hooks/standard/123/abc"
}

Response

Created and already on the board.

idstring
typestring

An ItemType, or other for an editor widget the API has no type for.

componentTypestring

The editor's own class name, exact where type is a family.

boardIdstring
sectionIdstring nullable

The section the item sits inside, by position.

groupIdstring nullable
rotationnumber
zIndexinteger
lockedboolean
textstring

Plain text extracted from the item, for search and the outline.

readback'exact' | 'unwrapped' | 'text' | 'pointer' | 'parts' | 'none'
fromstring nullable

Connectors only: the item or group: the line starts at.

tostring nullable

Connectors only.

directedboolean

Connectors only.

labelstring

Connectors only.

urlstring uri

Opens the board focused on this item.

Example response

{
  "id": "itm_k9"
}

Changes

No recorded changes to this operation across all 1 revision of this API.