Event Integration

Partner Event API

Event API for sending events to CHeKT cloud

Partner Event API

Version: 1.0 Document Version: v0.8 Last Updated: 2026-01-15

Draft Document

⚠️ This document is a draft and may change at any time.

Overview

The Partner Event API is designed to allow partners to send event data (alarms, troubles, arming status) to the CHeKT cloud in real-time. This API is separate from the Partner API and focuses specifically on event ingestion and media upload.

Two Separate APIs

  • Partner API: Synchronizes dealer, site, device, and contact data (RESTful CRUD operations)
  • Partner Event API: Sends real-time events and media to CHeKT (Event ingestion)

These are two distinct APIs with different authentication methods. See Partner API Authentication for the Partner API.

Base URL

Development Server: https://api.chektdev.comProduction Server: https://api.chekt.com


Authentication

The Partner Event API uses OAuth 2.0 Client Credentials Grant with JWT assertions for M2M (Machine-to-Machine) authentication.

Authentication Guide

For detailed authentication setup, code examples, and security best practices, see the Partner Event API Authentication guide.

Quick Start

  1. Register an Auth Application with CHeKT support
  2. Generate a JWT assertion signed with your M2M secret key
  3. Exchange the assertion for an access token
  4. Include the token in API request headers:
Authorization: Bearer YOUR_ACCESS_TOKEN
Content-Type: application/json

Different from Partner API

Partner Event API authentication is simpler than Partner API - it only uses M2M authentication with no Authorization Code Flow required.


API Endpoint

Send Event

POST /partner/v1/events

Sends event data from OpenEye platform to CHeKT cloud.

Request Headers:

Content-Type: application/json
X-API-KEY: {your-api-key}

Request Body:

{
  "version": "1.0",
  "location_id": "Z6RSOG",
  "recorder_id": "Z6RANV",
  "camera_id": "2fe519b4-2438-4aa1-b051-87cf22bb",
  "event_id": "1763603245534315",
  "event_type": "alarm",
  "event_status": "active",
  "event_time": "2025-11-20T01:46:25.534Z",
  "sent_at": "2025-11-20T01:46:28.534Z",
  "should_signal_to_monitoring_center": true,
  "upload_snapshot_count": 1,
  "upload_short_mp4": false,
  "upload_event_mp4": true,
  "payload": {}
}

Request Body Parameters:

ParameterTypeRequiredDescription
versionstringYesAPI version (e.g., "1.0")
location_idstringYesLocation identifier
recorder_idstringNoRecorder identifier (optional for arming events)
camera_idstringYesCamera device identifier
event_idstringYesUnique event identifier
event_typestringYesEvent type: alarm, trouble, arming, etc.
event_statusstringYesEvent status: active, inactive
event_timestringYesEvent occurrence time (ISO 8601 format)
sent_atstringYesTime when event was sent (ISO 8601 format)
should_signal_to_monitoring_centerbooleanYesWhether to send signal to monitoring center
upload_snapshot_countintegerYesNumber of snapshots to upload
upload_short_mp4booleanYesWhether to upload short MP4 video
upload_event_mp4booleanYesWhether to upload event MP4 video
payloadobjectYesAdditional event data

Response Format

Success Response (201 Created)

{
  "event_id": "eve-56",
  "response_id": "019a338f-5581-7368-b166-b4235f6f4750",
  "uploads": {
    "snapshots": [
      {
        "seq": 0,
        "upload_put_url": "https://my-example-bucket.s3.us-east-1.amazonaws.com/device/123/snapshot_0.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256",
        "callback_put_url": "https://api.chektdev.com/partner/v1/events/eve-56/uploads/callback?seq=0&type=snapshot&access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9"
      },
      {
        "seq": 1,
        "upload_put_url": "https://my-example-bucket.s3.us-east-1.amazonaws.com/device/123/snapshot_1.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256",
        "callback_put_url": "https://api.chektdev.com/partner/v1/events/eve-56/uploads/callback?seq=1&type=snapshot&access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9"
      }
    ],
    "short_mp4": {
      "upload_put_url": "https://my-example-bucket.s3.us-east-1.amazonaws.com/device/123/short_mp4.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256",
      "callback_put_url": "https://api.chektdev.com/partner/v1/events/eve-56/uploads/callback?type=short_mp4&access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9"
    },
    "event_mp4": {
      "upload_put_url": "https://my-example-bucket.s3.us-east-1.amazonaws.com/device/123/event_mp4.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256",
      "callback_put_url": "https://api.chektdev.com/partner/v1/events/eve-56/uploads/callback?type=event_mp4&access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9"
    }
  },
  "status": "accepted",
  "reason": null
}

Response Parameters:

ParameterTypeDescription
event_idstringCHeKT event identifier
response_idstringUnique response identifier (UUID)
uploadsobjectPre-signed URLs for uploading media files
uploads.snapshotsarrayArray of snapshot upload URLs with sequence numbers
uploads.short_mp4objectShort MP4 video upload URLs
uploads.event_mp4objectEvent MP4 video upload URLs
statusstringProcessing status: accepted, discarded
reasonstringReason for status (e.g., "Event discarded: device is disarmed")

Upload URLs

Each upload object contains:

  • upload_put_url: Pre-signed S3 URL for uploading the media file
  • callback_put_url: Callback URL to notify CHeKT after upload completion

Error Responses

400 Bad Request

{
  "error": "Bad Request",
  "message": "Invalid input or params"
}

401 Unauthorized

{
  "error": "Unauthorized",
  "message": "Invalid token or credentials"
}

403 Forbidden

{
  "error": "Forbidden",
  "message": "Access denied"
}

404 Not Found

{
  "error": "Not Found",
  "message": "Resource does not exist"
}

Event Types

The API supports the following event types:

Event TypeDescription
alarmAlarm event triggered by camera or sensor
troubleTrouble event (formerly netloss) indicating system issues
armingArming status change event

Upload Workflow

  1. Send Event: POST event data to /partner/v1/events
  2. Receive URLs: Get pre-signed upload URLs in response
  3. Upload Media: Upload snapshots/videos to the provided S3 URLs using PUT requests
  4. Send Callback: After each successful upload, call the callback_put_url to notify CHeKT

Upload Best Practices

  • Upload files immediately after receiving pre-signed URLs
  • Pre-signed URLs expire after a certain time period
  • Always call the callback URL after successful upload
  • Handle upload failures with appropriate retry logic

Version History

VersionDateDescription
0.82026-01-15Change recorder_id to optional, because arming event will omit it
0.72026-01-14Change netloss to trouble event
0.62026-01-07Add arming status parameter
0.52025-12-18Add sending signal parameter
0.42025-11-22Update event properties
0.32025-11-20Update upload properties
0.22025-10-29Add upload callback property
0.12025-10-24Initial draft and structure

Next Steps

Next Steps