Skip to main content
Watch for real-time updates to previewed components or content via a preview token.
Subscriptions are only useful for draft components and unpublished content, as published versions are immutable and will never change.

Subscription

Parameters

ParameterTypeRequiredDescription
tokenString!YesPreview link token

Authentication

Use previewToken in connection params instead of x-api-key:

Response: PreviewUpdate

FieldTypeDescription
previewPreviewResult!ComponentPreview or ContentPreview
actionString!”UPDATED” or “DELETED”
timestampDateTime!When the update occurred

ComponentPreview

FieldTypeDescription
componentIdID!Component ID
componentNameString!Component name for display/recents
componentComponentComponent data (null if exceeds 100KB)
resolvedRefResolvedPackageRef!Package IDs for caching

ContentPreview

FieldTypeDescription
contentIdID!Content ID
contentNameString!Content name for display/recents
contentTypeNameString!Content type name for display/recents
contentContentContent data (null if exceeds 100KB)
resolvedRefResolvedPackageRef!Package IDs for caching

Example

Variables

Component Update Payload

Content Update Payload

Client Implementation

Handling Large Payloads

When data exceeds 100KB, the component or content field will be null: