REST endpoints for AI agents and scripts to inspect, style, compile, and deploy ANTSAND-generated websites.
All requests require a Bearer token in the Authorization header.
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
curl -X GET https://your-antsand-instance/api/v1/me \
-H "Authorization: Bearer YOUR_API_KEY"
curl -X GET https://your-antsand-instance/api/v1/databoards \
-H "Authorization: Bearer YOUR_API_KEY"
# Response: [{ "_id": { "$oid": "abc123" }, "name": "my-site", ... }]
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)
Update CSS classes on specific Databoard fields using dot-path notation.
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"
}
}'
datalist.0 = first section, datalist.1 = second section, etc.
Use the inspect endpoint to discover the correct indices for each section.
Scan all assigned CSS classes and generate board-local utility CSS. Run this after adding Tier 2 utility classes.
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"]
# }
Compile templates, Sass, and generate the full production site.
curl -X POST https://your-antsand-instance/api/v1/databoards/abc123/deploy \
-H "Authorization: Bearer YOUR_API_KEY"
Verify the deployed site is live and responding.
curl -s -o /dev/null -w "%{http_code}" http://your-site.antsand.com/
# Expect: 200
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> | .section | antsand-section theme-* |
data.container | <div> | .data-container | antsand-grid md:grid-cols-3 |
data.sub_container | <div> per item | .data-sub-container | antsand-card shadow |
data.img_container | <div> wrapping img | .data-img-container | aspect-video |
data.img | <img> | .data-img | object-cover rounded-lg |
data.h3 | <h3> | .data-h3 | line-clamp-2 md:text-xl |
data.p | <p> | .data-p | line-clamp-3 opacity-75 |
data.cta | <a> | .data-cta | antsand-btn antsand-btn-primary |
A safe, idempotent workflow for AI agents styling ANTSAND sites:
GET /api/v1/databoards/{id} → read current CSS assignmentsPOST .../patch → apply class changes to each sectionPOST .../utilities/compile → generate only the CSS usedPOST .../deploy → build the live sitecurl the URL → verify 200 status