# Organization methods: update, delete

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

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

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

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

```ts
interface OrganizationVerbs {
  update(input: OrganizationUpdateInput, options?: SB.CallOptions): SB.Call<Organization>
}
```

Emits `Organization.updated`.

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | The id of the Organization. |
| `name` | `string` | No | The name it trades under. |
| `hostname` | `string` | No | The web domain that keys it. |

**Returns**

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

**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 organization = await $.Organization.update({ id: 'organization_v0SkRLrXCN', name: 'Leaseline' })
```

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

```ts
interface OrganizationVerbs {
  delete(input: OrganizationDeleteInput, options?: SB.CallOptions): SB.Call<Organization>
}
```

Emits `Organization.deleted`.

**Inputs**

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

**Returns**

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

**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 organization = await $.Organization.delete({ id: 'organization_v0SkRLrXCN' })
```