Skip to main content

The recorder's API for other systems

Another system talks to EverNVR through the same HTTP routes its own pages use, under the same permissions, signed in with an API token instead of a browser session. The full route list, generated from the running recorder, is at GET /api/openapi.json (OpenAPI 3.1; sign in to read it). This page is the guide to the parts an integration reaches for.

Tokens​

Settings → API tokens (an owner administrator). A token stands for one account: it sees that account's cameras and may do what that account's role may do, so choose the least account that will serve: a viewer granted only the cameras the other system needs, an operator only if it must move a camera, switch its light or siren, or press a button. A read-only token is refused every write (no PTZ, no button presses, no settings) before a route sees it. The secret is shown once; only a hash is kept. A token is revoked in Settings → API tokens without touching anyone's password, and revoking closes its open streams and feeds at once. Creation and revocation are in the account history.

A token may be given an expiry (up to five years). After it, the token is refused exactly as a revoked one is, with no job to run and nothing to remember. Give temporary work — a commissioning laptop, a trial integration — an expiry; leave it empty for a permanent integration.

A token also stops while the account it stands for is disabled: every request with it answers 401 and its open streams and feeds close within seconds. Nothing about the token changes, so it works again once the account is enabled. An administrator disables an account, or enables it again, with PUT /api/users/{id}/disabled {"disabled": true | false}; nobody can disable their own account or the last enabled permanent administrator (409). POST /api/auth/login with the right password for a disabled account answers 403 with code account_disabled; a wrong password answers 401 as for any account.

Browser sign-in for an account with two-step sign-in answers {"mfaRequired": true} until the request carries code. Sending "trustBrowser": true with a correct code, on the recorder's own network and for a permanent account, trusts that browser for 90 days: the answer sets an evernvr_trusted cookie (httpOnly, SameSite=Strict, path /api/auth) beside the session cookie, and trustedUntil is when the trust ends. A later sign-in from that browser needs only the password and answers trustedUntil too; any other sign-in answers null. GET /api/auth/trusted-browsers lists the signed-in account's trusted browsers (id, userAgent, createdAt, lastUsedAt, expiresAt, current); DELETE /api/auth/trusted-browsers/{id} forgets one (404 if it is not trusted) and DELETE /api/auth/trusted-browsers forgets them all. Forgetting signs out the forgotten browsers' sessions except the calling one. This is for people in browsers; an integration uses a token and never signs in.

Present the token one of three ways:

WhereHow
Any requestAuthorization: Bearer evk_…
A stream URL for a player or ffmpegHTTP basic auth with the token as the password: https://token:evk_…@recorder/api/cameras/2/stream.mjpg
Where a client cannot send a header?token=evk_… on a GET of stream.mjpg, frame.jpg, playback.mp4, /ws or /ws/video

A URL is written down: by proxies, by browser history, in a Referer. So the query parameter is accepted only on the routes whose client is an <img>, a player or a browser's WebSocket and has no way to send a header. Everywhere else, use the header or basic auth. An Authorization header this recorder did not issue is ignored rather than refused, so a client with a bearer token for something else can still reach the sign-in page.

Tokens are minted and revoked by a signed-in owner administrator on the API page. A token cannot mint or revoke tokens, whatever account it stands for; POST /tokens and DELETE /tokens/:id answer a token with 403.

A camera with privacy masks refuses /ws/video to a token (close code 1008). That socket carries the camera's own packets, and only the recorder's own page draws the masks over them. A token gets the same camera through stream.mjpg, frame.jpg and playback.mp4, which have the masks applied before the pixels leave; playback.mp4 of a masked camera is re-encoded and starts at the moment asked for.

Times are epoch milliseconds throughout. Camera ids are the id in /api/cameras.

What an NVR integration uses​

Administrators can read first-run wizard progress at GET /api/onboarding: {"step":"hailo","required":true}. PATCH /api/onboarding accepts a step of hailo, storage, ai, or complete; only complete makes required false. This records wizard progress, not hardware qualification or a successful configuration check. The wizard saves configuration through the existing PUT /api/detector, PATCH /api/storage/location, PATCH /api/storage/settings, and PUT /api/ai routes before advancing. GET /api/status includes onboarding for administrators and null for other callers. Existing installations without wizard progress are treated as complete; creating the first account through POST /api/setup starts at hailo.

