لوكلاء AI: ملف markdown لهذه الصفحة — /docs-content-en/chats/stickers.md فهرس التوثيق — /llms.txt
مقالات التوثيق متاحة حاليًا باللغة الإنجليزية فقط.
Stickers
Read the user's sticker packs and manage them: renaming and deleting your own packs, adding other users' packs, deleting stickers and clearing the recent list.
Scope: im | Base URL: https://vibecode.bitrix24.com/v1 | Authorization: X-Api-Key
List of sticker packs
GET /v1/chats/stickers/packs
Returns the current user's sticker packs page by page: user packs (custom) first, then built-in ones (vendor). To get the next page, pass the id and type of the last pack of the previous page.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
Parameterlimit |
Typenumber | Requiredno | DescriptionPacks per page: 10 by default, from 1 to 200. An out-of-range value is clamped to the nearest bound; the requested and applied values are returned in meta |
ParameterlastId |
Typenumber | Requiredno | DescriptionCursor: id of the last pack of the previous page. Passed only together with lastType |
ParameterlastType |
Typestring | Requiredno | DescriptionCursor: type of the last pack of the previous page — vendor or custom. Passed only together with lastId |
Without a cursor, the first page is returned. Other parameters, a repeated parameter or only one half of the cursor are rejected with 400 INVALID_PARAMS before any Bitrix24 call.
Examples
curl — personal key
curl "https://vibecode.bitrix24.com/v1/chats/stickers/packs?limit=20" \
-H "X-Api-Key: YOUR_API_KEY"
curl — OAuth application
curl "https://vibecode.bitrix24.com/v1/chats/stickers/packs?limit=20" \
-H "X-Api-Key: YOUR_APP_KEY" \
-H "Authorization: Bearer USER_SESSION_TOKEN"
JavaScript — personal key
const res = await fetch('https://vibecode.bitrix24.com/v1/chats/stickers/packs?limit=20', {
headers: { 'X-Api-Key': 'YOUR_API_KEY' },
})
const { data } = await res.json()
console.log('Packs:', data.packs.length, 'more:', data.hasNextPage)
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/chats/stickers/packs?limit=20', {
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
},
})
const { data } = await res.json()
console.log('Packs:', data.packs.length, 'more:', data.hasNextPage)
Response fields
| Field | Type | Description |
|---|---|---|
Fieldsuccess |
Typeboolean | DescriptionAlways true on success |
Fielddata.packs |
Typearray | DescriptionPacks on the page |
Fielddata.packs[].id |
Typenumber | DescriptionPack ID. Unique only together with type. Pass it as packId to get a pack |
Fielddata.packs[].type |
Typestring | Descriptioncustom — a user pack, vendor — a built-in pack |
Fielddata.packs[].name |
Typestring | DescriptionPack name |
Fielddata.packs[].authorId |
Typenumber | null | DescriptionID of the author of a user pack; null for a built-in pack. Profile — by user ID |
Fielddata.packs[].isAdded |
Typeboolean | DescriptionThe pack is in the user's list |
Fielddata.stickers |
Typearray | DescriptionStickers of the page's packs and, on the first page, also the recent stickers |
Fielddata.stickers[].id |
Typenumber | DescriptionSticker ID — for deleting stickers from a pack |
Fielddata.stickers[].packId |
Typenumber | DescriptionID of the sticker's pack — matches data.packs[].id |
Fielddata.stickers[].packType |
Typestring | DescriptionKind of the sticker's pack |
Fielddata.stickers[].uri |
Typestring | DescriptionPath to the image in the Bitrix24 account — relative, without the domain |
Fielddata.stickers[].type |
Typestring | DescriptionSticker type (image) |
Fielddata.stickers[].width |
Typenumber | DescriptionImage width in pixels |
Fielddata.stickers[].height |
Typenumber | DescriptionImage height in pixels |
Fielddata.stickers[].sort |
Typenumber | DescriptionSticker order in the pack |
Fielddata.recentStickers |
Typearray | DescriptionFirst page only: stickers the user sent recently, at most 12, newest first — { id, packId, packType } |
Fielddata.hasNextPage |
Typeboolean | DescriptionThere is a next page |
Fieldmeta.requestedLimit |
Typenumber | DescriptionThe limit passed — only if it was clamped to a bound |
Fieldmeta.appliedLimit |
Typenumber | DescriptionThe limit applied — only if it was clamped to a bound |
Response example
{
"success": true,
"data": {
"stickers": [
{ "id": 1, "uri": "/upload/im/stickers/3/1.png", "type": "image", "width": 512, "height": 512, "packId": 3, "packType": "custom", "sort": 1 },
{ "id": 2, "uri": "/bitrix/images/im/stickers/aiHelp/2.png?v1", "type": "image", "width": 512, "height": 512, "packId": 14, "packType": "vendor", "sort": 2 }
],
"packs": [
{ "id": 3, "name": "Work stickers", "type": "custom", "authorId": 7, "isAdded": true },
{ "id": 14, "name": "AI, help", "type": "vendor", "authorId": null, "isAdded": true }
],
"recentStickers": [
{ "id": 2, "packId": 14, "packType": "vendor" }
],
"hasNextPage": true
}
}
Error response example
400 — only one half of the cursor was passed:
{
"success": false,
"error": {
"code": "INVALID_PARAMS",
"message": "`lastId` needs `lastType`: pass the `id` and the `type` of the last pack of the previous page together."
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| HTTP400 | CodeINVALID_PARAMS |
DescriptionAn unknown query parameter was passed |
| HTTP400 | CodeINVALID_PARAMS |
DescriptionA parameter was passed more than once |
| HTTP400 | CodeINVALID_PARAMS |
Descriptionlimit is not an integer |
| HTTP400 | CodeINVALID_PARAMS |
DescriptionlastId was passed without lastType |
| HTTP400 | CodeINVALID_PARAMS |
DescriptionlastType was passed without lastId |
| HTTP400 | CodeINVALID_PARAMS |
DescriptionlastId is not a positive integer |
| HTTP400 | CodeINVALID_PARAMS |
DescriptionlastType is neither vendor nor custom |
| HTTP401 | CodeTOKEN_MISSING |
DescriptionThe key has no configured Bitrix24 tokens |
| HTTP403 | CodeSCOPE_DENIED |
DescriptionThe key lacks the im scope |
| HTTP403 | CodeWRITE_BLOCKED_READONLY_KEY |
DescriptionA read-only key requested the first page — without lastId and lastType. Cursor pages work with a read-only key too |
| HTTP404 | CodeENTITY_NOT_FOUND |
DescriptionBitrix24 did not find the object. The portal code is in error.b24Code if supplied |
| HTTP422 | CodeBITRIX_ERROR |
DescriptionBitrix24 returned an error. The portal code is in error.b24Code |
| HTTP502 | CodeBITRIX_UNAVAILABLE |
DescriptionBitrix24 is unavailable or returned a server error |
Full list of common API errors — Errors.
Known specifics
- The last page may be empty, with
hasNextPage: false. - If the cursor pack was deleted or removed from the user's list between requests, the list of user packs starts over from the beginning. Deduplicate packs by the
typeandidpair. recentStickersarrives on the first page only. The first request deletes recent-sticker rows beyond 12, so it is classified as a write: a read-only key receives403 WRITE_BLOCKED_READONLY_KEYbefore any Bitrix24 call. Cursor pages remain reads.uriis a path in the Bitrix24 account. The full image address is the Bitrix24 account domain plusuri.