# Lead methods: update, delete

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

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

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

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

```ts
interface LeadVerbs {
  update(input: LeadUpdateInput, options?: SB.CallOptions): SB.Call<Lead>
}
```

Emits `Lead.updated`.

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | The id of the Lead. |
| `email` | `email` | No | The primary email address. |
| `phone` | `string` | No | The primary phone number. |
| `name` | `string` | No | The name the Contact goes by. |
| `interest` | `text` | No | What the Lead asked for. |
| `owner` | [Worker](/business/nouns/worker) | No | The Worker who answers it. |

**Returns**

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

**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 lead = await $.Lead.update({ id: 'lead_Kz1R9fhqzZ', owner: 'worker_whZFpOKWIV' })
```

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

```ts
interface LeadVerbs {
  delete(input: LeadDeleteInput, options?: SB.CallOptions): SB.Call<Lead>
}
```

Emits `Lead.deleted`.

**Inputs**

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

**Returns**

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

**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 lead = await $.Lead.delete({ id: 'lead_Kz1R9fhqzZ' })
```