# AnnotationsApi.reply()

```ts
reply(id: string, reply: NewReply, options?: SignedDocumentOptions): Promise<string>
```

Writes a reply to the comment with that id. Edit a reply with `update(…, { contents })`, remove it with `delete()`. Needs the `annotations` feature.

- Kind: method
- Since: 1.0.0

| Parameter | Type | Description |
| --- | --- | --- |
| `id` | `string` | The comment's id. |
| `reply` | `NewReply` | `{ contents, author? }`; `author` omitted is `''`. |
| `options?` | `SignedDocumentOptions` | `{ invalidateSignatures? }`. |

Returns `Promise<string>`: The reply's id.

Throws:

- `INVALID_ARGUMENT` — an id no annotation has, the annotation is not a comment (a link, a form field, a pop-up, a status entry), or `contents` is empty.
- `PAGE_ERROR` — the reply could not be written.
- `FEATURE_NOT_LICENSED` — the license lacks `annotations`.
- `DOCUMENT_CLOSED` — the document has been closed.
- `INVALID_STATE` — a certified document whose certification forbids it, unless `options.invalidateSignatures`; or a progressive document still downloading.

```ts
const replyId = await doc.annotations.reply(id, { contents: 'Agreed', author: 'Ann' });
```

Part of [AnnotationsApi](https://kernstra.com/docs/web-sdk/api/doc-annotations) in the Kernstra Web SDK 1.0.0 API reference.

Web page: https://kernstra.com/docs/web-sdk/api/doc-annotations/reply