PurposeRoute
Who am I, version, camera countGET /api/status — also timeZone, the recorder's own zone, which every time the recorder shows is in; null before signing in
Which recorder this isGET /api/identity — product, a stable id and name (the commissioned site name, else the host name), and remote, the site address, while remote access is on. Answers without signing in and carries no version; it is what the mobile app uses to recognize a recorder whose address has changed, and to keep its site address for when the phone is away
CamerasGET /api/cameras — id, name, enabled, onvif (PTZ possible), recordProfile (width, height, codec, fps), health.state, mode (intelligence_only means the recorder keeps no footage), eventArea (where the camera records events: wholeView, true when anywhere in the picture, and zones, the number of enabled zones and lines; both false or 0 means it records none), cameraEvents (whether the recorder listens to the camera's own events), cameraEventsStatus (state starting, ok or failing, reason, lastEventAt, active kinds), outputs (the deterrence outputs last found on the camera, each id, kind: relay, light or siren, name and driver: onvif, dahua or tapo), outputsProbedAt (null until an administrator has looked), outputsNotes (what a driver could not do, in words), vendorAccount (whether a Tapo app account password is saved), talkback (whether an operator can talk through the camera's speaker: supported, codec, probedAt, null until the recorder has asked, and reason when not supported) and planPlacement (where the camera is on the site plan: planId, x, y, headingDeg, hfovDeg and calibrated, which is homography, ptz or null; null when the camera is on no plan)
PTZ capability and presetsGET /api/cameras/{id}/ptz, GET /api/cameras/{id}/ptz/presets
Live frameGET /api/cameras/{id}/still.jpg
Live videoGET /api/cameras/{id}/stream.mjpg — MJPEG, plays in any player or ffmpeg; the recorder drops frames rather than letting a slow client fall behind
Live video over RTSPOff until an administrator turns it on under Settings → RTSP streams (GET and PUT /api/integrations/rtsp {"enabled", "rtspPort", "rtspsPort"}, 8554 and 8322 unless set). Each camera in GET /api/cameras then carries restream: main (what the camera records) and sub (what it detects on), each {url, secureUrl, codec, width, height} with codec h264 or h265, or null when the camera has no such stream running, and reason when its streams are refused, as for a camera with privacy masks; restream is null while RTSP is off. The token is the RTSP password, with any user name: rtsps://token:evk_…@<recorder>:8322/cameras/{id}/main. The video is the camera's own stream, copied rather than re-encoded, and a reader uses no camera connection. Only site-network addresses are served, over TCP, video only; secureUrl is null while the recorder serves plain HTTP. A reader whose token is revoked or expires, or whose account loses the camera, is disconnected within seconds. See the RTSP streams guide
Frame from the recordingGET /api/cameras/{id}/frame.jpg?at=<ms>&width=<px> — 404 when no footage is kept for that moment. A frame is a pull of footage: it holds one of the account's playback slots while it is cut, at most 30 a minute per account (429 too_many_frames), and a moment older than the 120-second review window needs the account's export permission and is audited as an export. Responses are never cached: a privacy mask drawn today has to cover a frame cut from last week, and a cached copy is a look at footage the recorder never saw
Recorded rangesGET /api/cameras/{id}/availability?from=<ms>&to=<ms> — ranges: [{start, end}] and bounds
Recorded ranges, every camera at onceGET /api/recordings/availability?from=<ms>&to=<ms> — a window of up to 31 days, both bounds required; cameras: {<id>: {cameraId, bounds, ranges}} for each camera the account may see, each entry what that camera's own route returns
Recorded videoGET /api/cameras/{id}/playback.mp4?start=<ms>&duration=<s> — download=1 needs the account's export permission
Boxes over the recordingGET /api/cameras/{id}/tracks?from=<ms>&to=<ms> — where each detected object was, frame by frame, at most 10 minutes per call; boxes are fractions of the frame, timestamps are on the recording's clock (the camera's box alignment already applied and returned as offsetMs: in auto the recorder's measurements nearest the requested window, in manual the camera's trackOffsetMs), and they are kept exactly as long as the footage they belong to
EventsGET /api/events?cameraId=&label=&who=&plate=&since=&until=&changedSince=&limit= — newest first, or with changedSince (epoch ms, inclusive) the visits that began, ended or changed at or after it, oldest change first, each with updated_at; who is known, unrecognized, unsure or an identity id; plate is all or part of a license plate (letters and digits; spaces and punctuation are ignored). Where face or plate recognition is on, an event also carries identity_method (appearance, face or plate), face_state (known, unsure, unknown or unusable), and plate_text, plate_state (known, unsure or unknown), plate_confidence, plate_region (the country the plate looks like, such as United States, or null) and plate_image (not null when a close-up of the plate was kept). confidence is the detector's score on the frame that confirmed the visit, which can be under the camera's floor (the floor decides what may start a track, not what may continue one); max_confidence is the best score the visit was seen at, the one action rules judge it by. A plate reading can change while the visit goes on, as more frames are read. label is person, car, truck, bus, motorcycle, bicycle or animal: the detector reports every animal as animal, never a species, and a species given as label= (such as dog) is read as animal. Visits stored under a species by earlier releases were renamed animal without being reported as changed. An open visit's label can change when most of its sightings settle on another class, such as a car that turns out to be a truck; that change is reported to changedSince like any other
Event pictureGET /api/events/{id}/thumbnail.jpg
Close-up of an event's plateGET /api/events/{id}/plate.jpg — the plate as the visit reads it, cut from the frame where it was largest among those read surely (or, when none was, the frame read most confidently); 404 when plate_image is null. It can be replaced by a better frame while the visit goes on
What the boxes show of an event's objectGET /api/events/{id}/track — summary: trackId, frames (logged frames that held this object; a still scene is logged about once a second, so this is not a count of detector looks), firstAt and lastAt on the recording's clock, confidence, height and width as {min, max} (box sizes are fractions of the frame), labels (each label the detector gave it, with a count), offsetMs (the box alignment applied), and truncated, true when only the first ten minutes of a long stay were read. summary is null when no boxes are kept for the event, as on a camera that records nothing or for a vehicle found by its plate alone (see face and plate recognition). 404 for an event the account may not see
Size floor from an event (administrator)GET /api/events/{id}/size-floor says what Too small would do: cameraId, cameraName, tallest (the tallest box the object drew, as a fraction of the frame), floor (that height with headroom, rounded up to a whole percent), current (the camera's size floor now, null for none), unchanged (true when current is already at least floor; a floor is never lowered), hiding (how many of the camera's events from 12 hours before to 12 hours after this one never stood as tall as floor), hidingThis and windowHours. POST the same route applies it and answers the same fields with current set and hidden, the ids it marked wrong. Events an operator tagged as a known object or confirmed, events already marked wrong and events with no boxes are left alone. 409 with error when no boxes were kept for the event, or when the floor would have to be above 50% of the frame
How many events matchGET /api/events/count?cameraId=&label=&who=&plate=&since=&until=&changedSince= — {"count": n}: how many events the same filters of GET /api/events match, however many one page of that list holds. An account limited to some cameras counts only those
Activity over timeGET /api/events/density?from=<ms>&to=<ms>&buckets=<n> — how many events began in each of buckets equal slices (default 120, at most 500) of a window of up to 31 days, per camera the account may see: cameras: {<id>: [{bucket, total, firstAt, person, vehicle, animal, other}]} with empty slices left out, plus from and bucketMs to place them
Look for an identity in earlier visits (administrator)POST /api/identities/{id}/backfill {"days": 7 | 30 | 90 | null} — decides again every visit of the identity's kind (person, vehicle or pet) that began in that many days, or every visit kept for null, behind live events; visits an operator tagged or corrected are left alone. Answers queued, how many visits it will check, and backfills; 400 for any other days, 404 for no such identity. GET /api/identity-backfills lists those still running, each kind, since (ms), total, done and found (identity id to the number of checked visits it now names). Administrators on /ws also get {"type": "identity-backfill", …} with the same fields and finished as a look-back goes on
What rules didGET /api/alerts?limit= — each run with its delivery status, held_by (agent, learned, verify or grouped) and held_reason when alert screening held it back, group_id (the incident it belongs to) and verdict, its review
The alerts about one visitGET /api/events/{id}/alerts — alerts: [{id, rule_name, fired_at, sent, held_by, held_reason, verdict, reviewed_by_name, incident}], where incident lists the other alerts of the same incident (rule_name, camera_name, event_id, fired_at, sent) on cameras the account may see
Review an alert (operator)PUT /api/alerts/{id}/review {"verdict": "real" | "harmless" | "nothing"}, or {"verdict": null} to take the review back; answers review and the event. nothing also marks the event as nothing real, and real or harmless takes such a mark off. 409 for an alert no rule sent
Send a held alert (operator)POST /api/alerts/{id}/send — queues the messages screening held back, except actions whose minute has passed; answers sent, how many. 409 when the alert was not held or nothing is left to send
False-alert rateGET /api/alerts/quality?days=1|7|30 — total, rules, cameras and byDay, each with fired, sent (alerts sent to at least one person), held (agent, learned, verify, grouped), reviewed, real, harmless, nothing, falseShare (harmless and nothing over reviewed, null with no reviews), reviewedShare and heldButReal. An event marked wrong counts as nothing for its unreviewed alerts
Alert screening (administrator)GET /api/alert-screening — settings: learned (hold look-alikes of a camera's false alarms, on unless set), learnedFloor 0.8..0.98 (0.88), groupSeconds 0..900 (120; 0 sends every alert), verify (second look at the recording, off unless set), verifyFloor 0.1..0.6 (0.25), agentAll (ask the AI agent about every alert, off unless set) and agentHoldBelow 1..5 (3); limits; and learned, each camera's marks, ready (encoded and compared against) and held. PUT with any of the settings saves them and answers the same
Detection zonesGET /api/zones?cameraId= — id, cameraId, name, polygon (points as fractions of the frame), labels, enabled, kind and direction. kind is area (stood in) or line (crossed; its polygon is its two ends), and a line's direction is both, forward (toward the side a quarter-turn clockwise from the line as drawn) or reverse; an area's is both. A crossing is recorded as a visit to the line's zone with no length of stay. Administrators add one with POST /api/zones {"cameraId", "name", "polygon", "labels", "kind", "direction"} (area and both unless given), change one with PATCH /api/zones/{id} (name, polygon, labels, enabled, and a line's direction; 400 for a change of kind) and remove one with DELETE /api/zones/{id}. A rule on a line must be object_detected with no minimum dwell
Detector (administrator)GET /api/detector — ready, backend (hailo-8, onnx-cuda or onnx-cpu), requestedBackend, fallback, fallbackReason, hardware (the Hailo device) and gpu (detected, available, reason, driver, name). PUT /api/detector {"backend": "auto" | "onnx" | "hailo" | "gpu"} saves the choice and restarts detection
Camera detection settings (administrator)GET /api/cameras carries each camera's detectSettings: minConfidence (a fraction up to 0.95, null for the model's own), minHeight (a fraction of the frame's height up to 0.5, null for none), schedule (null for always, or days 0 = Sunday to 6 and from/to as HH:MM in the recorder's time) and events, where the camera records events: auto (the whole picture until a zone or line is drawn, then only those; the default), whole (the whole picture, and zones as well) or zones (only zones, and any detection rule with no zone). PUT /api/cameras/{id}/detection with the same fields replaces all four and answers them; a field left out returns to its default, so send events back unchanged when changing only the floors. 400 for a value out of range
Video decoding (administrator)GET /api/video-decode — setting (auto, software or a decoder id), decoders (each with id such as vaapi:/dev/dri/renderD129 or cuda:0, kind, label and the codecs it decoded at startup), problems (what kept a graphics chip from decoding, such as a missing driver package), and cameras (each with hardware, the decoder's label or null for the processor, reason when on the processor, and fellBack after a hardware failure). PUT /api/video-decode {"setting": …} saves the choice and reconnects every camera; saving the same choice again retries the hardware for cameras that fell back
What cameras reported themselvesGET /api/camera-events?cameraId=&limit=&before=<ms> — newest first, events: [{camera_id, camera_name, kind, phase, topic, at, summary}]. kind is motion, line, intrusion, person, tamper or other, and phase is begin, end or pulse (happened once). Only cameras with cameraEvents on report anything; these are the camera's own ONVIF claims, not the recorder's detections
ButtonsGET /api/action-buttons, POST /api/action-rules/{id}/press (operator)
Rules (administrator)GET /api/action-rules, POST /api/action-rules, PATCH and DELETE /api/action-rules/{id} — a rule carries actions, a list of up to ten, each a type of notify (userIds, channels, and optionally urgent, a boolean, false unless given), webhook (url, write-only secret), ptz_preset (cameraId, preset, and optionally returnPreset with returnAfterSeconds 5..3600, 60 unless given), ptz_aim (cameraId of a PTZ whose heading is calibrated on the site plan, zoom 0..1 or null to keep, and the same optional return), output (cameraId, outputId from that camera's outputs, state: pulse, on or off, and seconds 1..300 for a pulse, 10 unless given), talk_message (cameraId of a camera whose talkback.supported is true, or browsers: true instead of cameraId to play in every open browser; messageId of a saved message, repeat 1..3, 1 unless given), preserve (beforeSeconds, afterSeconds, up to an hour in all) or arm (armed, ruleIds, minutes: 0 for until changed, up to a week). action is the first of them, kept for older clients, and a body with action alone is still accepted. A webhook's answer says hasSecret, never the secret; a save that omits secret keeps the saved one for the webhook with the same url (or, when the rule keeps as many webhooks, the one in the same place), and secret: null removes it. An output with state: on is refused for an output whose timedOnly is true (a Tapo spotlight), which switches itself off after a set time. temporary_until is when a timed arm or disarm ends, null otherwise; activeNow is whether the rule is listening right now
Alarm journalGET /api/alarms?source=&severity=&cameraId=&since=&until=&q= — entries, each with actor_name, actor_via (lan, cloud, token or automatic), and for administrators actor_source (address), actor_token_id, actor_token_name and actor_client (the client as it named itself). A change's detail holds summary and changes: each {table, id, name, camera, field, from, to}, or added/removed with the row, secrets as [redacted]; moreChanges counts what did not fit. source=viewing entries are sittings: detail has startedAt, endedAt, continues (journaled at the hour, still going), cameraIds, and cameras, each with liveMs, playbackMs, restreamMs, footage (stretches played, {from, to}), pictures and eventPictures. cameraId also finds viewing and retention entries that list the camera among several. An AI entry with kind disclosure is pictures sent to the provider: detail has purpose, pictures, provider, model, to and cameraIds. A request that deleted footage has detail.destroyed (segments, bytes, and for a camera events)
Site planGET /api/site-plans — the plans (id, name, width, height in pixels; the image is GET /api/site-plans/{id}/image) and placements keyed by camera id: x, y in plan pixels, headingDeg clockwise from up, hfovDeg, and calibration (kind homography for a fixed camera matched to the plan, with its points and residualPx, or ptz with headingDeg, height in plan pixels and residualDeg). The answer also carries limits (bytes, pixels, points and the placement ranges). Administrators upload a plan with POST /api/site-plans?name= (the JPEG or PNG as the body, at most 8 MB and 8000 pixels on a side), replace its image with PUT /api/site-plans/{id}/image (pins are scaled along, calibrations dropped), rename it with PATCH /api/site-plans/{id} {"name"} and remove it with DELETE /api/site-plans/{id}, which takes every camera off it. They place a camera with PUT /api/cameras/{id}/plan {"placement": {"planId", "x", "y", "headingDeg", "hfovDeg", "rangePx"}} in plan pixels, or {"placement": null} to take it off; match a fixed camera's picture with PUT /api/cameras/{id}/plan/points {"points": [{"picture": [u, v], "plan": [x, y]}]} (picture fractions, at least four, up to 24; the answer's fit carries residualPx and each point's errorsPx, and an empty list clears it); and measure a PTZ's heading with PUT /api/cameras/{id}/plan/samples {"samples": [{"position": {"pan", "tilt", "zoom"}, "plan": [x, y]}]} (the camera needs a calibrated or trained PTZ geometry; the answer's fit carries headingDeg, height and residualDeg, and an empty list clears it). GET /api/cameras/{id}/plan/looking answers the plan point under a calibrated PTZ's center and its position, or null when it looks at or above the horizon; POST /api/cameras/{id}/plan/aim {"x", "y", "zoom"?} sends a calibrated PTZ to look at a plan point (PTZ operator) and answers like ptz/aim plus bearingDeg and levelOnly (true when the camera's height is unknown and only its pan was set); 409 for a camera whose heading is not calibrated
HealthGET /api/health (administrator)
A camera's clock (administrator)GET /api/cameras/{id}/clock — reads the camera now and answers driftSeconds, the camera's clock minus the recorder's, offsetMinutes, the camera's local time minus its UTC time (null when it reports only one), and dateTimeType, NTP or Manual. POST /api/cameras/{id}/clock {"switchToManual": false} sets the camera's time as the signed-in administrator would from the camera's page, and with it the recorder's time zone and the recorder as its NTP server: verified, driftBeforeSeconds, driftAfterSeconds, timeZoneBefore, timeZoneSet (null when the camera already showed the recorder's offset and kept its own zone string), timeZonePreserved, zoneVerified (whether the camera's picture time now shows the recorder's offset; null when it cannot be told), ntpServerSet (the recorder address the camera now takes its time from), ntpError (the camera's answer when it refused an NTP server), dateTimeTypeBefore, dateTimeTypeSet, streamReopened, and ntpKept when the camera stayed on NTP and did not hold the time; switchToManual: true is the separately audited switch to manual time and sets no NTP server. 400 for a camera without ONVIF
Automatic clock correction (administrator)GET /api/clock-sync and PUT /api/clock-sync {"enabled": true} — whether the recorder itself sets a camera's clock, time zone and NTP server when it finds the time seconds out, the zone different from the recorder's, or the camera not taking its time from the recorder (on by default). Off, it still reads every camera's clock on its schedule; each correction it makes is in GET /api/cameras/{id}/writes with no performed_by
The recorder's own clock (administrator)GET /api/recorder/time — available (false, with error, when the system's clock service cannot be reached), zone, ntp (network time on), canNtp, synchronized, now (the recorder's time in ms), zones (the zones it can be set to), pinnedZone (the zone EVERNVR_TZ pins times to, otherwise null) and timeServer (whether the recorder is serving NTP to cameras). PUT /api/recorder/time with any of {"zone": "<from zones>", "ntp": true|false, "time": "YYYY-MM-DD HH:MM"} changes them and answers the same fields without zones. A time is read in the recorder's zone after any new zone is applied, and is refused unless network time is off or turned off in the same request. 400 for a value it refuses, 502 when the system's clock service refuses the change. Each change is recorded in the alarm journal, and every camera's clock is checked again at once

PTZ (operator or administrator; the account, not the token, decides):

VerbRoute and body
Continuous movePOST /api/cameras/{id}/ptz/move {"pan": -1..1, "tilt": -1..1, "zoom": -1..1, "durationMs": optional} — the recorder stops the move itself after a short timeout
StopPOST /api/cameras/{id}/ptz/stop
Aim at a point in the picturePOST /api/cameras/{id}/ptz/aim {"x": -1..1, "y": -1..1, "zoom": -1..1} — the answer says how it was done: method is absolute when the camera's calibrated or trained geometry worked out the pan and tilt and the recorder checked and corrected the result, or fov when the camera was aimed in its own terms; predictedError and achievedError are how far the point was expected to be and ended up from center, as a fraction of the frame; corrections is how many follow-up moves it took, and clamped is true when the camera could not reach the point and was turned as far as it goes
Recall a presetPOST /api/cameras/{id}/ptz/preset {"token": "<preset token>"}
Save a preset (administrator)POST /api/cameras/{id}/ptz/presets {"name": "…"}
Patrol and what it is doingGET /api/cameras/{id}/ptz/patrol (anyone who can see the camera) — patrol (steps: [{preset, presetName, dwellSeconds}], enabled, schedule, resumeAfterSeconds) or null, and status.state: running, paused (after another PTZ command, until status.until), held, waiting (status.reason) or off
Define the patrol (administrator)PUT /api/cameras/{id}/ptz/patrol {"steps": [{"preset": "<token>", "dwellSeconds": 10..3600}], "enabled": true, "schedule": {"days": [0..6], "from": "HH:MM", "to": "HH:MM"} or null, "resumeAfterSeconds": 30..3600} — every preset must be on the camera; DELETE removes it
Hold or resume the patrolPOST /api/cameras/{id}/ptz/patrol/pause, POST /api/cameras/{id}/ptz/patrol/resume — a hold lasts until resumed, across restarts
Auto tracking and what it is doingGET /api/cameras/{id}/ptz/follow (anyone who can see the camera) — follow (enabled, groups, maxFollowSeconds, returnPreset, returnPresetName, returnAfterSeconds, resumeAfterSeconds) or null; unavailable, a sentence saying what the camera lacks (a calibrated geometry, absolute positioning) or null, with needsCalibration true when it is the geometry; and status.state: watching, following (status.label, status.since, status.hops), paused (until status.until) or off, with status.lastEnded (why: lost, time, operator, rule, moved, stopped or failed)
Set auto tracking (administrator)PUT /api/cameras/{id}/ptz/follow {"enabled": true, "groups": ["person", "vehicle", "animal"] (one or more), "maxFollowSeconds": 10..600, "returnPreset": "<token>" or null, "returnAfterSeconds": 0..600, "resumeAfterSeconds": 10..3600} — switching it on needs the camera's PTZ geometry calibrated or trained and an absolute position space (409 otherwise); the return preset must be on the camera; DELETE removes it
Stop followingPOST /api/cameras/{id}/ptz/follow/stop — the camera stays where it is and auto tracking pauses for resumeAfterSeconds, as after any other PTZ command
Deterrence outputsGET /api/cameras/{id}/outputs (anyone who can see the camera) — the camera's relay, light and siren outputs as last found (items: [{id, kind, name, driver, on, until}], with on what the recorder last set and until when a timed switch ends, or null), plus probedAt and notes; POST /api/cameras/{id}/outputs/{outputId} (operator) with `{"state": "pulse"
Spoken messagesGET /api/talk/messages (anyone signed in) — the saved messages, `{id, name, source: "recorded"

Any PTZ command above pauses a running patrol for its resumeAfterSeconds, and ends a follow and pauses auto tracking for its own resumeAfterSeconds. A rule's PTZ action ends a follow without pausing auto tracking. The status socket sends {"type": "ptz-patrol", "cameraId", "patrol"} and {"type": "ptz-follow", "cameraId", "follow"} on every change, and {"type": "camera-output", "cameraId", "id", "on", "until"} each time an operator or a rule switches an output; a timed switch ending sends nothing, so read until. A rule's talk_message with browsers: true sends {"type": "speak", "id", "messageId", "name", "text", "repeat", "rule", "cameraId"} to each client on /ws whose account may see cameraId (every client when it is null), API tokens included: text is a typed message's words and null for a recorded one, whose audio is GET /api/talk/messages/{messageId}/audio. The delivery is accepted when at least one client received it, and fails when none did. GET /api/cameras/{id}/writes?limit=<n> (administrator) returns a camera's newest audited writes, each patrol step and each output switch (operation output, with the output, the state asked for, the rule if one asked, and the camera's answer when it refused) included, as well as every aim at a plan point or a trigger (ptz_aim, with the plan point and bearing when the plan was used), every return a rule booked (ptz_return, with the preset and the rule), and one row per follow (ptz_follow, with what was followed, for how long, how many moves and why it ended) and per return after one (ptz_follow_return).

Deep links for a person: /playback?camera=<id>&at=<ms> opens the timeline at that moment; /events?event=<id> opens an event; /?camera=<id> opens the live view on a camera.

Hearing about things​

Three ways, and an integration usually wants more than one.

  • Webhooks, pushed. An action rule with a webhook action POSTs its trigger details to your URL, signed with the action's secret (HMAC in the X-EverNVR-Signature header); a rule may carry several actions, webhooks among them, and the body names the rule (rule, ruleId). Rules can fire on detections, departures, occupancy, absence, button presses, recorder faults, departures from the site's own normal and the camera's own ONVIF events (triggerType camera_event, with cameraEvent.kind and cameraEvent.topic). When the recorder knows who it was, the body carries identity (name, and method: appearance, face or plate; the recorder no longer names a person by an appearance match, so on visits decided by this version appearance on a person means an operator tagged that visit); where recognition read a plate or a face, it carries plate (text, state) and face (the face reading). A detection carries region, the object's box as fractions of the frame [left, top, right, bottom]. When one of the rule's notification actions is marked urgent, the body carries urgent: true. See INSTALL.md.
  • The status feed, live. wss://recorder/ws with the token as a bearer header or ?token=. Messages: hello (cameras this token may see, and version, the release the recorder runs; after an update the feed reconnects and greets with the new one), camera-state, camera-activity, event, camera-event, alert, detections, ptz-patrol, ptz-follow, camera-output, site-plan-changed (a plan or a camera's place on it changed, with cameraId when it was one camera's pin; the client reloads /api/site-plans), layouts-changed (a wall layout was saved or deleted; the client reloads /api/layouts), license-changed (with the new state; the client reloads /api/license), heartbeat every 15 s. An account limited to some cameras gets each of these for the cameras it may see, output switches included; anything about a camera the account cannot see is never sent. An alert with cameraId null (a site-wide button or a recorder fault) reaches every account.
  • MQTT, published. An administrator can point the recorder at an MQTT broker (Settings → MQTT): detections, alerts, alarms and retained camera and recorder state under one topic prefix. Unlike the status feed it is not filtered per account. See the MQTT guide.

Polling GET /api/events?changedSince=<newest updated_at seen> every few seconds is the simplest correct client. It sees a visit begin and end. A visit's ended_at can be earlier than the poll that reports it, because a visit the recorder closes itself ends at the last moment it was seen, so follow updated_at, not ended_at. Polling with since= returns visits by when they began, so it never reports the end of a visit older than the newest start you hold.

The license​

A recorder installed with the EverNVR installer is licensed; one that is not license-managed (managed: false below) refuses nothing. The license never stops recording, a camera already added or a feature already switched on. It refuses growth: adding a camera past the licensed count, switching a licensed feature on, and new work in one.

GET /api/license (anyone signed in) answers {"managed": false} on a recorder with no license. On a licensed one it answers managed: true, state, entitlements (features, a list of feature ids, and limits, where cameras is a number, or null for no limit) and features (each feature id and its name). An administrator also gets the holder and the lease: customer, licenseKey (a hint, not the whole key), plan, termEnd, updatesUntil, leaseIssuedAt, leaseExpiresAt, pendingUntil or graceUntil where they apply, reason, installationId, keyId and cameras, the number added.

stateMeaning
pendingA new install that has not reached the license server yet; it has the trial's features for up to 14 days
trialA trial lease from the license server
licensedA license key is active
graceThe lease has run out and the server cannot be reached; the license's features continue until graceUntil
expiredThe license term has ended
unlicensedNo license, the trial has ended, or the lease could not be renewed
suspended, revokedSet on the license server

The feature ids are ai (the AI agent: event questions, Ask the recorder, briefings, commissioning proposals), recognition (face and plate recognition, new identities and enrolment), investigation (semantic search, trails, new incidents and notes), mqtt (the MQTT integration) and remote-access (remote access through evernvr.com).

GET /api/remote-access (administrator) answers managed, enabled (the owner's switch), licensed (the license includes remote access), siteAddress and connection (state is connected, connecting, disconnected, refused with a reason such as not-entitled, denied, busy, revoked, disabled, disconnected or banned, and retryInMs when known, or dormant). PUT /api/remote-access {"enabled": true} (a permanent administrator) turns it on or off and answers the same shape. Turning it on claims a site address when the recorder has none: the release server generates one, and siteAddress carries it in the answer. If that could not be done the answer adds siteError, and the recorder tries again by itself ten minutes later, and every ten minutes after that while remote access stays on; a later GET /api/remote-access shows siteAddress once an attempt succeeds.

GET /api/status carries remote: true through remote access, false otherwise. Through remote access, changes to updates, factory reset, the recorder's clock, the Hailo installer, storage, backup settings, notification delivery and MQTT, saving an action or alert rule with a webhook action, changing the AI agent's provider or endpoint (PUT /api/ai with a different provider or baseUrl), first-run setup and POST /api/auth/login are refused with a 403 whose code is remote_refused, however the path is capitalized and with or without a trailing slash; reading those settings is allowed, and so is saving the AI agent's other settings. API tokens are not accepted through remote access.

An administrator manages the key with POST /api/license/activate {"licenseKey": "EVR-…", "move": false}, POST /api/license/refresh, POST /api/license/deactivate and POST /api/license/import {"lease": …} (a lease file issued for this installation). Each answers the new license state. A key in use on another recorder is refused with code no-free-seat and holders; send "move": true to take it. These routes answer 409 on a recorder with no license.

A recorder with no internet connection is licensed by file: GET /api/license/request (administrator) answers a license request, this installation's id and public key signed with its own key, which the supplier turns into a lease file for POST /api/license/import. The state then carries offline: true, and leaseExpiresAt is when that file runs out.

A release uploaded by hand (POST /api/update/upload) must be one the license covers: one signed on or before updatesUntil, or signed as a security fix; an unlicensed or ended license accepts only security fixes. Anything else is a 400 whose error starts Rejected: and gives the reason.

A refusal is a 403 with a code:

  • license_feature, with feature, for a route or a settings save the license does not include. Saving settings for a feature that is already on, or switching one off, is never refused.
  • license_camera_limit when adding a camera (POST /api/discovery/rtsp or POST /api/discovery/{id}/adopt) would pass the licensed count. It is refused before any of the camera's sessions is used. POST /api/discovery/adopt-all lists each camera refused this way under failed, with the sentence as its error.

GET /api/investigation/search?mode=auto falls back to basic search when the license does not include investigation; mode=semantic is refused. In a semantic search by description each result carries strong: false for one well below the best match, which the Investigation page holds back, and coverage.strong counts the rest. A semantic search by reference picture marks every result strong; basic search results carry no strong.

Limits and conduct​

  • Live streams are capped per account; a client past the cap gets 429 with a sentence saying so. Recorded pulls — playback.mp4 and frame.jpg — share the account's playback slots.
  • Anything past the 120-second review window is an extraction: it needs the account's export permission and is audited (INSTALL.md).
  • A token bound to a temporary installer account cannot be minted.
  • Nothing here changes a camera's configuration, and the recorder never does. Its only writes to a camera are the audited ones above: PTZ, presets, a camera's deterrence outputs (a relay, light or siren switched on or off when an operator or a rule asks), and a camera's clock — its time, the recorder's time zone and the recorder as its NTP server — which the recorder also sets itself when clock-sync is on.