Publish draft changes live
Promotes the draft snapshot to the live published page. Optionally scope the publish to specific domains; omit the body to publish all domains with pending changes. Requires a write-scoped key.
Authorization
bearerAuth Your al_live_<prefix>_<secret> API key. Mint and manage keys in the dashboard.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/api/admin/publish" \ -H "Content-Type: application/json" \ -d '{ "domains": [ "onlydasha.com" ] }'{ "ok": true, "bg_files_by_domain": { "onlydasha.com": { "mobile": [ "bg-720.jpg", "bg-1080.jpg" ] } }, "domains": [ "onlydasha.com" ]}{ "detail": { "code": "nothing_to_publish", "message": "No changes to publish" }}{ "detail": { "code": "domain_not_found", "message": "Domain 'onlydasha.com' is not registered" }}Mint a preview token (audience simulator)
Returns a short-lived signed token that renders the draft page in the same-origin preview frame, simulating an exact audience: country, device, OS, hour of day, language, one cover-rotation arm, or one exact segment. Open public_url joined with frame_path, carrying the token, to render the simulated page. With no claims a legacy whole-draft token is minted. Owner-only — creator keys cannot mint preview tokens.
Discard draft changes
Reverts the draft snapshot back to the currently-published state, throwing away unpublished edits. Optionally scope to specific domains; omit the body to discard all. Requires a write-scoped key.