For AI agents: markdown of this page — /docs-content-en/feed/posts/delete.md documentation index — /llms.txt
Delete a post
DELETE /v1/posts/:id
Deletes a post from the Bitrix24 Feed. A deleted post cannot be restored via the API — create a new one if needed.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
number | yes | Post ID (path parameter). List: GET /v1/posts |
Examples
curl — personal key
curl -X DELETE https://vibecode.bitrix24.com/v1/posts/303 \
-H "X-Api-Key: YOUR_API_KEY"
curl — OAuth application
curl -X DELETE https://vibecode.bitrix24.com/v1/posts/303 \
-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/posts/303', {
method: 'DELETE',
headers: { 'X-Api-Key': 'YOUR_API_KEY' },
})
if (res.status === 204) {
console.log('Post deleted')
}
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/posts/303', {
method: 'DELETE',
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
},
})
if (res.status === 204) {
console.log('Post deleted')
}
Response
On successful deletion, HTTP status 204 No Content is returned with an empty body. Success is indicated by the response code, not the body.
Response example
HTTP/1.1 204 No Content
Error response example
404 — post not found:
{
"success": false,
"error": {
"code": "POST_NOT_FOUND",
"message": "Post 999999999 not found or not accessible with this key."
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| 404 | POST_NOT_FOUND |
Post with the given id not found or not accessible with this key |
| 400 | INVALID_POST_ID |
Invalid post id |
| 403 | BITRIX_ACCESS_DENIED |
No permission to delete this post |
| 403 | SCOPE_DENIED |
The API key lacks the log scope |
| 401 | TOKEN_MISSING |
The API key has no access tokens configured |
The full list of common API errors — Errors.