Previews
Create a preview link
POST
/preview-sessionsNeedscontent.viewA link that opens your app with drafts showing — only for whoever opens it, until it expires. launchUrl already has the token appended. The token (cpv_…) is shown once.
Authorization
secretKeyheader
AuthorizationBearer <sk_…>A secret API key from Settings → API keys. It acts with its creator's role.
Request Body
application/json- body
scope*stringValue in
"view""edit"contentRefs?array<>|nulltraits?|nulllocale?|nullttlMinutes?|nullsiteUrl?|nullResponse Body
Created
application/json- response
session*token*stringcpv_…. Shown once.
launchUrl*|Open this. null when no URL for your app is known: pass siteUrl.
Shell
curl -X POST 'https://app.cueston.com/api/preview-sessions' \
-H 'Content-Type: application/json' \
-d '{
"scope": "view"
}'Example Response
JSON
{
"session": {
"id": "string",
"scope": "view",
"contentRefs": [
{
"type": "tour",
"id": 42
}
],
"traits": {},
"locale": "de-DE",
"expiresAt": "2026-10-26T09:30:00Z",
"revokedAt": "2026-10-26T09:30:00Z",
"lastUsedAt": "2026-10-26T09:30:00Z",
"createdAt": "2026-10-26T09:30:00Z",
"status": "active"
},
"token": "cpv_3fQ9…",
"launchUrl": "https://app.acme.com/?cueston_preview=cpv_3fQ9…"
}