# Update item

Change one of your live items. Send only the fields you want to change. The same rules as the Workspace edit form apply: when the site reviews updates, your change waits in the review queue (one pending update per item) — trusted authors publish at once.

`PATCH /api/items/{id}`

| Field | Scope | Description |
|---|---|---|
| `name` | items:write | Item name, max 200 characters |
| `description` | items:write | HTML description; cleaned with the same filter as the editor |
| `version` | items:write | e.g. 2.4.1 — a new version tells your buyers there is an update |
| `demo_link` | items:write | Live preview URL |
| `tags` · `files_included` · `framework` | items:write | Comma-separated lists |
| `replace_pending` | — | `true` to replace the update that is waiting for review instead of getting `409 pending_update` — see [Hotfixes](https://sellmycode.net/api-docs/publishing.md#hotfixes-while-an-update-waits) |
| `regular_price` · `extended_price` | items:price | Within the site minimum and maximum. A move of more than 30% (or setting a price that was 0) is held until you confirm it from the email we send — the link asks you to be signed in. Not possible while the item is on discount. |
```bash
curl -X PATCH https://sellmycode.net/api/items/123 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"version":"2.4.1","regular_price":29}'
```
```php
$res = (new GuzzleHttp\Client)->patch('https://sellmycode.net/api/items/123', [
    'headers' => ['Authorization' => 'Bearer ' . $token],
    'json' => ['version' => '2.4.1', 'regular_price' => 29],
]);
```
```node
const res = await fetch("https://sellmycode.net/api/items/123", {
  method: "PATCH",
  headers: { Authorization: `Bearer ${token}`, "Content-Type": "application/json" },
  body: JSON.stringify({ version: "2.4.1", regular_price: 29 }),
});
```
```python
res = requests.patch("https://sellmycode.net/api/items/123",
    headers={"Authorization": f"Bearer {token}"},
    json={"version": "2.4.1", "regular_price": 29})
```
```json
{
  "status": "success",
  "item_id": 123,
  "mode": "review",
  "changed": ["version", "regular_price"],
  "update_id": 845,
  "replaced_pending": false,
  "price_confirmation": null
}
```
`mode` is `published` (live now), `review` (waiting for approval) or `unchanged`. When a price move needs your confirmation, `price_confirmation` carries the held prices and when the email link expires.

## Errors

| Code | HTTP | Meaning |
|---|---|---|
| `pending_update` | 409 | Another update of this item is waiting for review — wait, or send `replace_pending: true` |
| `discount_active` | 409 | Prices cannot change while the item is on discount |
| `not_found` | 404 | No live item with this id in your account |
| `nothing_to_change` | 422 | No known field was sent |
| `validation` | 422 | A field is invalid — `errors` lists each one |

---
Source: https://sellmycode.net/api-docs/update-item
