{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/planka/main/json-schema/planka-card-schema.json",
  "title": "Card",
  "x-generated": "2026-10-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/planka-openapi.json#/components/schemas/Card",
  "type": "object",
  "required": [
    "id",
    "boardId",
    "listId",
    "creatorUserId",
    "prevListId",
    "coverAttachmentId",
    "type",
    "position",
    "name",
    "description",
    "dueDate",
    "isDueCompleted",
    "stopwatch",
    "commentsTotal",
    "isClosed",
    "listChangedAt",
    "createdAt",
    "updatedAt"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique identifier for the card"
    },
    "boardId": {
      "type": "string",
      "description": "ID of the board the card belongs to (denormalized)"
    },
    "listId": {
      "type": "string",
      "description": "ID of the list the card belongs to"
    },
    "creatorUserId": {
      "type": [
        "string",
        "null"
      ],
      "description": "ID of the user who created the card"
    },
    "prevListId": {
      "type": [
        "string",
        "null"
      ],
      "description": "ID of the previous list the card was in (available when in archive or trash)"
    },
    "coverAttachmentId": {
      "type": [
        "string",
        "null"
      ],
      "description": "ID of the attachment used as cover"
    },
    "type": {
      "type": "string",
      "enum": [
        "project",
        "story"
      ],
      "description": "Type of the card"
    },
    "position": {
      "type": [
        "number",
        "null"
      ],
      "description": "Position of the card within the list"
    },
    "name": {
      "type": "string",
      "description": "Name/title of the card"
    },
    "description": {
      "type": [
        "string",
        "null"
      ],
      "description": "Detailed description of the card"
    },
    "dueDate": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "Due date for the card"
    },
    "isDueCompleted": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "Whether the due date is completed"
    },
    "stopwatch": {
      "type": [
        "object",
        "null"
      ],
      "required": [
        "startedAt",
        "total"
      ],
      "description": "Stopwatch data for time tracking",
      "properties": {
        "startedAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the stopwatch was started"
        },
        "total": {
          "type": "number",
          "description": "Total time in seconds"
        }
      }
    },
    "commentsTotal": {
      "type": "number",
      "default": 0,
      "description": "Total number of comments on the card"
    },
    "isClosed": {
      "type": "boolean",
      "default": false,
      "description": "Whether the card is closed"
    },
    "listChangedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "When the card was last moved between lists"
    },
    "createdAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "When the card was created"
    },
    "updatedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "When the card was last updated"
    }
  }
}