---
title: "card.add: Card — Board kit command — Kition"
description: "Places a card that links to a workspace file (note, table, board or any file) or a web address; the card shows the target's title and opens it."
canonical: "https://developer.kition.ai/docs/kits/board/commands/card.add"
---

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

# card.add

**Card.** Places a card that links to a workspace file (note, table, board or any file) or a web address; the card shows the target's title and opens it.

- Kit: Board 0.1.0 (.kboard); reference: [Board kit commands](https://developer.kition.ai/docs/kits/board.md)
- Changes the document: yes

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `caption` | `string` | no | A caption under the card |
| `file` | `string` | no | A workspace file, relative to the board's folder or rooted with / |
| `kind` | `"note" \| "table" \| "board" \| "file" \| "link"` | no | The card's kind (from the file's extension when absent) |
| `page` | `string` | no | The page's id; the shown page when absent |
| `position` | `number[] \| object` | no | [x, y]; right of the content when absent |
| `size` | `number[] \| object` | no | [w, h]; 320 × 200 by default |
| `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.add" }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `caption`, `file`, `kind`, `page`, `position`, `size`, `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": {
    "caption": {
      "description": "A caption under the card",
      "type": "string"
    },
    "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"
      }
    },
    "kind": {
      "description": "The card's kind (from the file's extension when absent)",
      "enum": [
        "note",
        "table",
        "board",
        "file",
        "link"
      ],
      "type": "string"
    },
    "page": {
      "description": "The page's id; the shown page when absent",
      "type": "string",
      "x-khp-types": [
        "Page"
      ]
    },
    "position": {
      "description": "[x, y]; right of the content when absent",
      "oneOf": [
        {
          "items": {
            "description": "One component",
            "maximum": 1000000,
            "minimum": -1000000,
            "type": "number"
          },
          "type": "array"
        },
        {
          "additionalProperties": false,
          "properties": {
            "x": {
              "description": "One component",
              "maximum": 1000000,
              "minimum": -1000000,
              "type": "number"
            },
            "y": {
              "description": "One component",
              "maximum": 1000000,
              "minimum": -1000000,
              "type": "number"
            }
          },
          "required": [
            "x",
            "y"
          ],
          "type": "object"
        }
      ]
    },
    "size": {
      "description": "[w, h]; 320 × 200 by default",
      "oneOf": [
        {
          "items": {
            "description": "One component",
            "maximum": 100000,
            "minimum": 0,
            "type": "number"
          },
          "type": "array"
        },
        {
          "additionalProperties": false,
          "properties": {
            "h": {
              "description": "One component",
              "maximum": 100000,
              "minimum": 0,
              "type": "number"
            },
            "w": {
              "description": "One component",
              "maximum": 100000,
              "minimum": 0,
              "type": "number"
            }
          },
          "required": [
            "h",
            "w"
          ],
          "type": "object"
        }
      ]
    },
    "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"
    }
  },
  "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).
