# Comment methods: update, delete

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

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

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

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

```ts
interface CommentVerbs {
  update(input: CommentUpdateInput, options?: SB.CallOptions): SB.Call<Comment>
}
```

Emits `Comment.updated`.

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | The id of the Comment. |
| `body` | `text` | No | What it says. |

**Returns**

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

**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 comment = await $.Comment.update({ id: 'comment_MUIgpgdysq', body: 'Example body' })
```

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

```ts
interface CommentVerbs {
  delete(input: CommentDeleteInput, options?: SB.CallOptions): SB.Call<Comment>
}
```

Emits `Comment.deleted`.

**Inputs**

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

**Returns**

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

**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 comment = await $.Comment.delete({ id: 'comment_MUIgpgdysq' })
```