## Delete a quick reply

`DELETE /v1/openline-configs/:lineId/quick-replies/:id`

Deletes an Open Channel quick reply by its ID, provided the reply belongs to the channel specified in the request path. A deleted reply cannot be restored through the API — create a new one if needed.

## Parameters

| Parameter | Type | Required | Description |
|----------|-----|:-----:|----------|
| `lineId` (path) | integer | yes | Open Channel ID. List: [`GET /v1/openline-configs`](/docs/openlines/config/list) |
| `id` (path) | integer | yes | ID of a quick reply in this channel. List: [`GET /v1/openline-configs/:lineId/quick-replies`](/docs/openlines/quick-replies/list), field `data.replies[].id` |

The request has no body.

## Examples

### curl — personal key

```bash
curl -X DELETE "https://vibecode.bitrix24.com/v1/openline-configs/1/quick-replies/7275" \
  -H "X-Api-Key: YOUR_API_KEY"
```

### curl — OAuth application

```bash
curl -X DELETE "https://vibecode.bitrix24.com/v1/openline-configs/1/quick-replies/7275" \
  -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/openline-configs/1/quick-replies/7275',
  { method: 'DELETE', headers: { 'X-Api-Key': 'YOUR_API_KEY' } }
)
const { success, data } = await res.json()
console.log(data.deleted)
```

### JavaScript — OAuth application

```javascript
const res = await fetch(
  'https://vibecode.bitrix24.com/v1/openline-configs/1/quick-replies/7275',
  {
    method: 'DELETE',
    headers: {
      'X-Api-Key': 'YOUR_APP_KEY',
      'Authorization': 'Bearer USER_SESSION_TOKEN',
    },
  }
)
const { success, data } = await res.json()
console.log(data.deleted)
```

## Response fields

| Field | Type | Description |
|------|-----|----------|
| `success` | boolean | `true` on successful deletion |
| `data.id` | integer | ID of the deleted quick reply |
| `data.deleted` | boolean | Always `true` |

## Response example

```json
{
  "success": true,
  "data": {
    "id": 7275,
    "deleted": true
  }
}
```

## Error response example

404 — the `lineId` channel has no quick reply with this `id`:

```json
{
  "success": false,
  "error": {
    "code": "ENTITY_NOT_FOUND",
    "message": "Quick reply not found in this line"
  }
}
```

## Errors

| HTTP | Code | Description |
|------|-----|----------|
| 400 | `INVALID_PARAMS` | `lineId` or `id` is not a positive integer |
| 400 | `INVALID_PARAMS` | The request body is not a JSON object |
| 400 | `INVALID_JSON_BODY` | The request body cannot be parsed as JSON |
| 401 | `MISSING_API_KEY` | The `X-Api-Key` header was not passed |
| 401 | `TOKEN_MISSING` | The key has no authorization on the Bitrix24 portal. For an application key, `Authorization: Bearer` was not passed |
| 403 | `SCOPE_DENIED` | The key lacks the `imopenlines` scope |
| 403 | `WRITE_BLOCKED_READONLY_KEY` | The key is in read-only mode |
| 403 | `BITRIX_ACCESS_DENIED` | The employee the call runs as cannot view this channel's quick replies |
| 403 | `BITRIX_ACCESS_DENIED` | Bitrix24 denied the employee permission to delete the reply |
| 404 | `ENTITY_NOT_FOUND` | Message `Quick reply not found in this line`: the channel has no reply with this `id`. The same response is returned for the `id` of another channel's reply and for a repeated deletion |
| 404 | `ENTITY_NOT_FOUND` | Message `Record not found`: there is no Open Channel with this `lineId` |
| 422 | `BITRIX_ERROR` | Bitrix24 returned an error. The text is in `message` |
| 429 | `RATE_LIMITED` | The method's own limit was exceeded. The overall platform ceiling is 120 requests per minute per portal and is split across platform replicas, so the code may arrive before the 120th request. The effective value is in the `x-ratelimit-limit` header |
| 502 | `OPENLINE_OPERATOR_FAILED` | Bitrix24 did not confirm the deletion or returned the channel's reply list in an unexpected shape. Check the [list of quick replies](/docs/openlines/quick-replies/list) before retrying |
| 502 | `BITRIX_UNAVAILABLE` | The Bitrix24 portal is unavailable |
| 503 | `BITRIX_TIMEOUT` | Bitrix24 did not respond in time, and the outcome is unknown. Check the [list of quick replies](/docs/openlines/quick-replies/list) before retrying |

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

## See also

- [List quick replies](/docs/openlines/quick-replies/list)
- [Create a quick reply](/docs/openlines/quick-replies/create)
- [Update a quick reply](/docs/openlines/quick-replies/update)
- [Open Channel quick replies](/docs/openlines/quick-replies)
- [List Open Channel configurations](/docs/openlines/config/list)
