
## Delete an element

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

Deletes a row from a list. A deleted row cannot be restored through the API — create a new one if needed.

## 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` |
| `iblockTypeId` (query) | 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 DELETE https://vibecode.bitrix24.com/v1/lists/23/elements/41 \
  -H "X-Api-Key: YOUR_API_KEY"
```

### curl — OAuth application

```bash
curl -X DELETE https://vibecode.bitrix24.com/v1/lists/23/elements/41 \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN"
```

### JavaScript — personal key

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/lists/23/elements/41', {
  method: 'DELETE',
  headers: { 'X-Api-Key': 'YOUR_API_KEY' },
})
if (res.status === 204) {
  console.log('Row deleted')
}
```

### JavaScript — OAuth application

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/lists/23/elements/41', {
  method: 'DELETE',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})
if (res.status === 204) {
  console.log('Row deleted')
}
```

## Response

On successful deletion, the API returns HTTP status `204 No Content` with an empty body. Success is indicated by the response code, not the content.

## Response example

```
HTTP/1.1 204 No Content
```

## Error response example

400 — `elementId` is not a number:

```json
{
  "success": false,
  "error": {
    "code": "INVALID_PARAMS",
    "message": "elementId must be a positive integer"
  }
}
```

## Errors

| HTTP | Code | Description |
|------|-----|---------|
| 400 | `INVALID_PARAMS` | `elementId` is not a positive integer |
| 400 | `INVALID_IBLOCK_TYPE` | `iblockTypeId` is not one of `lists`, `bitrix_processes`, `lists_socnet` |
| 403 | `BITRIX_ACCESS_DENIED` | No permission to delete 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).

## See also

- [Create an element](/docs/lists/elements/create)
- [Update an element](/docs/lists/elements/update)
- [Elements](/docs/lists/elements)
