Skip to content

Alert and alert-rule endpoints

Alert and alert-rule endpoints

The API splits alert history (fired notifications) under /api/v1/alerts from alert-rule configuration (the conditions that fire alerts) under /api/v1/alert-rules. Both are scoped by the JWT’s org_id.

GET /api/v1/alerts

List fired alerts for the caller’s org.

Since: v1.0 Required role: viewer

Query parameters

NameTypeDefaultConstraints
rule_iduuidFilters to one rule
statusenumnew, acknowledged, resolved
date_fromstringRFC3339 or YYYY-MM-DD
date_tostringRFC3339 or YYYY-MM-DD
cursorstringnullPagination cursor
limitint201-100

Response 200

{
"data": [
{
"id": "a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"rule_id": "f5e4d3c2-b1a0-4f9e-8d7c-6b5a4e3d2c1b",
"rule_name": "After-hours dock motion",
"event_id": "c1d2e3f4-5a6b-4c7d-8e9f-0a1b2c3d4e5f",
"camera_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "new",
"fired_at": "2026-04-21T02:14:00Z",
"acknowledged_at": null
}
],
"next_cursor": null,
"total": 1
}

Error responses

CodeBody.errorMeaning
401auth_requiredMissing or invalid token
429rate_limitedSee /developer/rate-limits

Examples

Terminal window
curl -H "Authorization: Bearer sk_live_abc123" \
"https://novavms.novalien.com/api/v1/alerts?status=new"
const alerts = await novavms.alerts.list({ status: 'new' });
alerts = client.alerts.list(status="new")

GET /api/v1/alerts/{id}/timeline

Return a chronological timeline of state changes for a single alert: fired, acknowledged, status transitions.

Since: v1.1 Required role: viewer

Response 200

{
"alert_id": "a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"entries": [
{"at": "2026-04-21T02:14:00Z", "action": "fired", "actor": null},
{"at": "2026-04-21T02:18:42Z", "action": "acknowledged", "actor": "Jordan Park"},
{"at": "2026-04-21T03:05:00Z", "action": "status_changed", "actor": "Jordan Park", "to": "resolved"}
]
}

Error responses

CodeBody.errorMeaning
404not_foundAlert not in caller’s org

Examples

Terminal window
curl -H "Authorization: Bearer sk_live_abc123" \
https://novavms.novalien.com/api/v1/alerts/a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d/timeline
const timeline = await novavms.alerts.timeline(
'a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d',
);
timeline = client.alerts.timeline("a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d")

GET /api/v1/alert-rules

List alert rules in the caller’s org.

Since: v1.0 Required role: viewer

Response 200

{
"data": [
{
"id": "f5e4d3c2-b1a0-4f9e-8d7c-6b5a4e3d2c1b",
"name": "After-hours dock motion",
"trigger_type": "motion",
"scope_type": "all_cameras",
"schedule_type": "custom",
"cooldown_sec": 300,
"enabled": true
}
],
"total": 1
}

Error responses

CodeBody.errorMeaning
401auth_requiredMissing or invalid token

Examples

Terminal window
curl -H "Authorization: Bearer sk_live_abc123" \
https://novavms.novalien.com/api/v1/alert-rules
const rules = await novavms.alertRules.list();
rules = client.alert_rules.list()

POST /api/v1/alert-rules

Create an alert rule.

Since: v1.0 Required role: operator

Request body

NameTypeDefaultConstraints
namestring1-100 chars
trigger_typeenummotion, ai_tag, manual
custom_tagsstring[][]Required when trigger_type=ai_tag
min_confidencefloat0.0-1.0, ai_tag only
scope_typeenumall_camerasall_cameras, specific_sites, specific_cameras
site_idsuuid[][]Required when scope_type=specific_sites
camera_idsuuid[][]Required when scope_type=specific_cameras
zones_filterstring[][]Optional zone names
schedule_typeenumalwaysalways, custom
cooldown_secint3000-3600
conditions_jsonobject{}Extra conditions (serialised JSON)
recipientsobject[][]1-25 recipients, each {type, target}

