---
title: "Update Delegation"
method: PUT
path: "/api/delegations/{delegation_id}"
---

# Update Delegation

`PUT /api/delegations/{delegation_id}`

## Request

- Base URL: `https://api.kojiru.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.kojiru.com/api/delegations/{delegation_id}`
- Auth: HTTP bearer

Update an existing delegation's scope or status.

## Path parameters

- `delegation_id` string, required

## Request body

- DelegationUpdate
  - `scope` DelegationScope
    - `max_per_loan` number: Max KOJIRU per single loan
    - `max_per_day` number: Max total disbursement per day
    - `max_per_week` number: Max total disbursement per week
    - `max_total_pool` number: Total lending pool budget
    - `min_credit_score` integer: Minimum borrower credit score
    - `max_concurrent_loans` integer: Max active loans at once
    - `collateral_required` boolean: Require collateral for disbursement
    - `min_collateral_ratio` number: Min collateral-to-loan ratio (e.g. 1.2 = 120%)
    - `allowed_purposes` string[]: Restrict to specific loan purposes (empty = all)
    - `time_window_start` string, nullable: ISO datetime — delegation active from
    - `time_window_end` string, nullable: ISO datetime — delegation expires at
    - `auto_revoke_on_default` boolean: Revoke borrower access on default
  - `label` string, nullable
  - `status` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

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