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

Remove a sticker from the recent list

DELETE /v1/chats/stickers/recent/:stickerId

Removes one sticker from the current user's recent list. The sticker and its pack do not change.

Recent stickers are the stickers the user sent most recently, at most 12. The list can be read in the recentStickers field of the first page of the list of packs. To clear the whole list, use DELETE /v1/chats/stickers/recent.

Parameters

Parameter Type Required Description
stickerId (path) number yes Sticker ID — recentStickers[].id from the list of packs
packId (query) number yes ID of the sticker's pack — recentStickers[].packId
packType (query) string yes Type of the sticker's pack — recentStickers[].packType: vendor or custom

Examples

curl — personal key

Terminal
curl -X DELETE "https://vibecode.bitrix24.com/v1/chats/stickers/recent/5?packId=15&packType=vendor" \
  -H "X-Api-Key: YOUR_API_KEY"

curl — OAuth application

Terminal
curl -X DELETE "https://vibecode.bitrix24.com/v1/chats/stickers/recent/5?packId=15&packType=vendor" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN"

JavaScript — personal key

javascript
const sticker = { id: 5, packId: 15, packType: 'vendor' } // a recentStickers item
const res = await fetch(
  `https://vibecode.bitrix24.com/v1/chats/stickers/recent/${sticker.id}?packId=${sticker.packId}&packType=${sticker.packType}`,
  { method: 'DELETE', headers: { 'X-Api-Key': 'YOUR_API_KEY' } },
)

const { success } = await res.json()
console.log('Removed from recent:', success)

JavaScript — OAuth application

javascript
const sticker = { id: 5, packId: 15, packType: 'vendor' } // a recentStickers item
const res = await fetch(
  `https://vibecode.bitrix24.com/v1/chats/stickers/recent/${sticker.id}?packId=${sticker.packId}&packType=${sticker.packType}`,
  {
    method: 'DELETE',
    headers: {
      'X-Api-Key': 'YOUR_APP_KEY',
      'Authorization': 'Bearer USER_SESSION_TOKEN',
    },
  },
)

const { success } = await res.json()
console.log('Removed from recent:', success)

Response fields

Field Type Description
success boolean Always true on success
data.result boolean Always true, even if the sticker was not in the list

Response example

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

Error response example

400 — packId was not passed:

JSON
{
  "success": false,
  "error": {
    "code": "INVALID_PARAMS",
    "message": "`packId` is required: the id of the pack the sticker belongs to, a positive integer."
  }
}

Errors

HTTP Code Description
400 INVALID_PARAMS stickerId or packId is not a positive integer, packId or packType is missing, packType is not vendor / custom, 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
404 ENTITY_NOT_FOUND Bitrix24 did not find the object. The portal code is in error.b24Code if supplied
422 BITRIX_ERROR Bitrix24 returned an error. The portal code is in error.b24Code
502 BITRIX_UNAVAILABLE Bitrix24 is unavailable or returned a server error

Full list of common API errors — Errors.

Known specifics

  • Opening the first page of the list of packs leaves at most 12 rows in the recent list, as the Bitrix24 sticker panel does.

See also