# Move, resize, replace data or reply

> PATCH /boards/{boardId}/items/{itemId}

Source: https://mockflow.com/developers/reference/items/update-item

**PATCH** `https://api.mockflow.com/v1/boards/{boardId}/items/{itemId}`  
Scopes: `boards:write`

**curl**

```bash
curl https://api.mockflow.com/v1/boards/brd_3f9e2a/items/itm_k9 \
  -X PATCH \
  -H "Authorization: Bearer $MOCKFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "position": {
    "x": 0,
    "y": 0
  },
  "size": {
    "width": 0,
    "height": 0
  },
  "data": {
    "files": {},
    "merge": false,
    "deletes": [
      "string"
    ],
    "order": [
      "string"
    ],
    "html": "string",
    "data": {}
  },
  "reply": "string"
}'
```

**JavaScript**

```javascript
const response = await fetch("https://api.mockflow.com/v1/boards/brd_3f9e2a/items/itm_k9", {
  method: "PATCH",
  headers: {
    Authorization: `Bearer ${process.env.MOCKFLOW_API_KEY}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
  "position": {
    "x": 0,
    "y": 0
  },
  "size": {
    "width": 0,
    "height": 0
  },
  "data": {
    "files": {},
    "merge": false,
    "deletes": [
      "string"
    ],
    "order": [
      "string"
    ],
    "html": "string",
    "data": {}
  },
  "reply": "string"
})
});

const data = await response.json();
```

**Python**

```python
import os, requests

response = requests.patch(
    "https://api.mockflow.com/v1/boards/brd_3f9e2a/items/itm_k9",
    headers={"Authorization": f"Bearer {os.environ['MOCKFLOW_API_KEY']}"},
    json={
  "position": {
    "x": 0,
    "y": 0
  },
  "size": {
    "width": 0,
    "height": 0
  },
  "data": {
    "files": {},
    "merge": False,
    "deletes": [
      "string"
    ],
    "order": [
      "string"
    ],
    "html": "string",
    "data": {}
  },
  "reply": "string"
},
)

response.raise_for_status()
data = response.json()
```

**200**

```json
{
  "id": "itm_k9",
  "type": "string",
  "componentType": "string",
  "boardId": "brd_3f9e2a",
  "sectionId": "string",
  "groupId": "string"
}
```

**202**

```json
{
  "id": "job_7hd2",
  "kind": "item.create",
  "status": "queued",
  "progress": 0,
  "message": "Interview 5 users",
  "result": {
    "itemIds": [
      "string"
    ],
    "updated": [
      "string"
    ],
    "deleted": [
      "string"
    ],
    "creditsUsed": 0,
    "boardTitle": "Q4 Launch Planning",
    "skill": "string"
  }
}
```

**429**

```json
{
  "error": {
    "code": "rate_limited",
    "message": "Too many requests.",
    "docsUrl": "https://mockflow.com/developers/concepts/errors#rate_limited"
  },
  "requestId": "req_45d49816999bac40"
}
```

`position` and `size` move and resize any item. `data` replaces a frame's content in place, for the types drawn as a single component (kanban, mindmap, markdown, checklist, gantt, timeline and the rest of the frames); a flowchart or a whiteboard is many components and answers 409. `reply` adds to a comment's thread. z-order, group and lock are not changed through the API in this version.

### Authorization

- `Authorization` (string, required): `Bearer <key>`. The key needs `boards:write` scope. Create and manage keys in the [developer console](/developers/console/); what each scope unlocks is on the [scopes page](/developers/concepts/scopes).

### Path parameters

- `boardId` (string, required)
- `itemId` (string, required)

### Body

- `position` (Point): - `x` (number, required)
  - `y` (number, required)
- `size` (Size): - `width` (number)
  - `height` (number)
- `data` (ItemData): Selected by the sibling `type`. One schema per item type, generated from the component registry.
- `reply` (string): Comments only: add a reply to the thread.

### Response

- `id` (string)
- `type` (string): An ItemType, or `other` for an editor widget the API has no type for.
- `componentType` (string): The editor's own class name, exact where `type` is a family.
- `boardId` (string)
- `sectionId` (string | null): The section the item sits inside, by position.
- `groupId` (string | null)
- `position` (Point): - `x` (number, required)
  - `y` (number, required)
- `size` (Size): - `width` (number)
  - `height` (number)
- `rotation` (number)
- `zIndex` (integer)
- `locked` (boolean)
- `text` (string): Plain text extracted from the item, for search and the outline.
- `readback` (enum<string>): One of `exact`, `unwrapped`, `text`, `pointer`, `parts` or `none`.
- `data` (ItemData): Selected by the sibling `type`. One schema per item type, generated from the component registry.
- `from` (string | null): Connectors only: the item or `group:` the line starts at.
- `to` (string | null): Connectors only.
- `directed` (boolean): Connectors only.
- `label` (string): Connectors only.
- `url` (string): Opens the board focused on this item.

### Errors

- 429 `rate_limited`: Too many requests.
