For AI agents: markdown of this page — /docs-content-en/chats/stickers/pack-stickers.md documentation index — /llms.txt

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.

Deletes stickers from a user pack. 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 — data.packs[].id from the list of packs
ids (query) string yes Comma-separated sticker IDs, 1 to 50 positive integers — for example 45,46. IDs come from the sticker pack. Duplicates are dropped
packType (query) string yes Pack type — data.packs[].type from the list of packs. Stickers can be deleted only from custom packs

Examples

curl — personal key

Terminal
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

Terminal
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 distinct 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.

Known specifics

  • If ids lists all stickers in the pack, the whole pack is deleted — as with deleting a 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