> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chatgrid.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Node

> Creates a new node on a board. Nodes represent content on the canvas -- YouTube videos, websites, PDFs, notes, and more.

<RequestExample>
  ```bash YouTube video theme={null}
  curl -X POST "https://api.chatgrid.ai/v1/boards/{boardId}/nodes" \
    -H "Authorization: Bearer cgk_live_..." \
    -H "Content-Type: application/json" \
    -d '{
      "type": "youtube",
      "position": { "x": 0, "y": 0 },
      "data": {
        "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
        "label": "Rick Astley - Never Gonna Give You Up"
      }
    }'
  ```

  ```bash Website URL theme={null}
  curl -X POST "https://api.chatgrid.ai/v1/boards/{boardId}/nodes" \
    -H "Authorization: Bearer cgk_live_..." \
    -H "Content-Type: application/json" \
    -d '{
      "type": "url",
      "position": { "x": 400, "y": 0 },
      "data": {
        "url": "https://vercel.com/blog/ai-sdk-4-2",
        "label": "Vercel AI SDK 4.2"
      }
    }'
  ```

  ```bash Sticky note theme={null}
  curl -X POST "https://api.chatgrid.ai/v1/boards/{boardId}/nodes" \
    -H "Authorization: Bearer cgk_live_..." \
    -H "Content-Type: application/json" \
    -d '{
      "type": "note",
      "position": { "x": 0, "y": 300 },
      "data": {
        "text": "We decided to use Stripe webhooks with signing secret verification.",
        "label": "Architecture Decision"
      }
    }'
  ```

  ```bash PDF (after uploading via /assets) theme={null}
  curl -X POST "https://api.chatgrid.ai/v1/boards/{boardId}/nodes" \
    -H "Authorization: Bearer cgk_live_..." \
    -H "Content-Type: application/json" \
    -d '{
      "type": "pdf",
      "position": { "x": 400, "y": 300 },
      "data": {
        "storagePath": "usr_123/brd_456/1711843260000-spec.pdf",
        "publicUrl": "https://storage.chatgrid.ai/board-files/usr_123/brd_456/1711843260000-spec.pdf",
        "fileSize": 245760,
        "label": "API Specification"
      }
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={null}
  {
    "object": "node",
    "data": {
      "id": "e5f6a7b8-c9d0-1234-efab-345678901234",
      "node_type": "youtube",
      "position_x": 0,
      "position_y": 0,
      "node_data": {
        "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
        "label": "Rick Astley - Never Gonna Give You Up"
      },
      "parent_node_id": null,
      "created_at": "2026-03-15T10:31:00.000Z",
      "updated_at": "2026-03-15T10:31:00.000Z"
    }
  }
  ```
</ResponseExample>

<Note>
  Common API node types are `youtube`, `url`, `note`, `document`, `pdf`, and
  `image`. ChatGrid maps these API types to the right canvas components when it
  renders the board.
</Note>

<Note>
  Creating a node stores the visual/source record on the board. It does not
  ingest or vectorize external content by itself. To make text searchable, call
  [Vectorize Content](/api-reference/documents/vectorize) with the extracted
  text and, when useful, the returned node ID as `node_id`.
</Note>

<Note>
  **For PDFs and images,** upload the file first with [Upload Asset](/api-reference/assets/upload-asset), then create the node with the returned `url` as `publicUrl` and `storagePath`.
</Note>
