younifyd
Menu

Get Preview Api Key

Get a preview API key

GET/spaces/{spaceId}/preview_api_keys/{resourceId}

Use it in a workflow

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

Request

Path parameters

spaceIdstringrequired

ID of the space

resourceIdstringrequired

ID of the resource

Response

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

sysobject
idstring

Resource ID

archivedAtstring (date-time)

Archival timestamp

contentTypeobject1 fields
createdAtstring (date-time)

Creation timestamp

environmentobject1 fields
publishedAtstring (date-time)

Publication timestamp

spaceobject1 fields
typestring

Resource type

updatedAtstring (date-time)

Last update timestamp

versioninteger (int64)

Resource version

namestring

Name of the preview API key

descriptionstring

Description of the preview API key

accessTokenstring

The Preview API access token

environmentsarray<object>

List of environments this preview API key can access

sysobject3 fields
json
{
  "sys": {
    "id": "string",
    "archivedAt": "2025-01-01T00:00:00Z",
    "contentType": {
      "sys": {
        "id": "string",
        "linkType": "ContentType",
        "type": "Link"
      }
    },
    "createdAt": "2025-01-01T00:00:00Z",
    "environment": {
      "sys": {
        "id": "string",
        "linkType": "Environment",
        "type": "Link"
      }
    },
    "publishedAt": "2025-01-01T00:00:00Z",
    "space": {
      "sys": {
        "id": "string",
        "linkType": "Environment",
        "type": "Link"
      }
    },
    "type": "string",
    "updatedAt": "2025-01-01T00:00:00Z",
    "version": 0
  },
  "name": "string",
  "description": "string",
  "accessToken": "string",
  "environments": [
    {
      "sys": {
        "id": "string",
        "linkType": "Environment",
        "type": "Link"
      }
    }
  ]
}

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