How to Create Links to Preview Content for a Specific Uniform Release

Last updated: June 26, 2026

Problem Statement

With Uniform releases you can schedule content to go live at a specific time and date. Before launch, you may want to preview how the site will look once the release is published. The Uniform SDK supports this through the releaseId attribute passed to the RouteClient.

Solution

1. Decide where to pass the release ID

The most common option is a query string parameter (e.g. ?releaseid=...).

2. Pass the value into the RouteClient

Next.js Page Router: add it to requestOptions under withUniformGetStaticProps or withUniformGetServerSideProps:

export const getStaticProps = withUniformGetStaticProps({
  requestOptions: context => ({
    state:
      Boolean(context.preview) || process.env.NODE_ENV === 'development' ? CANVAS_DRAFT_STATE : CANVAS_PUBLISHED_STATE,
    releaseId: context?.query?.releaseid as string,
  }),

Next.js App Router: add it to the retrieveRoute call:

const route = await retrieveRoute(propsWithLangPath, { releaseId: '95472b77-881d-4aaa-9ef2-ed974e35c819' });

Passing the release ID via query string can expose unpublished release content to the public — anyone with the release ID value may be able to see those pages. Consider adding an additional key or secret to prevent unauthorized access.

3. Build the preview link

  1. Make sure the content is in the published state.

  2. Note the URL of the page, e.g. https://your.site/page/path.

  3. While editing content under a release, copy the release ID from the release query string parameter in the URL. Or open the release and take the last ID from the URL.

  4. Combine them: https://your.site/page/path?releaseid=your_release_id_value.

Resources