Databoard API Reference

REST endpoints for AI agents and scripts to inspect, style, compile, and deploy ANTSAND-generated websites.

Authentication

All requests require a Bearer token in the Authorization header.

Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
API keys are generated per Databoard user account. Contact the board owner for access.

Endpoints

1. Verify Authentication

GET /api/v1/me Verify your API key is valid
curl -X GET https://your-antsand-instance/api/v1/me \
  -H "Authorization: Bearer YOUR_API_KEY"

2. List Databoards

GET /api/v1/databoards List all boards accessible to your key
curl -X GET https://your-antsand-instance/api/v1/databoards \
  -H "Authorization: Bearer YOUR_API_KEY"

# Response: [{ "_id": { "$oid": "abc123" }, "name": "my-site", ... }]

3. Inspect Board

GET /api/v1/databoards/{BOARD_ID} Fetch full board config: pages, sections, CSS, Sass
curl -X GET https://your-antsand-instance/api/v1/databoards/abc123 \
  -H "Authorization: Bearer YOUR_API_KEY"

# Response includes:
# - list[].datalist[].css.section.container
# - list[].datalist[].css.data.{container, sub_container, h3, p, cta, img_container}
# - sass (site-level SCSS)

4. Patch Field CSS

Update CSS classes on specific Databoard fields using dot-path notation.

POST /api/v1/databoards/{BOARD_ID}/patch Update CSS classes on fields
curl -X POST https://your-antsand-instance/api/v1/databoards/abc123/patch \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "patch_delta": {
      "datalist.0.css.section.container": "antsand-section theme-dark-corporate",
      "datalist.0.css.data.container": "antsand-grid md:grid-cols-3 gap-6",
      "datalist.0.css.data.sub_container": "antsand-card shadow transition-all hover:-translate-y-1",
      "datalist.0.css.data.h3": "line-clamp-2 font-semibold md:text-xl",
      "datalist.0.css.data.p": "line-clamp-3 opacity-75",
      "datalist.0.css.data.cta": "antsand-btn antsand-btn-primary antsand-btn-sm"
    }
  }'
Dot-path notation: datalist.0 = first section, datalist.1 = second section, etc. Use the inspect endpoint to discover the correct indices for each section.

5. Compile Utilities

Scan all assigned CSS classes and generate board-local utility CSS. Run this after adding Tier 2 utility classes.

POST /api/v1/databoards/{BOARD_ID}/utilities/compile Generate only the utility CSS your site uses
curl -X POST https://your-antsand-instance/api/v1/databoards/abc123/utilities/compile \
  -H "Authorization: Bearer YOUR_API_KEY"

# Response: {
#   "classes_found": 47,
#   "utility_classes": 31,
#   "rules_emitted": 31,
#   "unsupported_classes": ["custom-one-off"]
# }

6. Deploy

Compile templates, Sass, and generate the full production site.

POST /api/v1/databoards/{BOARD_ID}/deploy Build and deploy the live site
curl -X POST https://your-antsand-instance/api/v1/databoards/abc123/deploy \
  -H "Authorization: Bearer YOUR_API_KEY"

7. Smoke Test

Verify the deployed site is live and responding.

GET http://YOUR_SITE_URL/ Verify deployment succeeded
curl -s -o /dev/null -w "%{http_code}" http://your-site.antsand.com/
# Expect: 200

Field → HTML Mapping

When you assign a class to a Databoard field, it gets appended to the element's fixed class in the rendered HTML:

Databoard Field Rendered Element Fixed Class Your Classes Appended
section.container<section>.sectionantsand-section theme-*
data.container<div>.data-containerantsand-grid md:grid-cols-3
data.sub_container<div> per item.data-sub-containerantsand-card shadow
data.img_container<div> wrapping img.data-img-containeraspect-video
data.img<img>.data-imgobject-cover rounded-lg
data.h3<h3>.data-h3line-clamp-2 md:text-xl
data.p<p>.data-pline-clamp-3 opacity-75
data.cta<a>.data-ctaantsand-btn antsand-btn-primary

Recommended Agent Loop

A safe, idempotent workflow for AI agents styling ANTSAND sites:

  1. InspectGET /api/v1/databoards/{id} → read current CSS assignments
  2. Decide — choose theme, grid layout, card style, font pairings
  3. PatchPOST .../patch → apply class changes to each section
  4. CompilePOST .../utilities/compile → generate only the CSS used
  5. DeployPOST .../deploy → build the live site
  6. Testcurl the URL → verify 200 status
  7. Iterate — repeat steps 2–6 for each section or refinement
This loop is idempotent — running it multiple times won't break anything. Patches overwrite field values, they don't append.

Related Pages

🤖 Agent Quick Start Step-by-step guide with copyable prompts 🔄 Databoard Utilities Loop Full styling control stack reference 📊 Databoard Overview How JSON becomes a live website