For AI agents: markdown of this page — /docs-content-en/chats/management/hide.md documentation index — /llms.txt
Hide a chat
POST /v1/chats/:dialogId/hide
Removes a dialog from the current user's list, preserving messages and chat membership. A new message may return the dialog to the list.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ParameterdialogId (path) |
Typestring | Requiredyes | DescriptionThe other user's numeric ID for direct messaging, chatN for a group chat or me for the current user. Source — recent dialogs |
No query parameters are accepted. Omit the request body or send {}. Additional body fields and non-object request bodies are rejected.
Examples
curl — personal key
curl -X POST https://vibecode.bitrix24.com/v1/chats/chat456/hide \
-H "X-Api-Key: YOUR_API_KEY"
curl — OAuth application
curl -X POST https://vibecode.bitrix24.com/v1/chats/chat456/hide \
-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/chat456/hide', {
method: 'POST',
headers: { 'X-Api-Key': 'YOUR_API_KEY' },
})
const body = await res.json()
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/chats/chat456/hide', {
method: 'POST',
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
},
})
const body = await res.json()
Response fields
| Field | Type | Description |
|---|---|---|
Fieldsuccess |
Typeboolean | Descriptiontrue on success |
Fielddata |
Typeboolean | Descriptiontrue — the dialog is hidden |
Response example
{"success": true, "data": true}
Error response example
400 — the unknown body field folderId was passed:
{"success": false, "error": {"code": "INVALID_PARAMS", "message": "Body field `folderId` is not accepted by POST /v1/chats/:dialogId/hide. It takes no body fields."}}
Errors
| HTTP | Code | Description |
|---|---|---|
| HTTP400 | CodeINVALID_PARAMS |
DescriptionUnsupported query parameter, body field or request body type |
| HTTP403 | CodeSCOPE_DENIED |
DescriptionThe key does not have the im scope |
| HTTP403 | CodeWRITE_BLOCKED_READONLY_KEY |
DescriptionThe key permits reads only |
| HTTP403 | CodeBITRIX_ACCESS_DENIED |
DescriptionBitrix24 refused access |
| HTTP422 | CodeBITRIX_ERROR |
DescriptionBitrix24 rejected the action. Its code is preserved in error.b24Code |
| HTTP401 | CodeTOKEN_MISSING |
DescriptionNo Bitrix24 tokens are configured for the key |
| HTTP502 | CodeME_ALIAS_RESOLUTION_FAILED |
DescriptionThe user could not be resolved for me |
For common API errors, see Errors.
Known specifics
When the outcome of a network request is unknown, the platform does not retry hiding automatically.