Sites API
Create Sites, deploy static packages, promote releases, and manage structured Site data.Endpoints
Section titled “Endpoints”| Method | Path | Request | Response |
|---|---|---|---|
GET | /api/sites | — | SiteList |
POST | /api/sites | SiteCreateRequest | SiteEnvelope |
GET | /api/sites/{siteId} | path parameter | SiteEnvelope |
PATCH | /api/sites/{siteId} | SiteUpdateRequest | SiteEnvelope |
DELETE | /api/sites/{siteId} | path parameter | { ok: true } |
POST | /api/sites/deployments | SiteDeploymentPackage | SiteDeploymentResult |
GET | /api/sites/{siteId}/deployments | path parameter | SiteDeploymentList |
POST | /api/sites/{siteId}/deployments | SiteStaticPackage | SiteDeploymentEnvelope |
POST | /api/sites/{siteId}/deployments/{deploymentId}/promote | path parameters | SiteDeploymentEnvelope |
GET | /api/sites/{siteId}/data | path parameter | SiteCollectionList |
POST | /api/sites/{siteId}/data | SiteCollectionRequest | SiteCollectionEnvelope |
GET | /api/sites/{siteId}/data/{collectionName}/records | path parameters | SiteRecordList |
POST | /api/sites/{siteId}/data/{collectionName}/records | SiteRecordRequest | SiteRecordEnvelope |
GET | /api/sites/{siteId}/data/{collectionName}/records/{recordId} | path parameters | SiteRecordEnvelope |
PATCH | /api/sites/{siteId}/data/{collectionName}/records/{recordId} | SiteRecordRequest | SiteRecordEnvelope |
DELETE | /api/sites/{siteId}/data/{collectionName}/records/{recordId} | path parameters | SiteRecordEnvelope |
Deploy a complete Site
Section titled “Deploy a complete Site” POST
/api/sites/deployments This composition endpoint creates or updates the Site, provisions declared data collections,
uploads the static package, and promotes it unless ?promote=false is supplied.
curl https://app.dexto.ai/api/sites/deployments \ -H "Authorization: Bearer $DEXTO_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "slug":"release-notes", "title":"Release notes", "visibility":"public", "entrypoint":"index.html", "spaFallback":true, "assets":[ {"path":"index.html","mediaType":"text/html","contentBase64":"PGgxPlJlbGVhc2Ugbm90ZXM8L2gxPg=="} ] }'{ "createdSite": true, "firstDeployment": true, "promoted": true, "site": { "id": "cf51e61f-9c2f-4d61-8398-0c5db80cda91", "slug": "release-notes", "title": "Release notes", "visibility": "public", "productionUrl": "https://release-notes.sites.dexto.ai", "createdAt": "2026-09-13T10:00:00.000Z", "updatedAt": "2026-09-13T10:00:01.000Z" }, "deployment": { "id": "ad089342-b060-483a-8ae2-8c107292f76d", "siteId": "cf51e61f-9c2f-4d61-8398-0c5db80cda91", "channel": "production", "status": "ready", "previewUrl": "https://release-notes-ad089342.sites.dexto.ai", "productionUrl": "https://release-notes.sites.dexto.ai" }, "resources": {"data": []}, "url": "https://release-notes.sites.dexto.ai"}| Request field | JSON type | Required | Description |
|---|---|---|---|
slug | string | Yes | Lowercase Site hostname label |
title | string | Yes | Site display title |
visibility | string | No | private, unlisted, or public |
assets | array<SiteAsset> | Yes | One to 100 static files |
assets[].path | string | Yes | Relative file path without traversal |
assets[].contentBase64 | string | Yes | Base64-encoded file bytes |
assets[].mediaType | string | No | MIME type |
entrypoint | string | No | Entrypoint present in assets; defaults to HTML |
spaFallback | boolean | No | Serve the entrypoint for unmatched paths |
resources | object | No | Versioned managed-data collection manifest |
| Managed resources field | JSON type | Required | Description |
|---|---|---|---|
resources.version | 2 | 3 | Yes | Managed-resource contract version |
resources.data | object | Yes | Map keyed by lowercase collection name |
resources.data.{name}.schema | object | Yes | Supported JSON Schema subset |
resources.data.{name}.seed | array<any JSON value> | Yes | Initial records |
resources.data.{name}.owner | string | No | visitor for visitor-owned records |
resources.data.{name}.access.create | string | Yes | owner, private, public, or visitor |
resources.data.{name}.access.read | string | Yes | owner, private, public, or visitor |
resources.data.{name}.access.update | string | Yes | owner, private, public, or visitor |
resources.data.{name}.access.delete | string | Yes | owner, private, public, or visitor |
resources.auth.visitors.enabled | true | V3 only | Enables visitor authentication |
resources.auth.visitors.methods | array<"password"> | V3 only | Visitor authentication methods |
The response resources.data array contains each provisioned collection’s id, siteId, name,
resolved access object, and seededRecords count.
List Sites
Section titled “List Sites” GET
/api/sites curl https://app.dexto.ai/api/sites \ -H "Authorization: Bearer $DEXTO_API_KEY"| Response field | JSON type | Required | Description |
|---|---|---|---|
sites | array<Site> | Yes | Sites visible to the caller |
sites[].id | string | Yes | Site identifier |
sites[].slug | string | Yes | Public hostname label |
sites[].title | string | Yes | Display title |
sites[].visibility | string | Yes | private, unlisted, or public |
sites[].productionUrl | string | Yes | Stable production URL |
sites[].createdAt | string | Yes | ISO-8601 creation timestamp |
sites[].updatedAt | string | Yes | ISO-8601 last-update timestamp |
Create a data collection
Section titled “Create a data collection” POST
/api/sites/{siteId}/data curl https://app.dexto.ai/api/sites/$SITE_ID/data \ -H "Authorization: Bearer $DEXTO_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name":"articles", "schema":{"type":"object","properties":{"title":{"type":"string"}}}, "access":{"create":"private","read":"public","update":"private","delete":"private"} }'| Request field | JSON type | Required | Description |
|---|---|---|---|
name | string | Yes | Lowercase collection name |
schema | object | No | Supported JSON Schema subset, or null |
access.create | string | No | Who may create records |
access.read | string | No | Who may read records |
access.update | string | No | Who may update records |
access.delete | string | No | Who may delete records |
Create a record
Section titled “Create a record” POST
/api/sites/{siteId}/data/{collectionName}/records curl https://app.dexto.ai/api/sites/$SITE_ID/data/articles/records \ -H "Authorization: Bearer $DEXTO_API_KEY" \ -H "Content-Type: application/json" \ -d '{"value":{"title":"Sites API released"}}'{ "record": { "id": "e271cc0f-83f8-486d-aada-3052f6782680", "siteId": "cf51e61f-9c2f-4d61-8398-0c5db80cda91", "collectionId": "d59ac61f-e28b-40d7-8bee-e2357030e85f", "value": {"title":"Sites API released"}, "createdAt": "2026-09-13T10:03:00.000Z", "updatedAt": "2026-09-13T10:03:00.000Z" }}| Field | JSON type | Required | Description |
|---|---|---|---|
value | any JSON value | Yes | Value validated against collection |
record.id | string | Yes | Record identifier |
record.siteId | string | Yes | Parent Site |
record.collectionId | string | Yes | Parent collection |
record.value | any JSON value | Yes | Stored value |
record.createdAt | string | Yes | ISO-8601 creation timestamp |
record.updatedAt | string | Yes | ISO-8601 last-update timestamp |