Renewal routes: update, delete
The Renewal Verbs update, delete as api.sb routes, with inputs, result, refusals and an example.
Reference for Renewal, one group of Renewal routes.
Renewal.update
Changes the given properties of a Renewal. Verb page.
PATCH /{namespace}/ renewals/ {id}Path: id. Body, as JSON: the other inputs. Emits Renewal.updated.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Renewal. |
value | money | What the Deal is worth if won. | |
owner | Worker | The Worker who runs it. | |
closesOn | date | The date the buyer expects to decide. | |
nextStep | text | The next dated step agreed with the buyer. | |
termEndsAt | datetime | When the current term ends, read from the Subscription. | |
openedAt | datetime | When it opened: by default 90 days before the term ends. | |
usageReview | text | Usage against each Entitlement over the term, written before any Quote. | |
noticeSentAt | datetime | When the renewal notice the legal floor requires went out, with the date, Price and cancel link. | |
saveOffer | text | The one save offer shown on cancel; it never blocks the cancel. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
renewal | Renewal | required | The Renewal. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
Example
curl -X PATCH https: //api.sb/ leaseline.app/ renewals/ renewal_NrJC9bDcII \
-H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
-H "Content-Type: application/ json" \
-d '{"termEndsAt": "2026-10-22T12: 00: 00Z"}'{
"api": "https: //api.sb/ leaseline.app",
"renewal": {
"$id": "https: //api.sb/ leaseline.app/ renewals/ renewal_NrJC9bDcII",
"$type": "Renewal",
"status": "Open",
"termEndsAt": "2026-10-22T12: 00: 00Z",
"openedAt": "2026-10-22T12: 00: 00Z"
},
"action": {
"$id": "https: //api.sb/ leaseline.app/ actions/ act_br07HsG8MG",
"operation": "Renewal.update",
"status": "done"
},
"links": {
"self": "https: //api.sb/ leaseline.app/ actions/ act_br07HsG8MG"
}
}Renewal.delete
Deletes a Renewal: a soft delete that keeps its history, undone by Thing.restore. Verb page.
DELETE /{namespace}/ renewals/ {id}Path: id. Emits Renewal.deleted.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Renewal. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
renewal | Renewal | required | The Renewal. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
Example
curl -X DELETE https: //api.sb/ leaseline.app/ renewals/ renewal_NrJC9bDcII \
-H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"{
"api": "https: //api.sb/ leaseline.app",
"renewal": {
"$id": "https: //api.sb/ leaseline.app/ renewals/ renewal_NrJC9bDcII",
"$type": "Renewal",
"status": "Open",
"termEndsAt": "2026-10-22T12: 00: 00Z",
"openedAt": "2026-10-22T12: 00: 00Z"
},
"action": {
"$id": "https: //api.sb/ leaseline.app/ actions/ act_br07HsG8MG",
"operation": "Renewal.delete",
"status": "done"
},
"links": {
"self": "https: //api.sb/ leaseline.app/ actions/ act_br07HsG8MG"
}
}