---
title: "Activate relay output"
method: POST
path: "/v1/relays/{id}/outputs/{outputId}/activate"
tags: ["Relay information & management"]
---

# Activate relay output

`POST /v1/relays/{id}/outputs/{outputId}/activate`

## 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}/outputs/{outputId}/activate`
- Auth: none declared
- TypeScript: <https://skmtc.dev/ubiquiti/apis/unifi-protect-api/docs/v1/relays/:id/outputs/:outputId/activate/post.ts> (a function with typed inputs; its response is checked against the schema)

Control a relay output state. Use "state" to set a specific state (on/off), or omit to toggle. When state is "on", you can optionally provide "pulseDuration" to auto-turn off after the specified milliseconds.

## Path parameters

- `id` string, required: The primary key of relay
- `outputId` integer, required: Output channel ID (0 or 1)

## Request body

- object
  - `state` 'on' | 'off': Desired output state. If omitted, toggles the current state.
  - `pulseDuration` integer: Auto-off duration in milliseconds (only applies when state is "on"). If greater than 0, the output auto-turns off after the specified duration.

## Response `204`

The relay output activation was initiated successfully.

## Other responses

- `503`: The relay is offline or not reachable.
- `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)
