<!-- XE-0707 · docs/api.md has no section at all for POST /lease/{hash}/renew · testnet -->
*Markdown view of <https://bounty.xe.network/XE-0707>. The page is the record; this is the same page for reading.*

XE-0707 · Bounty

# docs/api.md has no section at all for POST /lease/{hash}/renew

Triaging
claimed Minor
[xe#278](https://github.com/xeprotocol/xe/issues/278)
filed 2026-11-05 13:01 UTC
by rusdiwireng

Verdict
:   published when the fix ships

Tier
:   published when the fix ships

Claimed
:   Minor

Area
:   SDK / docs / web

Duplicate of
:   —

Tracked
:   —

Updated
:   2026-11-15 20:40 UTC

Told
:   2026-11-08 20:19 UTC

### Patches

- [xe#316](https://github.com/xeprotocol/xe/pull/316) open by arturbarszcz78
  docs(api): document POST /lease/{hash}/renew endpoint (fixes #278)

### History

- [290884](https://bounty.xe.network/log/290884) 2026-11-15 20:40 UTC proposal.adopted
- [290883](https://bounty.xe.network/log/290883) 2026-11-15 20:40 UTC ticket.award
- [290446](https://bounty.xe.network/log/290446) 2026-11-15 20:02 UTC proposal.created
- [61316](https://bounty.xe.network/log/61316) 2026-11-10 00:12 UTC patch.linked
- [43834](https://bounty.xe.network/log/43834) 2026-11-08 20:19 UTC github.labels
- [43812](https://bounty.xe.network/log/43812) 2026-11-08 20:19 UTC reply.mirrored
- [43627](https://bounty.xe.network/log/43627) 2026-11-08 20:18 UTC proposal.adopted
- [43626](https://bounty.xe.network/log/43626) 2026-11-08 20:18 UTC reply.sent
- [42198](https://bounty.xe.network/log/42198) 2026-11-08 20:18 UTC proposal.adopted
- [42197](https://bounty.xe.network/log/42197) 2026-11-08 20:18 UTC ticket.facts area
- [42196](https://bounty.xe.network/log/42196) 2026-11-08 20:18 UTC proposal.adopted
- [42195](https://bounty.xe.network/log/42195) 2026-11-08 20:18 UTC ticket.facts

[Full history](https://bounty.xe.network/log?ref=XE-0707) · [JSON](https://bounty.xe.network/v1/tickets/XE-0707) · [markdown](https://bounty.xe.network/XE-0707.md)

### Report

POST /lease/{hash}/renew exists in the code and has no documentation anywhere in docs/api.md. Not a wrong sentence. No section at all.

Severity: Minor. The program counts documentation errors as Minor, and this is a documentation gap, so Minor is the honest rating even though this is the strongest item in the set. No funds move because the document is silent, and the endpoint itself is operator-only behind an admin token.

Method: checked by reading api/vm.go and routes() in api/handler.go against docs/api.md and README.md at HEAD 9787859 plus merge 02e9641b0. No live node was used. The gap is a matter of searching the document, so no live probe is needed to confirm it.

## What the code does

handleLeaseRenew in api/vm.go is registered in routes() and guarded by requireAdmin. It takes a body of {"additional\_secs": N}, where N must be greater than 0, and returns 201 with renew\_hash, lease\_hash, cost, and duration. A zero or missing additional\_secs returns 400 "additional\_secs required", and an undecodable body returns 400 "invalid request body".

## What the document has

Nothing. A search for additional\_secs and renew\_hash across docs/ and README.md returns zero matches. docs/api.md has no section headed POST /lease/{hash}/renew. The endpoint appears in exactly two places, and neither describes it: one row in the endpoint index, and one line in the Auth conventions noting it is operator-only. The only place that describes how to call it is the CLI usage string, `xe lease renew <hash> <additional-seconds>` in cmd/xe/main.go.

The neighboring endpoint shows what is missing. POST /lease/request, right next to it in the same file, has a full section with a curl example, the request body, the 201 response, and the error list.

## Why this one is filed on its own

The other documentation corrections in this round are wrong sentences in docs/api.md, filed together as one bundle. This one is different in kind: a whole section is absent for an endpoint that extends a lease in place and moves escrow. Fixing it means writing a new section with the request shape, the response shape, and the errors, rather than editing one line. It is filed separately so its verdict does not ride on the bundle.

## Suggested fix

Add a section for POST /lease/{hash}/renew to docs/api.md, next to POST /lease/request, with the operator-only auth requirement, a curl example, the {"additional\_secs": N} request body, the 201 response fields renew\_hash, lease\_hash, cost, and duration, and the 400, 401, and 403 errors.

### Thread

**Joseph Denne**team2026-11-08 20:19 UTCgithub

Thanks for the report. We have confirmed the missing section and it is being written; we will update https://bounty.xe.network/XE-0707 when the change has landed.
