
## Update an element

`PATCH /v1/lists/:iblockId/elements/:elementId`

Updates a list row. This is a full overwrite of the row: any field not passed in `fields` is cleared on the Bitrix24 side, so send the complete set of row fields, not only the ones being changed.

## Parameters

| Parameter | Type | Required | Description |
|----------|-----|:-----:|---------|
| `iblockId` (path) | string | yes | List ID or symbolic code. List: `GET /v1/lists` |
| `elementId` (path) | number | yes | Row ID. List: `GET /v1/lists/:iblockId/elements` |

## Request fields (body)

| Field | Type | Required | Description |
|------|-----|:-----:|---------|
| `fields` | object | yes | The complete set of row fields. Fields that are not passed are cleared. System fields are named in uppercase, for example `NAME`. A custom property is set with the key `PROPERTY_<id>` from `GET /v1/lists/:iblockId/fields`. A multiple-value property is passed as an array: `"PROPERTY_951": ["1", "2"]` |
| `iblockTypeId` | string | no | Infoblock type. Values:<br>`lists` — regular lists, default<br>`lists_socnet` — workgroup lists<br>`bitrix_processes` — internal workflows |

## Examples

### curl — personal key

```bash
curl -X PATCH https://vibecode.bitrix24.com/v1/lists/23/elements/41 \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "fields": {
      "NAME": "Row 1 (updated)",
      "PROPERTY_951": "new value"
    }
  }'
```

### curl — OAuth application

```bash
curl -X PATCH https://vibecode.bitrix24.com/v1/lists/23/elements/41 \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "fields": {
      "NAME": "Row 1 (updated)",
      "PROPERTY_951": "new value"
    }
  }'
```

### JavaScript — personal key

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/lists/23/elements/41', {
  method: 'PATCH',
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    fields: {
      NAME: 'Row 1 (updated)',
      PROPERTY_951: 'new value',
    },
  }),
})

const { data } = await res.json()
```

### JavaScript — OAuth application

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/lists/23/elements/41', {
  method: 'PATCH',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    fields: {
      NAME: 'Row 1 (updated)',
      PROPERTY_951: 'new value',
    },
  }),
})

const { data } = await res.json()
```

## Response fields

| Field | Type | Description |
|------|-----|---------|
| `success` | boolean | Always `true` on success |
| `data.updated` | boolean | `true` on successful update |

## Response example

```json
{
  "success": true,
  "data": {
    "updated": true
  }
}
```

## Error response example

400 — `fields` is missing:

```json
{
  "success": false,
  "error": {
    "code": "MISSING_REQUIRED_FIELDS",
    "message": "`fields` is required. The update overwrites the element, so send the complete field set."
  }
}
```

## Errors

| HTTP | Code | Description |
|------|-----|---------|
| 400 | `INVALID_PARAMS` | `elementId` is not a positive integer |
| 400 | `MISSING_REQUIRED_FIELDS` | `fields` is missing |
| 400 | `INVALID_IBLOCK_TYPE` | `iblockTypeId` is not one of `lists`, `bitrix_processes`, `lists_socnet` |
| 403 | `BITRIX_ACCESS_DENIED` | No permission to modify this row |
| 403 | `WRITE_BLOCKED_READONLY_KEY` | The key is in read-only mode. Switch it to read and write in the `/keys` section |
| 403 | `SCOPE_DENIED` | The key is missing the `lists` scope |
| 401 | `TOKEN_MISSING` | The key has no configured tokens |
| 409 | `LISTS_MODULE_NOT_ENABLED` | The «Lists» module is not enabled on the portal |

Full list of common API errors — [Errors](/docs/errors).

## Known specifics

**Full overwrite of the row.** The update replaces the row entirely: fields absent from `fields` are cleared on the Bitrix24 side. To keep the current values, first read the row via `GET /v1/lists/:iblockId/elements/:elementId` and send back the complete set of fields with your edits applied.

## See also

- [Create an element](/docs/lists/elements/create)
- [Get an element](/docs/lists/elements/get)
- [Delete an element](/docs/lists/elements/delete)
- [Elements](/docs/lists/elements)
