---
sidebar_position: 2
description: Update post and other functions to work with Bitrix24 in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, Bitrix24]
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Update post
 Change post data



`Function UpdatePost(Val URL, Val PostID, Val Text, Val Visibility = "UA", Val Files = "", Val Title = "", Val Token = "") Export`

  | Parameter | CLI option | Type | Required | Description |
  |-|-|-|-|-|
  | URL | --url | String | &#x2714; | URL of webhook or a Bitrix24 domain, when token used |
  | PostID | --postid | String, Number | &#x2714; | Post ID |
  | Text | --text | String | &#x2714; | Text of post |
  | Visibility | --vision | String | &#x2716; | Array or 1 recipient: UA all, SGn w. group, Un user, DRn department, Gn group |
  | Files | --files | Map Of KeyAndValue | &#x2716; | Key > file name, value > path or binary data |
  | Title | --title | String | &#x2716; | Post title |
  | Token | --token | String | &#x2716; | Access token, when app auth method used |

  
  Returns:  Map Of KeyAndValue - serialized JSON of answer from Bitrix24 API

:::tip
Method at API documentation: [log.blogpost.update](https://dev.1c-bitrix.ru/rest_help/log/log_blogpost_update.php)
:::
<br/>


```bsl title="1C:Enterprise/OneScript code example"
    Text   = "New post text";
    Title  = "New post title";
    Image1 = "https://hut.openintegrations.dev/test_data/picture.jpg"; // URL, Path or Binary Data
    PostID = "3452";

    Files = New Map;
    Files.Insert("1.png", Image1);

    URL = "https://b24-ar17wx.bitrix24.by/rest/1/h0m...";

    Result = OPI_Bitrix24.UpdatePost(URL, PostID, Text, , Files, Title);

    URL    = "b24-ar17wx.bitrix24.by";
    Token  = "6ad03969006e9f06006b12e400000001000...";
    PostID = "3450";

    Result = OPI_Bitrix24.UpdatePost(URL, PostID, Text, , Files, Title, Token);
```
 

 <Tabs>
  
    <TabItem value="bash" label="Bash" default>
        ```bash
            # JSON data can also be passed as a path to a .json file
            
            oint bitrix24 UpdatePost \
             --url "b24-ar17wx.bitrix24.by" \
             --postid 3454 \
             --text "New post text" \
             --files "{'1.png':'https://hut.openintegrations.dev/test_data/picture.jpg'}" \
             --title "New post title" \
             --token "***"
        ```
    </TabItem>
  
    <TabItem value="bat" label="CMD/Bat" default>
        ```batch
            :: JSON data can also be passed as a path to a .json file
            
            oint bitrix24 UpdatePost ^
             --url "b24-ar17wx.bitrix24.by" ^
             --postid 3454 ^
             --text "New post text" ^
             --files "{'1.png':'https://hut.openintegrations.dev/test_data/picture.jpg'}" ^
             --title "New post title" ^
             --token "***"
        ```
    </TabItem>
</Tabs>


```json title="Result"
{
 "result": 3454,
 "time": {
  "start": 1765396096,
  "finish": 1765396096.71185,
  "duration": 0.711853981018066,
  "processing": 0,
  "date_start": "2025-12-10T19:48:16+00:00",
  "date_finish": "2025-12-10T19:48:16+00:00",
  "operating_reset_at": 1765396696,
  "operating": 0.398703098297119
 }
}
```
