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
ParameterpackId (path) Typenumber Requiredyes DescriptionPack ID — data.packs[].id from the list of packs
Parameterids (query) Typestring Requiredyes DescriptionComma-separated sticker IDs, 1 to 50 positive integers — for example 45,46. IDs come from the sticker pack. Duplicates are dropped
ParameterpackType (query) Typestring Requiredyes DescriptionPack 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
Fieldsuccess Typeboolean DescriptionAlways true on success
Fielddata.result Typeboolean Descriptiontrue — 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
HTTP400 CodeINVALID_PARAMS Descriptionids 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
HTTP401 CodeTOKEN_MISSING DescriptionThe key has no configured Bitrix24 tokens
HTTP403 CodeSCOPE_DENIED DescriptionThe key lacks the im scope
HTTP403 CodeWRITE_BLOCKED_READONLY_KEY DescriptionThe key is in read-only mode
HTTP403 CodeBITRIX_ACCESS_DENIED DescriptionThe pack is built-in or its author is another user
HTTP404 CodeENTITY_NOT_FOUND DescriptionBitrix24 did not find the object. The portal code is in error.b24Code if supplied
HTTP422 CodeBITRIX_ERROR Descriptionerror.b24Code: PACK_NOT_FOUND — the pack does not exist
HTTP502 CodeBITRIX_UNAVAILABLE DescriptionBitrix24 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