لوكلاء AI: ملف markdown لهذه الصفحة — /docs-content-en/feed.md فهرس التوثيق — /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 |
|---|---|---|---|
| MethodPOST | Path/v1/posts | Bitrix24 methodlog.blogpost.add | DescriptionCreate a post |
| MethodGET | Path/v1/posts | Bitrix24 methodlog.blogpost.get | DescriptionList posts |
| MethodPATCH | Path/v1/posts/:id | Bitrix24 methodlog.blogpost.update | DescriptionUpdate a post |
| MethodDELETE | Path/v1/posts/:id | Bitrix24 methodlog.blogpost.delete | DescriptionDelete a post |
| MethodPOST | Path/v1/posts/:id/share | Bitrix24 methodlog.blogpost.share | DescriptionAdd recipients |
| MethodPOST | Path/v1/posts/:id/comments | Bitrix24 methodlog.blogcomment.add | DescriptionAdd a comment |
| MethodDELETE | Path/v1/posts/:id/comments/:commentId | Bitrix24 methodlog.blogcomment.delete | DescriptionDelete a comment |
Error codes
Feed errors
| Code | HTTP | Description |
|---|---|---|
CodeSCOPE_DENIED |
HTTP403 | DescriptionThe API key lacks the log scope |
CodeTOKEN_MISSING |
HTTP401 | DescriptionThe API key has no access tokens configured |
CodeMISSING_PARAMS |
HTTP400 | DescriptionRequired parameters are missing (text for a post or comment, recipients for adding recipients) |
CodeINVALID_LIMIT |
HTTP400 | Descriptionlimit is out of the 1..50 range |
CodeINVALID_OFFSET |
HTTP400 | Descriptionoffset is negative |
CodeINVALID_POST_ID |
HTTP400 | DescriptionThe post id is not a positive integer |
CodePOST_NOT_FOUND |
HTTP404 | DescriptionThe post was not found or is not accessible with this key |
CodePOST_NOT_FOUND_OR_INVALID_RECIPIENTS |
HTTP404 | DescriptionAdding recipients rejected: the post does not exist or one of the recipients is invalid |
CodeINVALID_RECIPIENTS |
HTTP400 | DescriptionInvalid recipients format |
CodeBITRIX_ACCESS_DENIED |
HTTP403 | DescriptionInsufficient permissions on the post |
CodeCOMMENT_NOT_FOUND |
HTTP404 | DescriptionThe comment was not found |
CodeINVALID_COMMENT_ID |
HTTP400 | DescriptioncommentId is invalid |
CodeCOMMENT_ACCESS_DENIED |
HTTP403 | DescriptionInsufficient permissions on the comment |
CodeDUPLICATE_COMMENT |
HTTP409 | DescriptionA repeated comment with the same content |
System errors
| Code | HTTP | Description |
|---|---|---|
CodeMISSING_API_KEY |
HTTP401 | DescriptionThe X-Api-Key header is missing |
CodeINVALID_API_KEY |
HTTP401 | DescriptionThe key is not recognized — no such key exists on the platform |
CodeRATE_LIMITED |
HTTP429 | DescriptionRequest rate limit exceeded |
CodeBITRIX_ERROR |
HTTP422 | DescriptionBitrix24 returned an error |
CodeBITRIX_UNAVAILABLE |
HTTP502 | DescriptionThe Bitrix24 portal is unavailable |
CodeINTERNAL_ERROR |
HTTP500 | DescriptionInternal server error |
The full list of common API errors — Errors.