Response 201

{
"id": "f5e4d3c2-b1a0-4f9e-8d7c-6b5a4e3d2c1b",
"name": "After-hours dock motion",
"trigger_type": "motion",
"scope_type": "specific_cameras",
"camera_ids": ["550e8400-e29b-41d4-a716-446655440000"],
"schedule_type": "custom",
"cooldown_sec": 300,
"enabled": true,
"created_at": "2026-04-21T14:15:00Z"
}

Error responses

CodeBody.errorMeaning
400validation_errorMissing name, invalid trigger, or empty recipients
403forbiddenRole insufficient
404not_foundReferenced camera or site not in caller’s org

Examples

Terminal window
curl -X POST https://novavms.novalien.com/api/v1/alert-rules \
-H "Authorization: Bearer sk_live_abc123" \
-H "Content-Type: application/json" \
-d '{"name":"After-hours dock motion","trigger_type":"motion","scope_type":"specific_cameras","camera_ids":["550e8400-e29b-41d4-a716-446655440000"],"schedule_type":"custom","cooldown_sec":300,"recipients":[{"type":"email","target":"security@acme-logistics.com"}]}'
const rule = await novavms.alertRules.create({
name: 'After-hours dock motion',
triggerType: 'motion',
scopeType: 'specific_cameras',
cameraIds: ['550e8400-e29b-41d4-a716-446655440000'],
scheduleType: 'custom',
cooldownSec: 300,
recipients: [{ type: 'email', target: 'security@acme-logistics.com' }],
});
rule = client.alert_rules.create(
name="After-hours dock motion",
trigger_type="motion",
scope_type="specific_cameras",
camera_ids=["550e8400-e29b-41d4-a716-446655440000"],
schedule_type="custom",
cooldown_sec=300,
recipients=[{"type": "email", "target": "security@acme-logistics.com"}],
)

PATCH /api/v1/alert-rules/{id}

Update fields on an existing rule. Partial updates are supported.

Since: v1.0 Required role: operator

Request body

Any subset of fields accepted by POST /api/v1/alert-rules.

Response 200

Returns the updated rule — same shape as POST.

Error responses

CodeBody.errorMeaning
400validation_errorField value fails schema
404not_foundRule not in caller’s org

Examples

Terminal window
curl -X PATCH https://novavms.novalien.com/api/v1/alert-rules/f5e4d3c2-b1a0-4f9e-8d7c-6b5a4e3d2c1b \
-H "Authorization: Bearer sk_live_abc123" \
-H "Content-Type: application/json" \
-d '{"cooldown_sec":600}'
await novavms.alertRules.update('f5e4d3c2-b1a0-4f9e-8d7c-6b5a4e3d2c1b', {
cooldownSec: 600,
});
client.alert_rules.update(
"f5e4d3c2-b1a0-4f9e-8d7c-6b5a4e3d2c1b",
cooldown_sec=600,
)

DELETE /api/v1/alert-rules/{id}

Delete an alert rule. Historical alerts fired by the rule remain accessible via /api/v1/alerts.

Since: v1.0 Required role: operator

Response 204

Empty body.

Error responses

CodeBody.errorMeaning
403forbiddenRole insufficient
404not_foundRule not in caller’s org

Examples

Terminal window
curl -X DELETE https://novavms.novalien.com/api/v1/alert-rules/f5e4d3c2-b1a0-4f9e-8d7c-6b5a4e3d2c1b \
-H "Authorization: Bearer sk_live_abc123"
await novavms.alertRules.delete('f5e4d3c2-b1a0-4f9e-8d7c-6b5a4e3d2c1b');
client.alert_rules.delete("f5e4d3c2-b1a0-4f9e-8d7c-6b5a4e3d2c1b")