{
  "name": "Tweetington API",
  "version": "1.0.0",
  "description": "Build and resolve \"boards\" of tweets for the Tweetington multi-view. A board is stateless: it is just an ordered list of tweet ids carried in the URL (?ids=20,123,456). No auth, no database. Tweet metadata is resolved server-side via Twitter's public syndication endpoint (no API key).",
  "conventions": {
    "ids": "Comma/space separated. Accepts bare numeric ids OR full tweet URLs (twitter.com or x.com).",
    "board": "A board is fully described by its ids. To \"save\" a board, keep its url.",
    "cors": "All endpoints send Access-Control-Allow-Origin: *",
    "responses": "JSON. Errors look like { \"error\": \"...\" } with an appropriate status code."
  },
  "endpoints": [
    {
      "method": "GET",
      "path": "/api",
      "desc": "This documentation."
    },
    {
      "method": "GET",
      "path": "/api/health",
      "desc": "Liveness check."
    },
    {
      "method": "GET",
      "path": "/api/skill",
      "desc": "The Tweetington agent skill (SKILL.md). Add ?format=json for metadata + install command.",
      "example": "https://tweetington.vercel.app/api/skill"
    },
    {
      "method": "GET",
      "path": "/api/tweet/{id}",
      "desc": "Resolve one tweet to the Tweetington spec (author, text, metrics, media).",
      "example": "https://tweetington.vercel.app/api/tweet/20"
    },
    {
      "method": "GET|POST",
      "path": "/api/board?ids=20,123",
      "desc": "Resolve a board. Returns the openable board url + each tweet resolved. POST body: {\"ids\":[...]}. Add resolve=0 to skip metadata.",
      "example": "https://tweetington.vercel.app/api/board?ids=20,1985900138598895616"
    },
    {
      "method": "GET|POST",
      "path": "/api/add?ids=123&board=20,99",
      "desc": "Append ids to an (optional) existing board; returns the new board url. Use redirect=1 to 302 straight to the live board.",
      "example": "https://tweetington.vercel.app/api/add?ids=20&redirect=1"
    },
    {
      "method": "GET|POST",
      "path": "/api/remove?ids=99&board=20,99,123",
      "desc": "Remove ids from a board; returns the new board url.",
      "example": "https://tweetington.vercel.app/api/remove?board=20,99,123&ids=99"
    }
  ],
  "quickstart": {
    "1_build_a_board": "GET https://tweetington.vercel.app/api/add?ids=20,1985900138598895616",
    "2_open_it": "the \"url\" field, e.g. https://tweetington.vercel.app/?ids=20,1985900138598895616",
    "3_inspect_a_tweet": "GET https://tweetington.vercel.app/api/tweet/20"
  },
  "skill": {
    "description": "An installable agent skill (SKILL.md) for using this API lives at /api/skill.",
    "url": "https://tweetington.vercel.app/api/skill",
    "install": "mkdir -p .devin/skills/tweetington && curl -s https://tweetington.vercel.app/api/skill -o .devin/skills/tweetington/SKILL.md"
  },
  "app": "https://tweetington.vercel.app/"
}