لوكلاء AI: ملف markdown لهذه الصفحة — /docs-content-en/feed-comments/delete.md فهرس التوثيق — /llms.txt
مقالات التوثيق متاحة حاليًا باللغة الإنجليزية فقط.
Delete a feed comment
DELETE /v1/feed-comments/:id
Deletes a comment from the Feed by its ID in the Feed. A deleted comment cannot be restored via the API.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
Parameterid (path) |
Typenumber | Requiredyes | DescriptionComment ID in the feed — the data.comments[].id field. List: GET /v1/posts/comments. The commentId field from the same response cannot be used here |
Examples
curl — personal key
curl -X DELETE https://vibecode.bitrix24.com/v1/feed-comments/6195 \
-H "X-Api-Key: YOUR_API_KEY"
curl — OAuth application
curl -X DELETE https://vibecode.bitrix24.com/v1/feed-comments/6195 \
-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/feed-comments/6195', {
method: 'DELETE',
headers: { 'X-Api-Key': 'YOUR_API_KEY' },
})
const result = await res.json()
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/feed-comments/6195', {
method: 'DELETE',
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
},
})
const result = await res.json()
Response fields
| Field | Type | Description |
|---|---|---|
Fieldsuccess |
Typeboolean | Descriptiontrue on successful deletion |
Fielddata.deleted |
Typeboolean | DescriptionAlways true: the comment is deleted from the feed |
Response example
{
"success": true,
"data": {
"deleted": true
}
}
Error response example
404 — the feed has no comment with this ID, or it has already been deleted:
{
"success": false,
"error": {
"code": "ENTITY_NOT_FOUND",
"message": "Feed comment not found"
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| HTTP400 | CodeINVALID_PARAMS |
Descriptionid in the path is not a positive integer |
| HTTP404 | CodeENTITY_NOT_FOUND |
DescriptionThe feed has no comment with this id, including after a repeated deletion |
| HTTP403 | CodeBITRIX_ACCESS_DENIED |
DescriptionThe key's user has no permission to delete this comment |
| HTTP422 | CodeBITRIX_ERROR |
DescriptionBitrix24 did not confirm the deletion or rejected the request |
| HTTP401 | CodeMISSING_API_KEY |
DescriptionThe X-Api-Key header is missing |
| HTTP401 | CodeINVALID_API_KEY |
DescriptionThe key is not found or has been revoked |
| HTTP401 | CodeTOKEN_MISSING |
DescriptionThe key has no portal tokens. An OAuth application key requires the Authorization: Bearer header |
| HTTP403 | CodeSCOPE_DENIED |
DescriptionThe key does not have the log scope |
| HTTP403 | CodeWRITE_BLOCKED_READONLY_KEY |
DescriptionThe key works in read-only mode |
| HTTP429 | CodeRATE_LIMITED |
DescriptionThe request rate to Bitrix24 was exceeded. Retry after the time in the Retry-After header |
| HTTP502 | CodeBITRIX_UNAVAILABLE |
DescriptionBitrix24 is unavailable |
| HTTP503 | CodeBITRIX_TIMEOUT |
DescriptionBitrix24 accepted the request but did not respond in time. Before retrying, check whether the comment is still in GET /v1/posts/comments |
Full list of common API errors — Errors.
Known specifics
- The post comment remains. Deletion removes the comment from the feed, but the post comment with the same text is not deleted, and the post's
numCommentscounter in the post list does not decrease. To delete the post comment, call DELETE /v1/posts/:id/comments/:commentId with thepostIdandcommentIdfields from the GET /v1/posts/comments response.