---
title: "Create Nvr"
method: POST
path: "/sites/{site_id}/nvrs"
tags: ["nvrs"]
---

# Create Nvr

`POST /sites/{site_id}/nvrs`

## Request

- Base URL: `https://api.verdun.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.verdun.ai/sites/{site_id}/nvrs`
- Auth: HTTP bearer

## Path parameters

- `site_id` string, required

## Request body

- CreateNvrRequest
  - `name` string, required: Display name for this NVR.
  - `kind` 'dw_spectrum' | 'milestone_xprotect' | 'hikvision'
  - `host` string, required: Hostname or IP of the NVR's media server (DW Spectrum / Nx), Open Network Bridge (Milestone XProtect), or ISAPI web server (Hikvision / LTS / HiLook).
  - `port` string, nullable: Control port Verdun connects to. Vendor-specific — omit to use the vendor default: 7001 for DW Spectrum / Nx (media server: REST API + RTSP relay), 580 for Milestone XProtect (Open Network Bridge ONVIF port; RTSP on 554 is discovered via GetStreamUri, not configured here), 80 for Hikvision / LTS / HiLook (ISAPI HTTP port; 443 and 8443 are treated as HTTPS).
  - `rtsp_port` string, nullable: Hikvision / LTS / HiLook only: the TCP port Verdun reaches the NVR's RTSP service on from outside the site (often 554; sites that port-forward may use another, e.g. 8554). Omit for 554. Ignored, and not stored, for other NVR kinds.
  - `username` string, required: NVR service-account username.
  - `password` string, required: NVR service-account password (stored in Secrets Manager only).

## Response `200`

Successful Response

- NvrResponse
  - `id` string, uuid, required: The NVR record ID.
  - `site_id` string, uuid, required: The site this NVR belongs to.
  - `name` string, required: Display name for this NVR.
  - `kind` 'dw_spectrum' | 'milestone_xprotect' | 'hikvision', required
  - `host` string, required: Hostname or IP of the NVR's media server (DW Spectrum / Nx), Open Network Bridge (Milestone XProtect), or ISAPI web server (Hikvision / LTS / HiLook).
  - `port` string, required: Control port Verdun connects to (7001 DW Spectrum / Nx media server, 580 Milestone Open Network Bridge ONVIF port, 80 Hikvision ISAPI HTTP port by default).
  - `rtsp_port` string, nullable: Hikvision / LTS / HiLook only: the RTSP port Verdun streams from (separate from `port`). Null for other NVR kinds.
  - `username` string, required: NVR service-account username (password is never returned).
  - `api_version` string, nullable: Protocol negotiated at last login: the Nx REST API version (`v3` / `v2`) for DW Spectrum / Nx, `onvif` for Milestone XProtect, or `isapi` for Hikvision.
  - `last_synced_at` string, date-time, nullable: Last successful device enumeration.

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/verdun/apis/verdun-api.md) - [All operations](https://skmtc.dev/verdun/apis/verdun-api/llms.txt) - [OpenAPI document](https://skmtc.dev/verdun/apis/verdun-api/revisions/35a2a6ebedda?raw)
