---
title: "Patch relay settings"
method: PATCH
path: "/v1/relays/{id}"
tags: ["Relay information & management"]
---

# Patch relay settings

`PATCH /v1/relays/{id}`

## Request

- Base URL: `https://api.ui.com/v1/connector/consoles/942A6FF664C0000000000964970E0000000009E710560000000068A9873F:9999999999/proxy/protect/integration`
- URL: `https://api.ui.com/v1/connector/consoles/942A6FF664C0000000000964970E0000000009E710560000000068A9873F:9999999999/proxy/protect/integration/v1/relays/{id}`
- Auth: none declared
- TypeScript: <https://skmtc.dev/ubiquiti/apis/unifi-protect-api/docs/v1/relays/:id/patch.ts> (a function with typed inputs; its response is checked against the schema)

Patch the settings for a specific relay

## Path parameters

- `id` string, required: The primary key of relay

## Request body

- object
  - `name` string: The name of the device.
  - `ledSettings` object: Status LED settings.
    - `isEnabled` boolean: Enable status LED.

## Response `200`

Success response

- Relay
  - `id` string, required: The primary key of relay
  - `modelKey` 'relay', required: The model key of the relay
  - `state` 'CONNECTED' | 'CONNECTING' | 'DISCONNECTED', required: Connection state of the device.
  - `name` string, required: The name of the device.
  - `mac` string, required: The primary MAC address of the device.
  - `ledSettings` RelayLedSettings, required: Status LED settings.
    - `isEnabled` boolean, required: Enable status LED.
  - `outputs` RelayOutput[], required
    - `id` number, required: The channel index of the relay output.
    - `name` string, nullable, required: User-friendly name for this relay output.
    - `type` 'garageDoor' | 'gate' | 'valve' | 'siren' | 'custom', nullable, required: The type of device connected to this relay output.
    - `delay` number, nullable, required: Server-side delay in milliseconds before activation (0 = no delay, null = use default).
    - `pulseDuration` number, nullable, required: Auto-off duration in milliseconds (0 = permanent on until manually turned off, null = use default).
    - `state` 'on' | 'off' | 'offOtp', nullable, required: The current state of the relay output.
    - `rebootState` 'restore' | 'on' | 'off', required: The state the relay output should be set to after a reboot/power cycle.
  - `inputs` RelayInput[], required
    - `id` number, required: The channel index of the relay input.
    - `name` string, nullable, required: User-friendly name for this relay input.
    - `state` 'on' | 'off', nullable, required: The current state of the relay input.
    - `actionTrigger` 'switchedOn' | 'switchedOff', nullable, required: The trigger event that activates the action.
    - `actionType` 'setOutputOn' | 'setOutputOff' | 'toggleOutput' | 'followInput', nullable, required: The type of action to perform when triggered.
    - `actionOutputId` number, nullable, required: The index of the output to control when triggered.
  - `wirelessConnectionState` WirelessConnectionState, required: Wireless connection state including signal quality, battery status, and bridge connection.
    - `signalState` SignalState, required: Signal state.
      - `signalQuality` number, nullable, required: Percent representation of Bluetooth signal strength.
      - `signalStrength` number, nullable, required: dBm value of Bluetooth signal strength.
    - `batteryStatus` WirelessBatteryStatus, required: Battery status.
      - `percentage` number, nullable, required: Battery charge level from 0 to 100 (%).
      - `isLow` boolean, required: Low battery charge level flag.
    - `bridge` string, required: The primary key of bridge

## Other responses

- `default`: Error response

---

[API](https://skmtc.dev/ubiquiti/apis/unifi-protect-api.md) - [All operations](https://skmtc.dev/ubiquiti/apis/unifi-protect-api/llms.txt) - [OpenAPI document](https://skmtc.dev/ubiquiti/apis/unifi-protect-api/revisions/e341e1381db1?raw)
