For AI agents: markdown of this page — /docs-content-en/feed.md documentation index — /llms.txt
Feed
Publishing posts to the Bitrix24 Feed via the API: posts addressed to departments and employees, granting access to additional recipients, and comments.
Scope: log | Base URL: https://vibecode.bitrix24.com/v1 | Authorization: X-Api-Key
Quick start | Full example | Endpoint reference | Error codes
Documentation sections
- Posts — create, list, update, delete posts and add recipients
- Comments — add and delete comments on posts
Quick start
1. Publish a post
curl -X POST https://vibecode.bitrix24.com/v1/posts \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "Platform update",
"text": "[b]A new version is out[/b] — batch request support.",
"recipients": ["UA"]
}'
The response is the identifier of the created post and the recipients it was opened to:
{
"success": true,
"data": {
"id": 512,
"recipients": ["UA"]
}
}
2. Comment on a post
curl -X POST https://vibecode.bitrix24.com/v1/posts/512/comments \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "text": "Great news!" }'
The response is the comment identifier:
{ "success": true, "data": 1024 }
3. Open the post to additional recipients
curl -X POST https://vibecode.bitrix24.com/v1/posts/512/share \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "recipients": ["DR3", "U5"] }'
{ "success": true, "data": true }
Full example
An automated report to the Feed: publishing a post, a comment from the integration, and granting access to management. The scenario uses only the log scope.
const VIBE_KEY = process.env.VIBE_KEY
const BASE = 'https://vibecode.bitrix24.com/v1'
async function api(method, path, body = null) {
const opts = { method, headers: { 'X-Api-Key': VIBE_KEY } }
if (body) {
opts.headers['Content-Type'] = 'application/json'
opts.body = JSON.stringify(body)
}
const res = await fetch(`${BASE}${path}`, opts)
return res.status === 204 ? null : res.json()
}
// 1. Publish the daily report, addressing a department with sub-departments
const created = await api('POST', '/posts', {
title: 'Daily report',
text: [
'[b]Day summary[/b]',
'',
'Closed tasks: 48',
'New requests: 12'
].join('\n'),
recipients: ['DR1']
})
const postId = created.data.id
console.log('Post published, ID:', postId)
// 2. Add a comment from the integration
const comment = await api('POST', `/posts/${postId}/comments`, {
text: 'The report was generated automatically by the Vibecode integration.'
})
console.log('Comment added, ID:', comment.data)
// 3. Open the report to management
await api('POST', `/posts/${postId}/share`, { recipients: ['U1'] })
// 4. Check that the post is in the Feed
const list = await api('GET', '/posts?limit=5')
console.log('Total posts:', list.meta.total)
Endpoint reference
| Method | Path | Bitrix24 method | Description |
|---|---|---|---|
| POST | /v1/posts | log.blogpost.add | Create a post |
| GET | /v1/posts | log.blogpost.get | List posts |
| PATCH | /v1/posts/:id | log.blogpost.update | Update a post |
| DELETE | /v1/posts/:id | log.blogpost.delete | Delete a post |
| POST | /v1/posts/:id/share | log.blogpost.share | Add recipients |
| POST | /v1/posts/:id/comments | log.blogcomment.add | Add a comment |
| DELETE | /v1/posts/:id/comments/:commentId | log.blogcomment.delete | Delete a comment |
Error codes
Feed errors
| Code | HTTP | Description |
|---|---|---|
SCOPE_DENIED |
403 | The API key lacks the log scope |
TOKEN_MISSING |
401 | The API key has no access tokens configured |
MISSING_PARAMS |
400 | Required parameters are missing (text for a post or comment, recipients for adding recipients) |
INVALID_LIMIT |
400 | limit is out of the 1..50 range |
INVALID_OFFSET |
400 | offset is negative |
INVALID_POST_ID |
400 | The post id is not a positive integer |
POST_NOT_FOUND |
404 | The post was not found or is not accessible with this key |
POST_NOT_FOUND_OR_INVALID_RECIPIENTS |
404 | Adding recipients rejected: the post does not exist or one of the recipients is invalid |
INVALID_RECIPIENTS |
400 | Invalid recipients format |
BITRIX_ACCESS_DENIED |
403 | Insufficient permissions on the post |
COMMENT_NOT_FOUND |
404 | The comment was not found |
INVALID_COMMENT_ID |
400 | commentId is invalid |
COMMENT_ACCESS_DENIED |
403 | Insufficient permissions on the comment |
DUPLICATE_COMMENT |
409 | A repeated comment with the same content |
System errors
| Code | HTTP | Description |
|---|---|---|
MISSING_API_KEY |
401 | The X-Api-Key header is missing |
INVALID_API_KEY |
401 | Invalid API key |
RATE_LIMITED |
429 | Request rate limit exceeded |
BITRIX_ERROR |
422 | Bitrix24 returned an error |
BITRIX_UNAVAILABLE |
502 | The Bitrix24 portal is unavailable |
INTERNAL_ERROR |
500 | Internal server error |
The full list of common API errors — Errors.