---
updatedAt: 2026-09-28T15:53:42.000Z
agentTools:
  projectIndex: https://developers.kommo.com/llms.txt
---

# Adding notifications

To publish notifications, a public API is implemented, accessed through calling the corresponding methods of the [global Kommo object APP](https://developers.kommo.com/docs/environment-variables). When you call the method, you need to transfer an object with a description of the notification.

# Information notification

The method is designed to trigger a pop-up notification, which will only appear in the interface and will not be duplicated on other delivery channels.

## Method name

` show_message()`

| Parameter | Required? | Description                                                                 |
| :-------- | :-------- | :-------------------------------------------------------------------------- |
| header    | ✅         | Post Title                                                                  |
| text      | ✅         | Notification text                                                           |
| date      | ❌         | Date in Unix Timestamp format                                               |
| icon      | ❌         | URL to an icon file. If not passed, then the default icon of robot is used. |

**Example:**

```javascript
var message_params = {
  header: "Warning",
  text: "Connection established",
  date: 1714566795,
  icon: "https://www.example.com/images/telephone.png"
};
APP.notifications.show_message(message_params);
```

**Result**:

<Image src="https://files.readme.io/62d3fd3-Screenshot_2024-06-28_at_19.24.16.png" align="center" width="400px" border={true} />

# Error notification

The method will show an error notification in the account interface, and the message will not be sent through other delivery channels.

## Method name

`show_message_error()`

## Parameters

| Parameter | Required? | Description                                                             |
| :-------- | :-------- | :---------------------------------------------------------------------- |
| header    | ✅         | Post Title                                                              |
| text      | ✅         | Notification text                                                       |
| date      | ❌         | Date in Unix Timestamp format                                           |
| link      | ❌         | The URL where a user will be redirected if they click the notification. |

## Example

```javascript
var error_params = {
header: "Warning",
text: "Connection to the server is lost"
};
APP.notifications.show_message_error(error_params);
```

## Result

<Image src="https://files.readme.io/8b29fa0-Screenshot_2024-06-28_at_19.35.17.png" align="center" width="400px" border={true} />

# Call notification

The method enables you to show a pop-up notification for a call or an error. If you utilize this feature, it will only appear in the interface and will not be sent through other channels.

## Method name

`show_notification()`

## Parameters

| Parameter   | Required? | Description                                    |
| :---------- | :-------- | :--------------------------------------------- |
| text        | ✅         | Array with a description of the message        |
| text/header | ✅         | Notification Header                            |
| text/text   | ✅         | Text message                                   |
| date        | ❌         | Date in Unix Timestamp format                  |
| type        | ✅         | Type of pop-up notification(`call` or `error`) |

## Example

```javascript
var notification = {
  text: {
    header: "Outgoing call",
    text: "Dialing the number +19872345678"
  },
  type: "call"
};
APP.notifications.show_notification(notification);
```

## Result

<Image src="https://files.readme.io/56f7ffc-Screenshot_2024-06-28_at_19.30.32.png" align="center" width="400px" border={true} />

## Example

```javascript
var notification = {
  text: {
    header: "Error",
    text: "Error working with the widget"
  },
  type: "error"
};
APP.notifications.show_notification(notification);
```

## Result

<Image src="https://files.readme.io/95aaa0c-Screenshot_2024-06-28_at_19.50.41.png" align="center" width="400px" border={true} />

# Send error notification

The method allows you to add an error notification to the Notification Center.&#x20;

<Callout icon="📘" theme="info">
  The message will be sent through all active <Anchor target="_blank" href="https://support.kommo.com/docs/edit-profile-information#notification-settings">notification channels</Anchor> in the account.
</Callout>

## Method name

`add_error()`

## Parameters

| Parameter | Required? | Description                                                             |
| :-------- | :-------- | :---------------------------------------------------------------------- |
| header    | ❌         | Post Title                                                              |
| text      | ✅         | Notification text                                                       |
| date      | ❌         | Date in Unix Timestamp format                                           |
| link      | ❌         | The URL where a user will be redirected if they click the notification. |

## Example

```javascript
var error_params = {
    header: "Error",
    text: "Failed to set the task! Contact not found!",
    date: 1714566795,
    link: "/contacts/list/?term=4951234567"
};
APP.notifications.add_error(error_params);
```

## Result

<Image src="https://files.readme.io/eb248d9-Screenshot_2024-06-28_at_19.55.34.png" align="center" width="400px" border={true} />

An email notification about the error:

<Image src="https://files.readme.io/123a916-Group_881234041.png" align="center" width="600px" />

Notification that has come to the mobile application:

<Image src="https://pcfcdn.kommo.com/static/images/pages/developers/notification_api/notification__10.png" align="center" width="400px" border={true} />

# Incoming call notification

The Notification Center API allows you to display an incoming call message. The notification will be transmitted over all active delivery channels.

## Method name

`add_call()`

## Parameters

| Parameter    | Required? | Description                                                                                                                                                                                            |
| :----------- | :-------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| text         | ✅         | The text message that will be displayed in the notification.                                                                                                                                           |
| date         | ❌         | Date in Unix Timestamp format                                                                                                                                                                          |
| from         | ❌         | The line specifies the initiator of the incoming call. It displays the phone number if it is not found in your contact list, and the contact name if the call came from a number in your contact list. |
| to           | ❌         | Manager name or extension number of the subscriber who received the incoming call.                                                                                                                     |
| element      | ❌         | An object describing the target entity for the transition when clicking the pop-up call notification.                                                                                                  |
| element.id   | ✅         | Entity ID                                                                                                                                                                                              |
| element.type | ✅         | Entity type: contact, lead or company                                                                                                                                                                  |
| link         | ❌         | A link to a recording of the call                                                                                                                                                                      |

## Parameter

```javascript
var call_params = {
  text: "Call from +1 (415) 523-7743",
  date: 1714566795,
  from: "Jeremy Watts",
  to: "Jason Nash",
  element: { id: 18221265, type: "contact" },
  duration: 250,
  link: 'https://example.com/dialog.mp3'
};
APP.notifications.add_call(call_params);
```

## Result

<Image src="https://files.readme.io/565f995-Screenshot_2024-06-28_at_19.58.00.png" align="center" width="400px" border={true} />