---
title: "link.update: Change a link — Note kit command — Kition"
description: "Changes the destination (and the text, when given) of the `index`-th link on `line`, as `links.list` numbers them; nothing else of the link changes."
canonical: "https://developer.kition.ai/docs/kits/note/commands/link.update"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/note/commands/link.update](https://developer.kition.ai/docs/kits/note/commands/link.update)

# link.update

**Change a link.** Changes the destination (and the text, when given) of the `index`-th link on `line`, as `links.list` numbers them; nothing else of the link changes.

- Kit: Note 0.3.0 (Markdown (.md)); reference: [Note kit commands](https://developer.kition.ai/docs/kits/note.md)
- Changes the document: yes

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `destination` | `string` | yes | The new destination. |
| `index` | `integer` | yes | Which link of the line, from 0. |
| `line` | `integer` | yes | The link's line, from 1. |
| `text` | `string` | no | The new text shown. |

## Call through note_run

```text
note_run {
  "path": "<file>.md",
  "steps": [{ "command": "link.update", "params": { "destination": <string>, "index": <integer>, "line": <integer> } }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `text`. note_run answers the step’s result in `completed[i].result`.

## Result

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `changed` | `boolean` | yes | Whether the note's text changed (false when it already read so). |

```json
{
  "additionalProperties": false,
  "properties": {
    "changed": {
      "description": "Whether the note's text changed (false when it already read so).",
      "type": "boolean"
    }
  },
  "required": [
    "changed"
  ],
  "type": "object"
}
```

## Parameter schema

```json
{
  "additionalProperties": false,
  "properties": {
    "destination": {
      "description": "The new destination.",
      "type": "string"
    },
    "index": {
      "description": "Which link of the line, from 0.",
      "type": "integer"
    },
    "line": {
      "description": "The link's line, from 1.",
      "type": "integer"
    },
    "text": {
      "description": "The new text shown.",
      "type": "string"
    }
  },
  "required": [
    "destination",
    "index",
    "line"
  ],
  "type": "object"
}
```

Generated from kition-sdk packages/script/kits/note.ts and the kit itself (kition-note@69e14d9).
