# Opening methods: update, delete

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

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

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

### Opening.update
Changes the given properties of an Opening. [Verb page](/business/nouns/opening/update?interface=sdk).

```ts
interface OpeningVerbs {
  update(input: OpeningUpdateInput, options?: SB.CallOptions): SB.Call<Opening>
}
```

Emits `Opening.updated`.

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | The id of the Opening. |
| `role` | [Role](/business/nouns/role) | No | The Role the Human joins, by taking a share of it. |
| `kind` | `string` | No | One of `floor`, `contractor`, `employee`, or `cofounder`. |
| `reason` | `string` | No | One of `floor`, `credential`, `edge`, `relationship`, `capital`, `capacity`, or `distribution`. |
| `hypothesis` | [Hypothesis](/business/nouns/hypothesis) | No | The result a hire must beat the incumbent Agent on. |
| `skills` | list of [Skill](/business/nouns/skill) | No | The Skills required, each citing the Evidence that shows the gap. |
| `credentials` | list of [Credential](/business/nouns/credential) | No | The Credentials a Reserved Act in the Role requires. |
| `commitment` | `string` | No | Hours per week, from a few hours to full time. |
| `terms` | `url` | No | The published terms for this kind of Opening. |
| `listed` | `boolean` | No | True once the Opening is public; unlisted Openings reach only the talent pool. |

**Returns**

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

**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 opening = await $.Opening.update({ id: 'opening_3rD8qFSOyQ', role: 'role_oloMFMUeCH' })
```

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

```ts
interface OpeningVerbs {
  delete(input: OpeningDeleteInput, options?: SB.CallOptions): SB.Call<Opening>
}
```

Emits `Opening.deleted`.

**Inputs**

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

**Returns**

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

**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 opening = await $.Opening.delete({ id: 'opening_3rD8qFSOyQ' })
```