# Memory methods: update, delete

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

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

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

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

```ts
interface MemoryVerbs {
  update(input: MemoryUpdateInput, options?: SB.CallOptions): SB.Call<Memory>
}
```

Emits `Memory.updated`.

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | The id of the Memory. |
| `type` | list of [Noun](/business/nouns/noun) | No | The Nouns this Thing is an instance of. |
| `outside` | `json` | No | The ids this Thing has in outside tools, one per Integration, so a re-run matches instead of duplicating. |
| `query` | `json` | No | The saved query that defines a dynamic Collection. |

**Returns**

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

**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 memory = await $.Memory.update({ id: 'memory_Y52OcaSexq', type: ['noun_v0akLUrXCN'] })
```

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

```ts
interface MemoryVerbs {
  delete(input: MemoryDeleteInput, options?: SB.CallOptions): SB.Call<Memory>
}
```

Emits `Memory.deleted`.

**Inputs**

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

**Returns**

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

**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 memory = await $.Memory.delete({ id: 'memory_Y52OcaSexq' })
```