Cards

The cards of one area, in their order.

GET /api/data/cards

Parameters

NameTypeRequiredDescription
areaIdintegeryesThe area whose cards you want.
curl -X GET "https://boards.example.com/api/data/cards?areaId=10" \
  -H "X-API-Key: $LOKALBOARDS_KEY"
const response = await fetch("https://boards.example.com/api/data/cards?areaId=10", {
  headers: {
    "X-API-Key": apiKey,
  },
});

if (!response.ok) throw new Error(await response.text());

const data = await response.json();
<script setup>
const config = useRuntimeConfig();

const { data, error } = await useAsyncData("cards", () =>
  $fetch("https://boards.example.com/api/data/cards?areaId=10", {
    headers: { "X-API-Key": config.lokalBoardsKey },
  }),
);
</script>

<template>
  <pre v-if="data">{{ data }}</pre>
  <p v-else-if="error">{{ error.message }}</p>
</template>
import { useEffect, useState } from "react";

export function Example({ apiKey }) {
  const [data, setData] = useState(null);

  useEffect(() => {
    const controller = new AbortController();

    fetch("https://boards.example.com/api/data/cards?areaId=10", {
      headers: { "X-API-Key": apiKey },
      signal: controller.signal,
    })
      .then((response) => response.json())
      .then(setData)
      .catch((error) => {
        if (error.name !== "AbortError") console.error(error);
      });

    return () => controller.abort();
  }, [apiKey]);

  return <pre>{JSON.stringify(data, null, 2)}</pre>;
}
<?php

$ch = curl_init('https://boards.example.com/api/data/cards?areaId=10');

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'X-API-Key: ' . $apiKey,
]);

$response = json_decode(curl_exec($ch), true);
curl_close($ch);

Response

{
  "cards": [
    {
      "id": 501,
      "area": 10,
      "name": "Redesign the logo",
      "content": "Refresh the brand mark for the 2.0 launch.",
      "status": 0,
      "sort": 0,
      "dueDate": "2026-08-21T19:31:00.000Z",
      "repeatEvery": null,
      "assignees": [
        {
          "id": "8f3c1e2a-5b7d-4a91-9c8e-2d6f0b4a7e13",
          "name": "Anna",
          "image": null,
          "type": "human"
        }
      ],
      "assignee": "8f3c1e2a-5b7d-4a91-9c8e-2d6f0b4a7e13",
      "assigneeName": "Anna"
    }
  ]
}

assignees is everyone on the card, in the order they were put on it — a card can be on several people. assignee, assigneeName, assigneeImage and assigneeType describe the first of them, as they did before, so an integration that only knows one person per card keeps reading a sensible answer. ?assignee=<id> finds a card by any one of its people, and ?unassigned=true finds cards nobody is on.

status is 0 for open and 1 for done. content is Markdown — a - [ ] line in it is a checklist item, and the counts on the card's tile come from those. See Cards.