---
title: "card.setTarget: Change card target — Board kit command — Kition"
description: "Points an existing card at another workspace file or web address, keeping its place and size."
canonical: "https://developer.kition.ai/docs/kits/board/commands/card.setTarget"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/board/commands/card.setTarget](https://developer.kition.ai/docs/kits/board/commands/card.setTarget)

# card.setTarget

**Change card target.** Points an existing card at another workspace file or web address, keeping its place and size.

- Kit: Board 0.1.0 (.kboard); reference: [Board kit commands](https://developer.kition.ai/docs/kits/board.md)
- Changes the document: yes
- Acts on: `id` (one id), which a run step’s `on` fills

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `file` | `string` | no | A workspace file, relative to the board's folder or rooted with / |
| `id` | `string` | yes | The card |
| `kind` | `"note" \| "table" \| "board" \| "file" \| "link"` | no | The card's kind (from the file's extension when absent) |
| `title` | `string` | no | A link card's title |
| `url` | `string` | no | An http, https or mailto address (instead of file) |
| `view` | `object` | no | Where in the target: { heading: [...] }, { blockId }, { page } |

## Call through board_run

```text
board_run {
  "path": "<file>.kboard",
  "steps": [{ "command": "card.setTarget", "params": { "id": <string> } }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `file`, `kind`, `title`, `url`, `view`. board_run answers the step’s result in `completed[i].result`.

## Result

The kit gives no result schema for this command.

## Parameter schema

```json
{
  "additionalProperties": false,
  "properties": {
    "file": {
      "description": "A workspace file, relative to the board's folder or rooted with /",
      "type": "string",
      "x-khp-file": {
        "accept": [
          "md",
          "markdown",
          "ktable",
          "kboard"
        ],
        "access": "read"
      }
    },
    "id": {
      "description": "The card",
      "type": "string",
      "x-khp-types": [
        "Element"
      ]
    },
    "kind": {
      "description": "The card's kind (from the file's extension when absent)",
      "enum": [
        "note",
        "table",
        "board",
        "file",
        "link"
      ],
      "type": "string"
    },
    "title": {
      "description": "A link card's title",
      "type": "string"
    },
    "url": {
      "description": "An http, https or mailto address (instead of file)",
      "type": "string"
    },
    "view": {
      "additionalProperties": true,
      "description": "Where in the target: { heading: [...] }, { blockId }, { page }",
      "type": "object"
    }
  },
  "required": [
    "id"
  ],
  "type": "object"
}
```

Generated from the command list of @kition/board-darwin-arm64@0.1.0 and the kit itself (board_commands through @kition/cli@0.1.1, built from KitionAI/kition-board@e78c190).
