Get started
  • English
  • 简体中文
Official Site
Get started
  • English
  • 简体中文
Official Site
  • Get started
  • Concepts
  • Guides
  • Device capabilities & events
    • Browse by device type
    • Device capabilities
    • Events overview
    • Permission codes
    • Capability error codes
    • Alarm and capability messages
      • device.message.list (Receive alarm messages)
      • device.message.list (Query alarm history)
      • device.message.search (Search messages by type)
      • device.message.detail (Query one alarm message)
      • device.message.delete (Delete alarm messages)
      • Event types
    • Capability FAQ
    • Legacy ability and push types
  • API reference
  • SDK and tools
  • Solutions
  • Platform and support
On this page
Real-time push
Active query

device.message.list (Receive alarm messages)

device.message.list: Receive alarm messages

This page covers real-time push. For history list, search, detail, and delete, see Query alarm history, Search messages by type, Query one alarm message, and Delete alarm messages. If motion detection is off or the device is disarmed, you may see no data—follow Capability usage · first end-to-end run to enable motion detection.

MethodAPIType name
Real-time pushSet callbackAfter subscribing to capabilityEvent, msgType is e.g. detection.motion.detected
Active querydevice.message.list / search / detail / deleteReturned msgType matches push

Real-time push

  1. Configure callback URL with setMessageCallback; query the current config with getMessageCallback.
  2. Add capabilityEvent to callbackFlag (comma-separated with alarm, deviceStatus, etc.).
  3. Callback HTTP body is the report payload below—the same shape as msgBody where pull is not offered overseas. Return an HTTP 2xx success response (200 is typical); status codes 200–399 count as success. Signing and health checks: Push configuration and Receive device messages.

If callbackFlag includes alarm or deviceStatus, payloads use did, cid, and a string msgType (not an eventId). See Event message types and Event message format.

After capabilityEvent subscription, capability events use msgType such as detection.motion.detected; property changes use device.property.report. Query APIs also return count / nextAlarmId—do not confuse that response JSON with this push payload.

Detection alarms often include thumbnail and alarm images; linked cloud recording adds token. Fields aiCopyWriting, securityRiskLevel, and aiTag appear only with Smart View cloud storage or AI Smart View plans. This push payload has no feedback (history APIs only).

NameTypeDescription
msgTypeStringEquals eventId, e.g. detection.motion.detected
deviceIdStringDevice serial number
productIdStringModel
channelIdStringChannel-level events; omitted on device-level
outputDataObjectEvent-specific fields; {} when none (each event page documents this part)
timeIntReport time, Unix seconds
localTimeStringDevice local yyyyMMddTHHmmss
alarmIdStringAlarm id for detail / delete / paging
tokenStringPresent when linked cloud recording is available
thumbUrlStringThumbnail; returned when image exists
picUrlArrayArrayAlarm frames; expire—copy promptly
labelTypeStringMessage type label
aiCopyWritingStringSmart View copy when plan is active
securityRiskLevelStringSmart View only; push may be numeric string 1–10; history APIs may normalize to level text
aiTagStringSmart View only; push may be JSON array; history may normalize to a single tag string
{
 "msgType": "detection.motion.detected",
 "deviceId": "TESTIPC000012345",
 "productId": "56WGTET2",
 "channelId": "0",
 "outputData": {
 "extendContext": {
 "handleBit": 1
 }
 },
 "time": 1673406989,
 "localTime": "20230111T111629",
 "alarmId": "116257862023505xxxx",
 "token": "f2dc8c09eeae4b5bad6abf522c93d825",
 "thumbUrl": "https://example.imou.com/pic/thumb.jpg",
 "picUrlArray": [
 "https://example.imou.com/pic/frame1.jpg",
 "https://example.imou.com/pic/frame2.jpg"
 ],
 "labelType": "humanAlarm",
 "aiCopyWriting": "A man in black clothes rode past the store",
 "securityRiskLevel": "1",
 "aiTag": "person,vehicle"
}

Active query

Paginate by time: device.message.list (message-list · HTTP API message list). Search by labelType: device.message.search (message-search). Same v2 source as the alarm index.

These APIs query capability event history only. Legacy alarm / deviceStatus real-time payloads are in Receive device messages.

Example for POST https://openapi-[DataCenter].easy4ip.com/openapi/v2/device.message.list—see message-list page.

beginTime / endTime are device-local yyyyMMddTHHmmss, e.g. 20201022T000000.

{
 "id": "d5c287b4-5b2f-4f03-baf5-8032c5c354af",
 "system": {
 "ver": "1.0",
 "appId": "lcdxxxxxxxxx",
 "sign": "xjhCQBoJ9hRDsCjyDcHjtDNzRZ3ZJezcawsfWeiaoxU=",
 "time": 1706511734,
 "nonce": "f5a1ae2d-c09c-4d39-a744-83a5c2c653c2"
 },
 "params": {
 "token": "<yourAccessToken>",
 "deviceId": "TESTIPC000012345",
 "channelId": "0",
 "beginTime": "20201022T000000",
 "endTime": "20201022T235959",
 "nextAlarmId": "-1"
 }
}

Response messages[]: capability events have msgType equal to eventId. Page with nextAlarmId. Type search: Search messages by type. Single message: Query one alarm message. Delete: Delete alarm messages.

Unauthorized events are filtered out of list/search—not a whole-call DV2011.

Motion detection fields and legacy push names: Motion detection alarm. All events: Event types.

Capability error codes
device.message.list (Query alarm history)