## Delete stickers from a pack

`DELETE /v1/chats/stickers/packs/:packId/stickers`

Deletion is irreversible: the stickers disappear from the pack for everyone who added it, and their files are deleted. If you list all stickers in the pack, the whole pack is deleted.

Deletes stickers from a user pack — the messenger v2 method `im.v2.Sticker.delete`. Only the pack author can delete stickers; stickers in built-in packs cannot be deleted.

## Parameters

| Parameter | Type | Required | Description |
|----------|-----|:-----:|----------|
| `packId` (path) | number | yes | Pack ID |
| `ids` | string | yes | Comma-separated sticker IDs, 1 to 50 positive integers — for example `45,46`. Duplicates are dropped |
| `packType` | string | yes | Pack type. Stickers can be deleted only from `custom` packs |

## Examples

### curl — personal key

```bash
curl -X DELETE "https://vibecode.bitrix24.com/v1/chats/stickers/packs/3/stickers?ids=45,46&packType=custom" \
  -H "X-Api-Key: YOUR_API_KEY"
```

### curl — OAuth application

```bash
curl -X DELETE "https://vibecode.bitrix24.com/v1/chats/stickers/packs/3/stickers?ids=45,46&packType=custom" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN"
```

### JavaScript — personal key

```javascript
const ids = [45, 46].join(',')
const res = await fetch(`https://vibecode.bitrix24.com/v1/chats/stickers/packs/3/stickers?ids=${ids}&packType=custom`, {
  method: 'DELETE',
  headers: { 'X-Api-Key': 'YOUR_API_KEY' },
})

const { success } = await res.json()
console.log('Deleted:', success)
```

### JavaScript — OAuth application

```javascript
const ids = [45, 46].join(',')
const res = await fetch(`https://vibecode.bitrix24.com/v1/chats/stickers/packs/3/stickers?ids=${ids}&packType=custom`, {
  method: 'DELETE',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})

const { success } = await res.json()
console.log('Deleted:', success)
```

## Response fields

| Field | Type | Description |
|------|-----|---------|
| `success` | boolean | Always `true` on success |
| `data.result` | boolean | `true` — the request succeeded |

## Response example

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

## Error response example

400 — the `ids` list is empty or invalid:

```json
{
  "success": false,
  "error": {
    "code": "INVALID_PARAMS",
    "message": "`ids` is required: 1 to 50 sticker ids, positive integers separated by commas (`ids=101,102`)."
  }
}
```

## Errors

| HTTP | Code | Description |
|------|-----|---------|
| 400 | `INVALID_PARAMS` | `ids` is missing or empty, contains a value that is not a positive integer, or has more than 50 values; `packId` or `packType` is invalid; another parameter or body field was passed |
| 401 | `TOKEN_MISSING` | The key has no configured Bitrix24 tokens |
| 403 | `SCOPE_DENIED` | The key lacks the `im` scope |
| 403 | `WRITE_BLOCKED_READONLY_KEY` | The key is in read-only mode |
| 403 | `BITRIX_ACCESS_DENIED` | The pack is built-in or its author is another user |
| 404 | `ENTITY_NOT_FOUND` | Bitrix24 did not find the object; the portal code is in `error.b24Code` if supplied |
| 422 | `BITRIX_ERROR` | `error.b24Code`: `PACK_NOT_FOUND` — the pack does not exist |
| 502 | `BITRIX_UNAVAILABLE` | Bitrix24 is unavailable or returned a server error |

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

## Known specifics

- If `ids` lists all stickers in the pack, Bitrix24 deletes the whole pack — as with [deleting a pack](/docs/chats/stickers/pack). The same happens to an empty pack, whatever `ids` contains.
- Sticker IDs that are not in the pack are skipped without an error: a `true` response does not mean that anything was deleted.
- A pack holds at most 50 stickers, so `ids` takes at most 50 values.

## See also

- [Sticker pack](/docs/chats/stickers/pack)
- [List of packs](/docs/chats/stickers/packs)
- [Stickers](/docs/chats/stickers)
