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

Delete a pack

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

Deletes a user pack: it disappears for everyone who added it, and its sticker files are deleted. The pack cannot be restored. Only the pack author can delete it.

Parameters

Parameter Type Required Description
ParameterpackId (path) Typenumber Requiredyes DescriptionPack ID — data.packs[].id from the list of packs
ParameterpackType (query) Typestring Requiredyes DescriptionPack type. Only custom can be deleted

Examples

curl — personal key

Terminal
curl -X DELETE "https://vibecode.bitrix24.com/v1/chats/stickers/packs/3?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?packType=custom" \
  -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/chats/stickers/packs/3?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 res = await fetch('https://vibecode.bitrix24.com/v1/chats/stickers/packs/3?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 pack was deleted

Response example

JSON
{
  "success": true,
  "data": { "result": true }
}

Error response example

422 — the pack does not exist, for example because it has already been deleted:

JSON
{
  "success": false,
  "error": {
    "code": "BITRIX_ERROR",
    "message": "PACK_NOT_FOUND",
    "b24Code": "PACK_NOT_FOUND"
  }
}

Errors

HTTP Code Description
HTTP400 CodeINVALID_PARAMS DescriptionpackId is not a positive integer, packType is missing or invalid, another parameter or body field was passed, a parameter was repeated
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

  • A built-in pack and a user pack may have the same id, so packType is required.

See also