Saving a Comment in the Call Card BackgroundCallCard::addCommentButtonClick
If you are developing integrations for Bitrix24 using AI tools (Codex, Claude Code, Cursor), connect to the MCP server so that the assistant can utilize the official REST documentation.
Scope:
telephonyWho can subscribe: any user
The event BackgroundCallCard::addCommentButtonClick is triggered when a comment is saved in the call card.
The event operates within the application context in the placement PAGE_BACKGROUND_WORKER.
What the Handler Receives
Data is passed to the callback BX24.placement.bindEvent
callback("Operator's comment");
Event Handler Parameters
Required parameters are marked with *
|
Parameter |
Description |
|
eventData* |
The text of the saved comment |
Event Subscription Parameters
Required parameters are marked with *
|
Name |
Description |
|
PLACEMENT* |
The name of the interface event. For this event — |
|
HANDLER* |
The URL of the event handler for calling |
Code Examples
How to Use Examples in Documentation
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"PLACEMENT":"BackgroundCallCard::addCommentButtonClick","HANDLER":"**your_handler_url_here**"}' \
"https://**put_your_bitrix24_address**/rest/placement.bindEvent?auth=**put_access_token_here**"
BX24.placement.bindEvent('BackgroundCallCard::addCommentButtonClick', function (eventData) {
console.log(eventData);
});
try {
$response = $b24Service
->core
->call(
'placement.bindEvent',
[
'PLACEMENT' => 'BackgroundCallCard::addCommentButtonClick',
'HANDLER' => '**your_handler_url_here**'
]
);
$result = $response
->getResponseData()
->getResult();
echo 'Success: ' . print_r($result, true);
processData($result);
} catch (Throwable $e) {
error_log($e->getMessage());
echo 'Error: ' . $e->getMessage();
}
BX24.callMethod(
'placement.bindEvent',
{
PLACEMENT: 'BackgroundCallCard::addCommentButtonClick',
HANDLER: '**your_handler_url_here**'
},
function(result)
{
if (result.error())
{
console.error(result.error(), result.error_description());
}
else
{
console.log(result.data());
}
}
);
require_once('crest.php');
$result = CRest::call(
'placement.bindEvent',
[
'PLACEMENT' => 'BackgroundCallCard::addCommentButtonClick',
'HANDLER' => '**your_handler_url_here**'
]
);
echo '<PRE>';
print_r($result);
echo '</PRE>';