Preview Routes
The preview system lets you test questionnaires and related content directly in the staging or dev app without deploying. It works with both draft and published content from Strapi.
Availability
Section titled “Availability”Preview routes are only available in staging and dev environments. They are not accessible in production.
URL Structure
Section titled “URL Structure”All preview URLs follow this pattern:
/preview/:status/:type/:documentId[/:additionalParams]| Segment | Description |
|---|---|
:previewStatus |
draft or published |
:type |
The content type being previewed (implicit in the route path) |
:documentId |
The Strapi document ID of the content |
Route Table
Section titled “Route Table”Production-path previews (/preview/)
Section titled “Production-path previews (/preview/)”| Route | Component | Description |
|---|---|---|
/preview/:status/:documentId |
QuestionnairePreview | General questionnaire preview. Renders the full questionnaire flow. |
/preview/:status/policy/:documentId |
PreviewSignupPage | Signup flow preview. Simulates the complete signup experience. |
/preview/:status/claim/:documentId |
GeneralClaimsPreview | Claims flow preview. Simulates filing a claim. |
/preview/:status/adjust-policy/:documentId/:policyId |
AdjustPolicyPreview | Policy adjustment preview. Requires a policy ID to simulate adjusting an existing policy. |
/preview/:status/cancel-policy/:documentId/:policyId |
CancelPolicyPreview | Cancel policy preview. Requires a policy ID to simulate cancellation. |
/preview/:status/policy-details/:documentId/:policyId |
PolicySinglePreview | Policy details page preview. Shows the policy management view. |
/preview/:status/policy-coverage/:sectionId/:policyId |
PolicyCoveragePreview | Coverage section preview. Shows a specific coverage section of a policy. |
/preview/:status/content-modal/:slug |
ContentModalPreview | Content modal preview. Renders a standalone content modal. |
Staging-path previews (/preview-staging/)
Section titled “Staging-path previews (/preview-staging/)”All routes above also exist under /preview-staging/ with identical paths and behavior. The staging prefix routes to the staging Strapi instance.
| Route | Description |
|---|---|
/preview-staging/:status/:documentId |
General questionnaire (staging Strapi) |
/preview-staging/:status/policy/:documentId |
Signup flow (staging Strapi) |
/preview-staging/:status/claim/:documentId |
Claims flow (staging Strapi) |
/preview-staging/:status/adjust-policy/:documentId/:policyId |
Policy adjustment (staging Strapi) |
/preview-staging/:status/cancel-policy/:documentId/:policyId |
Cancel policy (staging Strapi) |
/preview-staging/:status/policy-details/:documentId/:policyId |
Policy details (staging Strapi) |
/preview-staging/:status/policy-coverage/:sectionId/:policyId |
Coverage section (staging Strapi) |
/preview-staging/:status/content-modal/:slug |
Content modal (staging Strapi) |
Status Parameter
Section titled “Status Parameter”| Value | Description |
|---|---|
draft |
Loads the draft version of the content. Use this while editing in Strapi before publishing. |
published |
Loads the published version. Use this to verify the live version matches expectations. |
Parameters
Section titled “Parameters”documentId
Section titled “documentId”The Strapi document ID. You can find this in:
- The Strapi admin URL when viewing the content (the numeric or alphanumeric ID in the URL)
- The Strapi API response
policyId
Section titled “policyId”Required for policy-related previews (adjust-policy, cancel-policy, policy-details, policy-coverage). This is the ID of an existing policy in the system. In staging, use a test policy ID.
sectionId
Section titled “sectionId”Required for policy-coverage previews. Identifies the specific coverage section to display.
Required for content-modal previews. The slug of the content modal as defined in Strapi.
Examples
Section titled “Examples”Preview a draft signup questionnaire:
/preview/draft/policy/abc123def456Preview a published claims flow:
/preview/published/claim/abc123def456Preview a draft policy adjustment with a test policy:
/preview/draft/adjust-policy/abc123def456/policy_12345Preview a content modal by slug:
/preview/draft/content-modal/liability-coverage-detailsPreview via staging Strapi:
/preview-staging/draft/policy/abc123def456See also
Section titled “See also”- Preview a Questionnaire – step-by-step guide for previewing flows
- Preview Environments – which base URL to use per environment
- Preview System – how preview routes fetch and render draft content