# Renewal programs: update, delete

URL: /code/mcp/renewal/records-update · Id: `page:code/mcp/renewal/records-update`

> The Renewal Verbs update, delete as MCP do programs, with inputs, result, refusals and an example.

Reference for [Renewal](/business/nouns/renewal), one group of [Renewal programs](/code/mcp/renewal).

### Renewal.update
Changes the given properties of a Renewal. [Verb page](/business/nouns/renewal/update?interface=mcp).

```text
do: return await $.Renewal.update(input)
```

Emits `Renewal.updated`.

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | The id of the Renewal. |
| `value` | `money` | No | What the Deal is worth if won. |
| `owner` | [Worker](/business/nouns/worker) | No | The Worker who runs it. |
| `closesOn` | `date` | No | The date the buyer expects to decide. |
| `nextStep` | `text` | No | The next dated step agreed with the buyer. |
| `termEndsAt` | `datetime` | No | When the current term ends, read from the Subscription. |
| `openedAt` | `datetime` | No | When it opened: by default 90 days before the term ends. |
| `usageReview` | `text` | No | Usage against each Entitlement over the term, written before any Quote. |
| `noticeSentAt` | `datetime` | No | When the renewal notice the legal floor requires went out, with the date, Price and cancel link. |
| `saveOffer` | `text` | No | The one save offer shown on cancel; it never blocks the cancel. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `renewal` | [Renewal](/business/nouns/renewal) | Yes | The Renewal. |

**Refuses when**

| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| The key is valid, but its scopes do not allow this operation. | [`forbidden`](/code/api/errors/forbidden) | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |

**Example**

```json
{
  "name": "do",
  "arguments": {
    "code": "return await $.Renewal.update({ id: 'renewal_NrJC9bDcII', termEndsAt: '2026-10-22T12:00:00Z' })"
  }
}
```

### Renewal.delete
Deletes a Renewal: a soft delete that keeps its history, undone by `Thing.restore`. [Verb page](/business/nouns/renewal/delete?interface=mcp).

```text
do: return await $.Renewal.delete(input)
```

Emits `Renewal.deleted`.

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | The id of the Renewal. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `renewal` | [Renewal](/business/nouns/renewal) | Yes | The Renewal. |

**Refuses when**

| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| The key is valid, but its scopes do not allow this operation. | [`forbidden`](/code/api/errors/forbidden) | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |

**Example**

```json
{
  "name": "do",
  "arguments": {
    "code": "return await $.Renewal.delete({ id: 'renewal_NrJC9bDcII' })"
  }
}
```