> ## Documentation Index
> Fetch the complete documentation index at: https://api-docs.bienport.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Backend → Mobile App Notifications

> AMQP notifications published by Backend for Mobile App clients; consumed via app-specific topics.

<Note>
  This is a public API!
</Note>

<Info>
  <strong>Transport:</strong> AMQP (pub/sub via broker).<br />
  <strong>Subscribed Topic (all events):</strong> <code>secom/mobileapp/\<app-unique-id></code><br />
  <strong>Envelope:</strong> Each message is a JSON object with <code>messageType = "notification"</code> and an event-specific <code>notificationType</code>.
</Info>

## Message Envelope (Common)

```json theme={null}
{
	"messageType": "notification",
	"appId": "<app-unique-id>",
	"correlationId": "<optional-correlation-id>",
	"notificationType": "<event-type>",
	"reason": "<localized human-readable text>",
	"parameters": { /* event-specific fields */ }
}
```

<Note>
  Unless otherwise stated, notifications are delivered to <code>secom/mobileapp/\<app-unique-id></code>.
</Note>

# 1) Arm / ArmStay / ArmSleep Notification

> Emitted when the panel is armed (including Stay/Indoor and Sleep/Night modes).

### Success Payload

```json theme={null}
{
  "messageType": "notification",
  "appId": "app-unique-id",
  "correlationId": "1",
  "notificationType": "armNotification",
  "reason": "Partition 1 Armed",
  "parameters": {
    "partition": 1,
    "resourceId": 169,
    "brand": "EBS",
    "model": "CPX-230NWB",
    "networkId": "654527"
  }}
```

<Note>
  The <code>reason</code> text may reflect the specific arming mode and partition number.
</Note>

***

# 2) Disarm Notification

> Emitted when the panel is disarmed.

### Success Payload

```json theme={null}
{
  "messageType": "notification",
  "appId": "app-unique-id",
  "correlationId": "1",
  "notificationType": "disarmNotification",
  "reason": "Partition 1 Disarmed", 
  "parameters": {
    "partition": 1,
    "resourceId": 169,
    "brand": "EBS",
    "model": "CPX-230NWB",
    "networkId": "654527"
  }
}
```

***

# 3) Zone Alarm Notification

> Emitted when a zone alarm is triggered.

### Success Payload

```json theme={null}
{
  "messageType": "notification",
  "appId": "",
  "notificationType": "zoneAlarmNotification",
  "reason": "Zone 12 Open",
  "parameters": {
    "resourceId": 1346,
    "model": "CPX-300W",
    "networkId": "1065885"
  }
}
```

***

# 4) Keypad or Keyfob Alarm Notification

> Emitted when a keypad or keyfob alarm is triggered.

### Success Payload

```json theme={null}
{
  "messageType": "notification",
  "appId": "replace-with-your-app’s-unique-id",
  "notificationType": "keypadKeyfobAlarmNotification",
  "reason": "Silent Alarm with Keyfob",
  "parameters": {
    "resourceId": 1346,
    "model": "CPX-300W",
    "networkId": "1065885"
  }
}
```

***

# 5) Panic Alarm Notification

> Emitted when a mobile panic alarm is triggered.

### Success Payload

```json theme={null}
{
  "messageType": "notification",
  "appId": "replace-with-your-app’s-unique-id",
  "notificationType": "panicAlarmNotification",
  "reason": "Mobile Panic Alarm",
  "parameters": {
    "resourceId": 175,
    "model": "CPX-300W",
    "networkId": "1065885"
  }
}
```

***

# 6) Ambulance (Medical) Alarm Notification

> Emitted when a mobile medical/ambulance alarm is triggered.

### Success Payload

```json theme={null}
{
  "messageType": "notification",
  "appId": "replace-with-your-app’s-unique-id",
  "notificationType": "ambulanceAlarmNotification",
  "reason": "Mobile Medical Alarm",
  "parameters": {
    "resourceId": 175,
    "model": "CPX-300W",
    "networkId": "1065885"
  }
}
```

***

# 7) Resource Disconnect Notification

> Emitted when the alarm panel (resource) connection is lost.

### Success Payload

```json theme={null}
{
  "messageType": "notification",
  "appId": "replace-with-your-app’s-unique-id",
  "notificationType": "resourceDisconnectNotification",
  "reason": "Device Disconnected",
  "parameters": {
    "resourceId": 1346,
    "model": "CPX-300W",
    "networkId": "1065885"
  }
}
```

***

# 8) Resource Connected Notification

> Emitted when the alarm panel (resource) connection is established.

### Success Payload

```json theme={null}
{
  "messageType": "notification",
  "appId": "app-unique-id",
  "correlationId": "1",
  "notificationType": "connectionInitiated",
  "reason": "Panel connected by request",
  "parameters": {
      "resourceId": 169,
      "brand": "DSC",
      "model": "NEO-2032",
      "networkId": "123456",
      "msisdn": "905wwxxxyyzz"
   }
}
```

***

# 9) Panel Connection Initiated (by Request)

> Emitted when the panel starts a command-channel connection by request (DSC panels only).

### Success Payload

```json theme={null}
{
  "messageType": "notification",
  "appId": "app-unique-id",
  "correlationId": "1",
  "notificationType": "connectionInitiated",
  "reason": "Panel connected by request",
  "parameters": {
      "resourceId": 169,
      "brand": "DSC",
      "model": "NEO-2032",
      "networkId": "123456",
      "msisdn": "905wwxxxyyzz"
   }
}
```

***

# 10) Panel Connection Not Initiated (by Request)

> Emitted when the panel could not initiate the command-channel connection by request (DSC panels only).

### Success Payload

```json theme={null}
{
  "messageType": "notification",
  "appId": "app-unique-id",
  "correlationId": "1",
  "notificationType": "connectionNotInitiated",
  "reason": "Panel is not able to connect by request",
  "parameters": {
      "resourceId": 169,
      "brand": "DSC",
      "model": "NEO-2032",
      "networkId": "123456",
      "msisdn": "905wwxxxyyzz"
   }
}
```

<Tip>
  <code>reason</code> is localized in messages regarding to locale settings of user. Treat unknown properties under <code>parameters</code> as forward‑compatible extensions.
</Tip>
