---
title: "PUT /valve/setDefaultRuntime"
method: PUT
path: "/valve/setDefaultRuntime"
tags: ["ValveService"]
---

# PUT /valve/setDefaultRuntime

`PUT /valve/setDefaultRuntime`

Update the default runtime for a valve which is used when the button is manually pressed.

## Request body

- SetDefaultRuntimeRequest
  - `valveId` string
  - `defaultRuntimeSeconds` integer

## Response `200`

OK

- SetDefaultRuntimeResponse
  - `valve` Valve
    - `id` string
    - `name` string
    - `connectionId` string — internal ID to identify the valve and base station bond
    - `photo` Photo
      - `id` string
      - `default` boolean — true if this is actually the default valve photo
    - `state` ValveState — Valves are async devices. The state contains the desired changes as well as then current state of the device.
      - `reportedState` ValveReportedState — The current state of the valve
        - `connected` boolean
        - `defaultRuntimeSeconds` integer
        - `lastWateringAction` WateringAction
          - `start` string, date-time
          - `durationSeconds` integer
          - `reason` 'QUICK_RUN' | 'BUTTON_PRESS' | 'PROGRAM', enum
          - `programId` string — Only present if the valve is open due to a program.
          - `flowDetected` boolean
        - `lastSeen` string, date-time
        - `batteryStatus` 'GOOD' | 'REPLACE' | 'LOW' | 'UNKNOWN', enum
        - `firmwareVersion` string
        - `calendarHash` string — An internal representation of the valve calendar data. This changes when programs or skips are adjusted
      - `desiredState` ValveDesiredState — The desired values for the valve to sync
        - `defaultRuntimeSeconds` integer
        - `calendarHash` string — An internal representation of the valve calendar data. This changes when programs or skips are adjusted
      - `matches` boolean — True if the reported state matches all desired changes. Note that if these are out of sync (matches = false) then you should wait until the physical valve has time to sync (matches = true) before modifying programs
    - `color` 'LIGHT_BLUE' | 'PURPLE' | 'GREEN' | 'ORANGE' | 'TEAL' | 'YELLOW' | 'BLUE' | 'PINK', enum
    - `detectFlow` boolean
    - `created` string, date-time
    - `updated` string, date-time

---

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