Skip to content

Sites API

Create Sites, deploy static packages, promote releases, and manage structured Site data.
MethodPathRequestResponse
GET/api/sitesSiteList
POST/api/sitesSiteCreateRequestSiteEnvelope
GET/api/sites/{siteId}path parameterSiteEnvelope
PATCH/api/sites/{siteId}SiteUpdateRequestSiteEnvelope
DELETE/api/sites/{siteId}path parameter{ ok: true }
POST/api/sites/deploymentsSiteDeploymentPackageSiteDeploymentResult
GET/api/sites/{siteId}/deploymentspath parameterSiteDeploymentList
POST/api/sites/{siteId}/deploymentsSiteStaticPackageSiteDeploymentEnvelope
POST/api/sites/{siteId}/deployments/{deploymentId}/promotepath parametersSiteDeploymentEnvelope
GET/api/sites/{siteId}/datapath parameterSiteCollectionList
POST/api/sites/{siteId}/dataSiteCollectionRequestSiteCollectionEnvelope
GET/api/sites/{siteId}/data/{collectionName}/recordspath parametersSiteRecordList
POST/api/sites/{siteId}/data/{collectionName}/recordsSiteRecordRequestSiteRecordEnvelope
GET/api/sites/{siteId}/data/{collectionName}/records/{recordId}path parametersSiteRecordEnvelope
PATCH/api/sites/{siteId}/data/{collectionName}/records/{recordId}SiteRecordRequestSiteRecordEnvelope
DELETE/api/sites/{siteId}/data/{collectionName}/records/{recordId}path parametersSiteRecordEnvelope
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.

Terminal window
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=="}
]
}'
Request fieldJSON typeRequiredDescription
slugstringYesLowercase Site hostname label
titlestringYesSite display title
visibilitystringNoprivate, unlisted, or public
assetsarray<SiteAsset>YesOne to 100 static files
assets[].pathstringYesRelative file path without traversal
assets[].contentBase64stringYesBase64-encoded file bytes
assets[].mediaTypestringNoMIME type
entrypointstringNoEntrypoint present in assets; defaults to HTML
spaFallbackbooleanNoServe the entrypoint for unmatched paths
resourcesobjectNoVersioned managed-data collection manifest
Managed resources fieldJSON typeRequiredDescription
resources.version2 | 3YesManaged-resource contract version
resources.dataobjectYesMap keyed by lowercase collection name
resources.data.{name}.schemaobjectYesSupported JSON Schema subset
resources.data.{name}.seedarray<any JSON value>YesInitial records
resources.data.{name}.ownerstringNovisitor for visitor-owned records
resources.data.{name}.access.createstringYesowner, private, public, or visitor
resources.data.{name}.access.readstringYesowner, private, public, or visitor
resources.data.{name}.access.updatestringYesowner, private, public, or visitor
resources.data.{name}.access.deletestringYesowner, private, public, or visitor
resources.auth.visitors.enabledtrueV3 onlyEnables visitor authentication
resources.auth.visitors.methodsarray<"password">V3 onlyVisitor authentication methods

The response resources.data array contains each provisioned collection’s id, siteId, name, resolved access object, and seededRecords count.

GET /api/sites
Terminal window
curl https://app.dexto.ai/api/sites \
-H "Authorization: Bearer $DEXTO_API_KEY"
Response fieldJSON typeRequiredDescription
sitesarray<Site>YesSites visible to the caller
sites[].idstringYesSite identifier
sites[].slugstringYesPublic hostname label
sites[].titlestringYesDisplay title
sites[].visibilitystringYesprivate, unlisted, or public
sites[].productionUrlstringYesStable production URL
sites[].createdAtstringYesISO-8601 creation timestamp
sites[].updatedAtstringYesISO-8601 last-update timestamp
POST /api/sites/{siteId}/data
Terminal window
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 fieldJSON typeRequiredDescription
namestringYesLowercase collection name
schemaobjectNoSupported JSON Schema subset, or null
access.createstringNoWho may create records
access.readstringNoWho may read records
access.updatestringNoWho may update records
access.deletestringNoWho may delete records
POST /api/sites/{siteId}/data/{collectionName}/records
Terminal window
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"}}'
FieldJSON typeRequiredDescription
valueany JSON valueYesValue validated against collection
record.idstringYesRecord identifier
record.siteIdstringYesParent Site
record.collectionIdstringYesParent collection
record.valueany JSON valueYesStored value
record.createdAtstringYesISO-8601 creation timestamp
record.updatedAtstringYesISO-8601 last-update timestamp