Skip to content
LogoLogo

Project Config Endpoint

Fetch a project's published configuration: its experiences, steps, and the link from each step to the Content Entry that backs it.

Request

GET /api/v1/projects/:projectId
ParameterInDescription
projectIdpathThe project to fetch config for.
preview_tokenqueryOptional. With it, the endpoint returns the preview configuration, which are unpublished.

Response

The response carries the project's experiences and steps. Each step includes layoutContentId, the reference to the Content Entry that backs that step's layout. Use it to know which experiences have content to fetch from the Experience Content endpoint.

FieldTypeDescription
idstringThe project id.
versionIdstring | nullThe published version id, or null on preview.
steps[].layoutContentIdstring | nullThe Content Entry of this step, or null when the step has no content.

Published content and preview content

For published content, versionId holds the ID of the published version. For preview content, which you read with ?preview_token=..., versionId is null, because there is no published version. See Preview, cache, and crawlers.

Example

curl https://api.picked.app/api/v1/projects/proj_123
{
  "id": "proj_123",
  "versionId": "ver_456",
  "steps": [
    {
      "id": "step_1",
      "key": "hero",
      "name": "Hero",
      "layoutName": "HeroLayout",
      "layoutContentId": "entry_789"
    }
  ]
}

Pass the config to serialize() on your server to produce an SSR snapshot. See Server Snapshot.