---
title: "[beta] Set an equipment digital output state"
method: PATCH
path: "/fleet/equipment/{id}/digital-output"
tags: ["Beta APIs"]
---

# \[beta\] Set an equipment digital output state

`PATCH /fleet/equipment/{id}/digital-output`

## Request

- Base URL: `https://api.samsara.com`
- URL: `https://api.samsara.com/fleet/equipment/{id}/digital-output`
- Auth: HTTP bearer

Set the state of a digital output on the gateway connected to a piece of powered equipment. The command is delivered to the device synchronously; a success response indicates the device acknowledged and applied the requested state. This requires an AG53 gateway connected to powered equipment via the CBL-AG-BEQP cable.

 <b>Rate limit:</b> 100 requests/min (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).

To use this endpoint, select **Write Equipment Output Control** under the Closed Beta category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
 

 **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.

## Path parameters

- `id` integer, required

## Request body

- EquipmentOutputControlSetEquipmentDigitalOutputRequestBody: A request to set the state of an equipment digital output.
  - `durationSeconds` integer: How long, in seconds, to hold the requested state before the device automatically reverts. Provide `0` (the default) to hold the state indefinitely. The maximum is 604800 seconds (7 days).
  - `pinId` integer, required: The digital output pin to control. Only pin `1` is currently supported.
  - `state` boolean, required: The desired output state. Provide `true` to energize the output, or `false` to de-energize it.

## Response `200`

OK response.

- EquipmentOutputControlSetEquipmentDigitalOutputResponseBody
  - `data` SetEquipmentDigitalOutputDataResponseBody, required: The digital output state that was successfully applied to the device.
    - `durationSeconds` integer, required: The duration, in seconds, the state will be held. `0` means indefinitely.
    - `id` integer, required: The Samsara ID of the gateway whose digital output was controlled.
    - `pinId` integer, required: The digital output pin that was controlled.
    - `state` boolean, required: The output state that was applied.

## Other responses

- `401`: Unauthorized response.
- `404`: Not Found response.
- `405`: Method Not Allowed response.
- `413`: Content Too Large response.
- `429`: Too Many Requests response.
- `500`: Internal Server Error response.
- `501`: Not Implemented response.
- `502`: Bad Gateway response.
- `503`: Service Unavailable response.
- `504`: Gateway Timeout response.
- `default`: Bad Request response.

---

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