api docs

public endpoints for the capytoday collection

GET /api/todays-capy

Returns the capybara featured today, or null if none are available.

response

TodaysCapyData | null
{
  "name": "captain floof",
  "number": 42,
  "dateLabel": "Jun 4, 2026",
  "hp": 85,
  "type": "Water / Chill",
  "stats": [
    { "label": "FLOOF", "value": 80 },
    { "label": "CHILL", "value": 100 },
    { "label": "SWIM", "value": 60 },
    { "label": "SPEED", "value": 20 },
    { "label": "CUDDLE", "value": 100 }
  ],
  "flavor": "Just floats around being adorable all day long.",
  "imageUrl": "https://..."
}

example

fetch("/api/todays-capy")
GET /api/random-capy

Returns a random approved capybara submission. Read-only — does not mark it as used.

response

TodaysCapyData | null
{
  "name": "puddlecake",
  "number": 17,
  "dateLabel": "Mar 12, 2026",
  "hp": 72,
  "type": "Floof / Snoot",
  "stats": [
    { "label": "FLOOF", "value": 90 },
    { "label": "CHILL", "value": 75 },
    { "label": "SWIM", "value": 40 },
    { "label": "SPEED", "value": 30 },
    { "label": "CUDDLE", "value": 95 }
  ],
  "flavor": "Experts at looking unbothered. Masters of chill.",
  "imageUrl": "https://..."
}

example

fetch("/api/random-capy")
GET /api/calendar?year=2026&month=6

Returns all capybaras assigned to days in the given month. The keys are ISO date strings (YYYY-MM-DD).

query parameters

year number required 4-digit year
month number required 1–12

response

Record<string, TodaysCapyData>
{
  "2026-06-01": { "name": "...", "number": 152, ... },
  "2026-06-02": { "name": "...", "number": 153, ... }
}

example

fetch("/api/calendar?year=2026&month=6")

shared types

interface TodaysCapyData {
  name: string;
  number: number;
  dateLabel: string;
  hp: number;
  type: string;
  stats: { label: string; value: number }[];
  flavor: string;
  imageUrl: string;
}
type DailyCapyMap = Record<string, TodaysCapyData>;