---
title: "Prepare a leased update drain"
method: POST
path: "/api/update/prepare"
tags: ["daemon"]
---

# Prepare a leased update drain

`POST /api/update/prepare`

## Request body

- UpdateDrainRequestBody
  - `$schema` string, uri — A URL to the JSON Schema for this object.
  - `owner_id` string, required
  - `policy` 'wait' | 'interrupt' | 'abort', required

## Response `200`

OK

- UpdateDrainStatus
  - `$schema` string, uri — A URL to the JSON Schema for this object.
  - `active_workers` integer, required
  - `expires_at` string, date-time, required
  - `lease_token` string
  - `policy` string, required
  - `recovering` boolean, required
  - `running_jobs` integer, required
  - `targeted_running_jobs` integer, required

## Other responses

- `409` — Update drain conflict

## Changes

- **2026-08-18** `aac54d170bae` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/kenn-io/apis/roborev/changes/api/update/prepare/post.md)

---

[API](https://skmtc.dev/kenn-io/apis/roborev.md) · [All operations](https://skmtc.dev/kenn-io/apis/roborev/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/kenn-io/roborev/revisions/0dfdca81e88d/schema)
