# Play methods: update, delete

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

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

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

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

```ts
interface PlayVerbs {
  update(input: PlayUpdateInput, options?: SB.CallOptions): SB.Call<Play>
}
```

Emits `Play.updated`.

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | The id of the Play. |
| `family` | `string` | No | The job it does, such as `demand`, `retention`, or `pricing`. |
| `cost` | `money` | No | What one run costs. |
| `cohort` | `json` | No | The Portfolio query a Studio rolls it out to. |
| `from` | `string` | No | Lineage: the slot it compiles from, as `Hypothesis#<slot>@v<version>`. |

**Returns**

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

**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 play = await $.Play.update({ id: 'play_hr4WTcrAyZ', family: 'demand' })
```

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

```ts
interface PlayVerbs {
  delete(input: PlayDeleteInput, options?: SB.CallOptions): SB.Call<Play>
}
```

Emits `Play.deleted`.

**Inputs**

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

**Returns**

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

**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 play = await $.Play.delete({ id: 'play_hr4WTcrAyZ' })
```