---
title: "Give the lease back"
method: DELETE
path: "/api/assistant/tasks/{id}/lease"
tags: ["Mailzero Assistant"]
---

# Give the lease back

`DELETE /api/assistant/tasks/{id}/lease`

## Request

- Base URL: `https://domani.run`
- URL: `https://domani.run/api/assistant/tasks/{id}/lease`
- Auth: HTTP bearer

Releases the lease the caller holds; a lease held by another assignee is left alone. Requires `assistant:write`.

## Path parameters

- `id` string, required

## Response `200`

Released, or who still holds it

- object
  - `task_id` string, required
  - `released` boolean, required
  - `lease` AssistantTaskLease
    - `holder` string, required: agent:<slug>, member:<id> or user:<id>
    - `expires_at` string, date-time, required

## Other responses

- `401`: Missing or invalid API key
- `404`: No such task in the caller's scope
- `429`: Rate limit exceeded - wait and retry

---

[API](https://skmtc.dev/domani/apis/domani-run-api.md) · [All operations](https://skmtc.dev/domani/apis/domani-run-api/llms.txt) · [OpenAPI document](https://skmtc.dev/domani/apis/domani-run-api/revisions/7679f8159533?raw)
