younifyd
Menu

Create Preview Environment

Create a preview environment

POST/spaces/{spaceId}/preview_environments

Use it in a workflow

  1. Add a step and choose the Contentful connector.
  2. Pick the Create Preview Environment action (under Contentful Content Management API).
  3. Fill in the fields below, then reference the result from later steps as {{createPreviewEnvironment.response.data}}.

Request

Path parameters

spaceIdstringrequired

ID of the space

Request body

Enter the body as JSON in the step's Body field.

namestringrequired

Name of the preview environment

descriptionstring

Description of the preview environment

configurationsarray<object>required

Configuration for the preview environment

contentTypestringrequired

Content type ID

enabledbooleanrequired

Whether the content type is enabled

exampleboolean
urlstringrequired

URL for the preview env of the content type

json
{
  "name": "string",
  "configurations": [
    {
      "contentType": "string",
      "enabled": false,
      "url": "string",
      "example": false
    }
  ],
  "description": "string"
}

Response

Returns 201 with an object. Read it in later steps with {{createPreviewEnvironment.response.data.<field>}}.

namestring

Name of the preview environment

sysobject
descriptionstring

Description of the preview environment

configurationsarray<object>

Configuration for the preview environment

contentTypestringrequired

Content type ID

enabledbooleanrequired

Whether the content type is enabled

exampleboolean
urlstringrequired

URL for the preview env of the content type

json
{
  "name": "string",
  "sys": {},
  "configurations": [
    {
      "contentType": "string",
      "enabled": false,
      "url": "string",
      "example": false
    }
  ],
  "description": "string"
}

Need more? See the Contentful guide for connection setup and behaviour shared by every action.

Was this page helpful?
Create Preview Environment — Contentful — Documentation