For AI agents: markdown of this page — /docs-content-en/chats/messages/links-delete.md documentation index — /llms.txt
Remove a link from the list
DELETE /v1/chats/links/:linkId
Removes a link from the chat's link list — the Links tab of the side panel. The message that carries the link stays unchanged.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ParameterlinkId (path) |
Typenumber | Requiredyes | DescriptionLink ID, a positive integer — the id field from the chat's link list |
No body and no query parameters are accepted: any body field or query parameter is rejected with 400 INVALID_PARAMS.
Examples
curl — personal key
curl -X DELETE "https://vibecode.bitrix24.com/v1/chats/links/12" \
-H "X-Api-Key: YOUR_API_KEY"
curl — OAuth application
curl -X DELETE "https://vibecode.bitrix24.com/v1/chats/links/12" \
-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/links/12', {
method: 'DELETE',
headers: {
'X-Api-Key': 'YOUR_API_KEY',
},
})
const { success } = await res.json()
console.log('Removed:', success)
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/chats/links/12', {
method: 'DELETE',
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
},
})
const { success } = await res.json()
console.log('Removed:', success)
Response fields
| Field | Type | Description |
|---|---|---|
Fieldsuccess |
Typeboolean | DescriptionAlways true on success |
Fielddata |
Typeboolean | Descriptiontrue — the link is removed from the list |
Response example
{
"success": true,
"data": true
}
Error response example
422 — there is no link with this ID:
{
"success": false,
"error": {
"code": "BITRIX_ERROR",
"message": "Url not found",
"b24Code": "URL_NOT_FOUND"
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| HTTP400 | CodeINVALID_PARAMS |
DescriptionlinkId is not a positive integer, or a body field or query parameter was passed. Checked before any call to Bitrix24 |
| HTTP422 | CodeBITRIX_ERROR |
Descriptionerror.b24Code is URL_NOT_FOUND — there is no link with this ID |
| HTTP422 | CodeBITRIX_ERROR |
Descriptionerror.b24Code is URL_ACCESS_ERROR — another employee sent the link, and the current employee is not a Bitrix24 account administrator |
| HTTP422 | CodeBITRIX_ERROR |
Descriptionerror.b24Code is ACCESS_ERROR — the employee has no access to the link's chat |
| HTTP404 | CodeENTITY_NOT_FOUND |
DescriptionBitrix24 returned a generic "not found" error; the code is in error.b24Code |
| HTTP403 | CodeSCOPE_DENIED |
DescriptionThe API key does not have the im scope |
| HTTP403 | CodeWRITE_BLOCKED_READONLY_KEY |
DescriptionA read-only key cannot remove links — see access rights |
| HTTP401 | CodeTOKEN_MISSING |
DescriptionThe API key has no Bitrix24 tokens configured |
Full list of common API errors — Errors.