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
Parameterid Typenumber Requiredyes DescriptionPost ID (path parameter). List: GET /v1/posts

Examples

curl — personal key

Terminal
curl -X DELETE https://vibecode.bitrix24.com/v1/posts/303 \
  -H "X-Api-Key: YOUR_API_KEY"

curl — OAuth application

Terminal
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

javascript
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

javascript
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:

JSON
{
  "success": false,
  "error": {
    "code": "POST_NOT_FOUND",
    "message": "Post 999999999 not found or not accessible with this key."
  }
}

Errors

HTTP Code Description
HTTP404 CodePOST_NOT_FOUND DescriptionPost with the given id not found or not accessible with this key
HTTP400 CodeINVALID_POST_ID DescriptionInvalid post id
HTTP403 CodeBITRIX_ACCESS_DENIED DescriptionNo permission to delete this post. message is the fixed text Bitrix24 denied access to this post., and the cause and what to do are in the cause, fix and hint fields. Details — Authorization, keys and permissions
HTTP403 CodeSCOPE_DENIED DescriptionThe API key lacks the log scope
HTTP401 CodeTOKEN_MISSING DescriptionThe API key has no access tokens configured

The full list of common API errors — Errors.

See also