# Policy methods: update, delete

URL: /code/sdk/policy/records-update · Id: `page:code/sdk/policy/records-update`

> The Policy Verbs update, delete as typed SDK methods, with inputs, result, refusals and an example.

Reference for [Policy](/business/nouns/policy), one group of [Policy methods](/code/sdk/policy).

### Policy.update
Changes the given properties of a Policy. [Verb page](/business/nouns/policy/update?interface=sdk).

```ts
interface PolicyVerbs {
  update(input: PolicyUpdateInput, options?: SB.CallOptions): SB.Call<Policy>
}
```

Emits `Policy.updated`.

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | The id of the Policy. |
| `rule` | `text` | No | The ruling, stated so code can apply it. |

**Returns**

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

**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**

```ts
import { $ } from 'startup-builder'

const policy = await $.Policy.update({ id: 'policy_rTYxr62HGB', rule: 'Example rule' })
```

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

```ts
interface PolicyVerbs {
  delete(input: PolicyDeleteInput, options?: SB.CallOptions): SB.Call<Policy>
}
```

Emits `Policy.deleted`.

**Inputs**

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

**Returns**

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

**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**

```ts
import { $ } from 'startup-builder'

const policy = await $.Policy.delete({ id: 'policy_rTYxr62HGB' })
```