Create a P1 site

Create a site in the P1 dashboard and generate the token your developer needs to connect the front end.

A P1 site holds your pages, workstreams, and settings. You create it in the P1 dashboard, then generate a token so your developer can connect the front end.

Before you begin

You need:

  • To create a site: the Owner or Admin role in the business account that should own it. If you belong to more than one business account, switch to that one first.

  • To generate a token: the Owner or Admin role on the site. You're the Owner of sites you create.

Create the site

  1. 1

    Sign in to the P1 dashboard at content.pantheon.io, select Sites, then select Create new site.

    Information:

    You can also select Create new site on the Overview page.

  2. 2

    In Site name (1), enter a name, such as Spring campaign.

    The P1 dashboard's Create site dialog, showing 2 numbered areas: 1 the Site name field, 2 Continue.
  3. 3

    Select Continue (2).

    Success:

    Your new site opens on its Overview tab.

Choose a token scope

Anyone with the token can use its scope on this site until you revoke it, so choose the narrowest scope your developer needs. The dialog asks for a Token name (1) and starts with Published only (2) selected.

The Generate API token dialog, showing 2 numbered areas: 1 the Token name field, 2 Published only under Access scope.
ScopeWhat the token can do
Published onlyRead published content on Live.
All branch contentRead content on every workstream.
All content including draftsRead all content, including unpublished drafts.
Component registry syncWrite to the component registry from a build pipeline.
Site migrationExport the site, or import into an empty site.

A front end needs one of the first three. All branch content and All content including drafts can both read unpublished drafts, so keep those tokens private.

Generate the token

  1. 1

    On the site's Overview tab, select Generate token.

  2. 2

    In Token name, enter where the token is used, such as Spring campaign production.

  3. 3

    Under Access scope, select a scope, then select Generate token.

    Success:

    The dialog shows the access token, the site ID, and both as environment variables: CSS_API_KEY and NEXT_PUBLIC_CSS_SITE_ID.

  4. 4

    Copy the token and site ID somewhere secure, then select Done.

    Warning:

    This is the only time the dashboard shows the token.

Share the token and site ID with your developer the way your team shares other secrets. For the developer's steps, see Creating a P1 site with Next.js on Pantheon.

Check the result

  1. 1

    On your site's Settings tab, select Token.

    Success:

    Under API Tokens, the list shows your token's name.

Troubleshooting

You don't see Create new site

You need the Owner or Admin role in the business account, and the button appears only on the Active tab. It's also hidden when the business account isn't set up for P1 yet.

You've used all your sites

When your plan's site limit is reached, Continue opens "You have used all your trial sites." Archive a site you no longer need to free a slot.

You closed the dialog before you copied the token

You can't view it again. Generate a new token in Settings > Token. Once the front end uses the new one, select Revoke next to the old one.

Someone who shouldn't have the token might have seen it

Revoke the token right away in Settings > Token, then generate a new one for your developer.

Draft content doesn't appear on the front end

The token's scope is probably Published only. Generate a token with All content including drafts, then revoke the old one.

You created a site by mistake

A site Owner or Admin can archive it from Settings > General. You can restore an archived site later.

More resources