---
title: "PATCH /cameras/{cameraId}/io/ports/{portId}"
method: PATCH
path: "/cameras/{cameraId}/io/ports/{portId}"
tags: ["Cameras"]
---

# PATCH /cameras/{cameraId}/io/ports/{portId}

`PATCH /cameras/{cameraId}/io/ports/{portId}`

Update the port configuration. Allowed properties depends on the port type.

## Request body

- union
  - Port
    - `id` string — Unique ID for the port.
    - `enabled` boolean — If the port is not enabled, no events will be created, and the icon will not show up in the live stream.
    - `name` string — Human changeable name of the port, defaults to value of the id field.
    - `type` 'input' | 'output' — Denotes whether this is an input or output port.
    - `idleCircuitState` 'open' | 'closed' — Indicates the normal, inactive or idle, state of the connected circuit. Possible values: * `open`: means the port is "off" when in `idle` state (open circuit; has no voltage), and the port state being `active` means it is turned "on" (circuit is closed; has voltage). * `closed`: means the port is "on" when in `idle` state (closed circuit; has voltage), and the port state being active means it is turned "off" (open circuit; has no voltage).
    - `rules` PortRules
      - `recordOnActive` boolean — If this value is set to true, the port is an input and the device can record video, then the bridge should start recording when the port becomes active.
      - `icon` 'siren' | 'light' | 'dot' | 'door' | 'bell', nullable — If enabled, the given icon is shown for all livestreams of the camera and highlighted when the port is active. For ports of "output" type the icon can then also be clicked to change the state of the camera.
      - `iconEnabled` boolean — Inidicates if the icon should be visible on all livestreams.
  - PortOutputPatch
    - `id` string — Unique ID for the port.
    - `enabled` boolean — If the port is not enabled, no events will be created, and the icon will not show up in the live stream.
    - `name` string — Human changeable name of the port, defaults to value of the id field.
    - `type` 'input' | 'output' — Denotes whether this is an input or output port.
    - `idleCircuitState` 'open' | 'closed' — Indicates the normal, inactive or idle, state of the connected circuit. Possible values: * `open`: means the port is "off" when in `idle` state (open circuit; has no voltage), and the port state being `active` means it is turned "on" (circuit is closed; has voltage). * `closed`: means the port is "on" when in `idle` state (closed circuit; has voltage), and the port state being active means it is turned "off" (open circuit; has no voltage).
    - `rules` PortRules
      - `recordOnActive` boolean — If this value is set to true, the port is an input and the device can record video, then the bridge should start recording when the port becomes active.
      - `icon` 'siren' | 'light' | 'dot' | 'door' | 'bell', nullable — If enabled, the given icon is shown for all livestreams of the camera and highlighted when the port is active. For ports of "output" type the icon can then also be clicked to change the state of the camera.
      - `iconEnabled` boolean — Inidicates if the icon should be visible on all livestreams.
    - `status` PortStatusPatch
      - `state` 'active' | 'idle' — Set the state of the connected circuit.
      - `durationSeconds` integer — Number of seconds to hold the circuit in the given state. If not provided, the state will hold indefinitely.

## Response `204`

Port Updated

## Other responses

- `400` — The supplied object is invalid. Error detail will contain the validation error.
- `401` — You are not authenticated. Please authenticate and try again.
- `403` — You have no permission to access the specified resource.
- `404` — Referenced resource could not be found.
- `500` — Something went wrong in the server. Please try again.

---

[API](https://skmtc.net/eagleeyenetworks/apis/devices.md) · [All operations](https://skmtc.net/eagleeyenetworks/apis/devices/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/eagleeyenetworks/devices/versions/df57313de545/schema)
