For AI agents: markdown of this page — /docs-content-en/chats/stickers/pack-update.md documentation index — /llms.txt
Rename a pack
PATCH /v1/chats/stickers/packs/:packId
Changes the name of a user sticker pack — only the pack's author can rename 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 packs can be changed |
Request body fields
| Field | Type | Required | Description |
|---|---|---|---|
Fieldname |
Typestring | Requiredyes | DescriptionNew name: non-empty, up to 255 characters as stored by Bitrix24. An emoji above U+FFFF counts as 10 characters |
Examples
curl — personal key
curl -X PATCH "https://vibecode.bitrix24.com/v1/chats/stickers/packs/3?packType=custom" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "Team stickers"}'
curl — OAuth application
curl -X PATCH "https://vibecode.bitrix24.com/v1/chats/stickers/packs/3?packType=custom" \
-H "X-Api-Key: YOUR_APP_KEY" \
-H "Authorization: Bearer USER_SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "Team stickers"}'
JavaScript — personal key
const res = await fetch('https://vibecode.bitrix24.com/v1/chats/stickers/packs/3?packType=custom', {
method: 'PATCH',
headers: { 'X-Api-Key': 'YOUR_API_KEY', 'Content-Type': 'application/json' },
body: JSON.stringify({ name: 'Team stickers' }),
})
const { success } = await res.json()
console.log('Renamed:', success)
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/chats/stickers/packs/3?packType=custom', {
method: 'PATCH',
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
'Content-Type': 'application/json',
},
body: JSON.stringify({ name: 'Team stickers' }),
})
const { success } = await res.json()
console.log('Renamed:', success)
Response fields
| Field | Type | Description |
|---|---|---|
Fieldsuccess |
Typeboolean | DescriptionAlways true on success |
Fielddata.result |
Typeboolean | Descriptiontrue — the name was changed |
Response example
{
"success": true,
"data": { "result": true }
}
Error response example
422 — the pack does not exist:
{
"success": false,
"error": {
"code": "BITRIX_ERROR",
"message": "PACK_NOT_FOUND",
"b24Code": "PACK_NOT_FOUND"
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| HTTP400 | CodeMISSING_PARAMS |
DescriptionThe name field is missing |
| HTTP400 | CodeINVALID_PARAMS |
Descriptionname is empty, not a string or longer than 255 characters, the body contains a field other than name, the body is not a JSON object, packId or packType is invalid, another query parameter was passed or a parameter was repeated. packType goes in the query parameters, not in the body |
| 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, EMPTY_PACK_NAME — Bitrix24 considered the name empty |
| 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, sopackTypeis required. - Leading and trailing spaces are trimmed from the name. The name
0counts as empty — the response is422witherror.b24Codeset toEMPTY_PACK_NAME.