Contentful Component
Use the Contentful component to manage Spaces, Environments, Organizations and more.
Component key: contentful
Description
Contentful is a content management system (CMS) that allows developers to manage and deliver content across multiple platforms and devices.
Use the Contentful component to manage Spaces, Environments, Organizations and more.
API Reference Documentation: Contentful API Reference Documentation
Connections
OAuth 2.0
Create a new OAuth App:
- Login and navigate to the Developer Account Settings for OAuth applications
- Create a New Application
- Enter the Redirect URI as https://oauth2.prismatic.io/callback
- Additionally check the boxes for the applicable scopes: Content management read, Content management manage, Confidential
- Upon saving the application note the Client ID and Client Secret and enter them in the connection configuration of the integration.
Input | Default | Notes |
---|---|---|
Authorize URL string / Required Hidden Field authorizeUrl | https://be.contentful.com/oauth/authorize | The OAuth 2.0 Authorization URL for the API |
Client ID string / Required clientId | Client Identifier of your app for the API | |
Client Secret password / Required clientSecret | Client Secret of your app for the API | |
Scopes string / Required scopes | content_management_manage content_management_read | Space separated OAuth 2.0 permission scopes for the API |
Token URL string / Required Hidden Field tokenUrl | https://be.contentful.com/oauth/token | The OAuth 2.0 Token URL for the API |
Triggers
Events Based
Get notified when events occur in your space | key: eventsTrigger
Input | Notes | Example |
---|---|---|
Connection connection / Required connection | ||
Space ID string / Required spaceId | The ID of the space | yadj1kx9rmg0 |
Events string / Required Value List topics | The events of the webhook | Entry.create |
Webhook
Receive and validate webhook requests from Contentful for webhooks you configure. | key: webhook
Input | Notes |
---|---|
Connection connection / Required connection |
Data Sources
Select Environment
Select an environment from a dropdown menu | key: selectEnvironment | type: picklist
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Data Source Return string / Required dataSourceReturn | id | The return value of the data source | |
Space ID string / Required spaceId | The ID of the space | yadj1kx9rmg0 |
Select Organization
Select an organization from a dropdown menu | key: selectOrganization | type: picklist
Input | Default | Notes |
---|---|---|
Connection connection / Required connection | ||
Data Source Return string / Required dataSourceReturn | id | The return value of the data source |
Select Space
Select a space from a dropdown menu | key: selectSpace | type: picklist
Input | Default | Notes |
---|---|---|
Connection connection / Required connection | ||
Data Source Return string / Required dataSourceReturn | id | The return value of the data source |
Actions
Create Asset
Create a new asset | key: createAsset
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Debug Request boolean debugRequest | false | Enabling this flag will log out the current request. | |
Description code / Required description | The description of the asset | ||
Environment ID string / Required environmentId | The ID of the environment | staging | |
File code / Required file | The file of the asset | ||
Space ID string / Required spaceId | The ID of the space | yadj1kx9rmg0 | |
Title code / Required title | The title of the asset |
Example Payload for Create Asset
{
"data": {
"fields": {
"title": {
"en-US": "Playsam Streamliner"
},
"file": {
"en-US": {
"contentType": "image/jpeg",
"fileName": "example.jpeg",
"upload": "https://example.com/example.jpg"
}
}
},
"metadata": {
"tags": [
{
"sys": {
"type": "Link",
"linkType": "Tag",
"id": "nyCampaign"
}
}
]
},
"sys": {
"id": "wtrHxeu3zEoEce2MokCSi",
"type": "Asset",
"version": 1,
"space": {
"sys": {
"type": "Link",
"linkType": "Space",
"id": "yadj1kx9rmg0"
}
},
"environment": {
"sys": {
"type": "Link",
"linkType": "Environment",
"id": "staging"
}
},
"createdAt": "2015-05-18T11:29:46.809Z",
"createdBy": {
"sys": {
"type": "Link",
"linkType": "User",
"id": "7BslKh9TdKGOK41VmLDjFZ"
}
},
"updatedAt": "2015-05-18T11:29:46.809Z",
"updatedBy": {
"sys": {
"type": "Link",
"linkType": "User",
"id": "4FLrUHftHW3v2BLi9fzfjU"
}
}
}
}
}
Create Content Type
Create a new content type | key: createContentType
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Debug Request boolean debugRequest | false | Enabling this flag will log out the current request. | |
Description string description | The description of the content type | A blog post | |
Display Field string displayField | Field used as the main display field for Entries | title | |
Environment ID string / Required environmentId | The ID of the environment | staging | |
Content Type Fields code / Required fields | The fields of the content type | ||
Content Type Name string / Required name | The name of the content type | Blog Post | |
Space ID string / Required spaceId | The ID of the space | yadj1kx9rmg0 |
Example Payload for Create Content Type
{
"data": {
"sys": {
"type": "ContentType",
"id": "3ORKIAOaJqQWWg86MWkyOs",
"version": 1,
"space": {
"sys": {
"type": "Link",
"linkType": "Space",
"id": "yadj1kx9rmg0"
}
},
"environment": {
"sys": {
"type": "Link",
"linkType": "Environment",
"id": "staging"
}
},
"createdAt": "2015-05-18T11:29:46.809Z",
"createdBy": {
"sys": {
"type": "Link",
"linkType": "User",
"id": "7BslKh9TdKGOK41VmLDjFZ"
}
},
"updatedAt": "2015-05-18T11:29:46.809Z",
"updatedBy": {
"sys": {
"type": "Link",
"linkType": "User",
"id": "4FLrUHftHW3v2BLi9fzfjU"
}
}
},
"displayField": "title",
"name": "Blog Post",
"description": "A blog post",
"fields": [
{
"id": "title",
"name": "Title",
"type": "Text",
"localized": true,
"required": true,
"validations": [],
"disabled": false,
"omitted": false
},
{
"id": "body",
"name": "Body",
"type": "Text",
"localized": true,
"required": true,
"validations": [],
"disabled": false,
"omitted": false
}
]
}
}
Create Environment
Create a new environment | key: createEnvironment
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Debug Request boolean debugRequest | false | Enabling this flag will log out the current request. | |
Environment ID string / Required environmentId | The ID of the environment | staging | |
Environment Name string name | The name of the environment | Staging | |
Space ID string / Required spaceId | The ID of the space | yadj1kx9rmg0 |
Example Payload for Create Environment
{
"data": {
"name": "master",
"sys": {
"type": "Environment",
"id": "master",
"version": 1,
"space": {
"sys": {
"type": "Link",
"linkType": "Space",
"id": "fm17kie1n0p4"
}
},
"status": {
"sys": {
"type": "Link",
"linkType": "Status",
"id": "ready"
}
},
"createdBy": {
"sys": {
"type": "Link",
"linkType": "User",
"id": "5QvxuP1Kp8mVrw3PVcOp4t"
}
},
"createdAt": "2024-01-29T18:33:02Z",
"updatedBy": {
"sys": {
"type": "Link",
"linkType": "User",
"id": "5QvxuP1Kp8mVrw3PVcOp4t"
}
},
"updatedAt": "2024-01-29T18:33:02Z"
}
}
}
Create Space
Create a new space | key: createSpace
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Debug Request boolean debugRequest | false | Enabling this flag will log out the current request. | |
Default Locale string defaultLocale | The default locale | en | |
Space Name string / Required name | The name of the space | My Space | |
Organization ID string / Required organizationId | The ID of the organization | 1Qz7ThNuABCytfP4oqkF12 |
Example Payload for Create Space
{
"data": {
"sys": {
"type": "Space",
"id": "yadj1kx9rmg0",
"version": 3,
"organization": {
"sys": {
"id": "0D9ZC8rLWiw6x5qizZGiRs",
"type": "Link",
"linkType": "Organization"
}
},
"createdAt": "2015-05-18T11:29:46.809Z",
"createdBy": {
"sys": {
"type": "Link",
"linkType": "User",
"id": "7BslKh9TdKGOK41VmLDjFZ"
}
},
"updatedAt": "2015-05-18T11:29:46.809Z",
"updatedBy": {
"sys": {
"type": "Link",
"linkType": "User",
"id": "4FLrUHftHW3v2BLi9fzfjU"
}
}
},
"name": "Contentful Example API"
}
}
Create Webhook
Create a new webhook | key: createWebhook
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Debug Request boolean debugRequest | false | Enabling this flag will log out the current request. | |
Name string / Required name | The name of the webhook | Example Webhook | |
Space ID string / Required spaceId | The ID of the space | yadj1kx9rmg0 | |
Events string / Required Value List topics | The events of the webhook | Entry.create | |
URL string / Required url | The URL of the webhook | https://example.com/webhook |
Example Payload for Create Webhook
{
"data": {
"sys": {
"type": "WebhookDefinition",
"id": "0KzM2HxYr5O1pZ4SaUzK8h",
"version": 1,
"space": {
"sys": {
"type": "Link",
"linkType": "Space",
"id": "yadj1kx9rmg0"
}
},
"createdAt": "2015-05-18T11:29:46.809Z",
"createdBy": {
"sys": {
"type": "Link",
"linkType": "User",
"id": "7BslKh9TdKGOK41VmLDjFZ"
}
},
"updatedAt": "2015-05-18T11:29:46.809Z",
"updatedBy": {
"sys": {
"type": "Link",
"linkType": "User",
"id": "4FLrUHftHW3v2BLi9fzfjU"
}
}
},
"name": "My webhook",
"url": "https://www.example.com",
"topics": [
"Entry.create",
"ContentType.create",
"*.publish",
"Asset.*"
],
"httpBasicUsername": "yolo",
"headers": [
{
"key": "header1",
"value": "value1"
},
{
"key": "header2",
"value": "value2"
}
],
"filters": [],
"active": true
}
}
Delete Asset
Delete an existing asset | key: deleteAsset
Input | Default | Notes | Example |
---|---|---|---|
Asset ID string / Required assetId | The ID of the asset | wtrHxeu3zEoEce2MokCSi | |
Connection connection / Required connection | |||
Debug Request boolean debugRequest | false | Enabling this flag will log out the current request. | |
Environment ID string / Required environmentId | The ID of the environment | staging | |
Space ID string / Required spaceId | The ID of the space | yadj1kx9rmg0 |
Example Payload for Delete Asset
{
"data": {}
}
Delete Environment
Delete existing environment | key: deleteEnvironment
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Debug Request boolean debugRequest | false | Enabling this flag will log out the current request. | |
Environment ID string / Required environmentId | The ID of the environment | staging | |
Space ID string / Required spaceId | The ID of the space | yadj1kx9rmg0 |
Example Payload for Delete Environment
{
"data": {}
}
Delete Instanced Webhooks
Delete all webhooks that point to a flow in this instance | key: deleteInstancedWebhooks
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Debug Request boolean debugRequest | false | Enabling this flag will log out the current request. | |
Space ID string / Required spaceId | The ID of the space | yadj1kx9rmg0 |
Delete Space
Delete an existing space | key: deleteSpace
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Debug Request boolean debugRequest | false | Enabling this flag will log out the current request. | |
Space ID string / Required spaceId | The ID of the space | yadj1kx9rmg0 |
Example Payload for Delete Space
{
"data": {}
}
Delete Upload
Deletes a file from temporary data storage | key: deleteUpload
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Debug Request boolean debugRequest | false | Enabling this flag will log out the current request. | |
Environment ID string / Required environmentId | The ID of the environment | staging | |
Space ID string / Required spaceId | The ID of the space | yadj1kx9rmg0 | |
Upload ID string / Required uploadId | The ID of the upload | 2DNvIbYNELgqLJUkgTeIOV |
Example Payload for Delete Upload
{
"data": {}
}
Delete Webhook
Delete a webhook | key: deleteWebhook
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Debug Request boolean debugRequest | false | Enabling this flag will log out the current request. | |
Space ID string / Required spaceId | The ID of the space | yadj1kx9rmg0 | |
Webhook ID string / Required webhookId | The ID of the webhook | 5KsDBWseXY6QegucYAoacS |
Example Payload for Delete Webhook
{
"data": {}
}
Get Asset
Retrieve a single asset | key: getAsset
Input | Default | Notes | Example |
---|---|---|---|
Asset ID string / Required assetId | The ID of the asset | wtrHxeu3zEoEce2MokCSi | |
Connection connection / Required connection | |||
Debug Request boolean debugRequest | false | Enabling this flag will log out the current request. | |
Environment ID string / Required environmentId | The ID of the environment | staging | |
Space ID string / Required spaceId | The ID of the space | yadj1kx9rmg0 |
Example Payload for Get Asset
{
"data": {
"fields": {
"title": {
"en-US": "Playsam Streamliner"
},
"file": {
"en-US": {
"contentType": "image/jpeg",
"fileName": "example.jpeg",
"upload": "https://example.com/example.jpg"
}
}
},
"metadata": {
"tags": [
{
"sys": {
"type": "Link",
"linkType": "Tag",
"id": "nyCampaign"
}
}
]
},
"sys": {
"id": "wtrHxeu3zEoEce2MokCSi",
"type": "Asset",
"version": 1,
"space": {
"sys": {
"type": "Link",
"linkType": "Space",
"id": "yadj1kx9rmg0"
}
},
"environment": {
"sys": {
"type": "Link",
"linkType": "Environment",
"id": "staging"
}
},
"createdAt": "2015-05-18T11:29:46.809Z",
"createdBy": {
"sys": {
"type": "Link",
"linkType": "User",
"id": "7BslKh9TdKGOK41VmLDjFZ"
}
},
"updatedAt": "2015-05-18T11:29:46.809Z",
"updatedBy": {
"sys": {
"type": "Link",
"linkType": "User",
"id": "4FLrUHftHW3v2BLi9fzfjU"
}
}
}
}
}
Get Bulk Action
Retrieve a bulk action | key: getBulkAction
Input | Default | Notes | Example |
---|---|---|---|
Bulk Action ID string / Required bulkActionId | The ID of the bulk action | 5KsDBWseXY6QegucYAoacS | |
Connection connection / Required connection | |||
Debug Request boolean debugRequest | false | Enabling this flag will log out the current request. | |
Environment ID string / Required environmentId | The ID of the environment | staging | |
Space ID string / Required spaceId | The ID of the space | yadj1kx9rmg0 |
Example Payload for Get Bulk Action
{
"data": {
"sys": {
"id": "<bulk_action_id>",
"type": "BulkAction",
"status": "<status>",
"createdBy": {
"sys": {
"type": "Link",
"linkType": "User",
"id": "7BslKh9TdKGOK41VmLDjFZ"
}
},
"createdAt `2020-01-01T13:00:00.000Z`": "",
"updatedAt `2020-01-01T13:00:00.000Z`": "",
"space": {
"sys": {
"type": "Link",
"linkType": "Space",
"id": "yadj1kx9rmg0"
}
},
"environment": {
"sys": {
"type": "Link",
"linkType": "Environment",
"id": "staging"
}
}
},
"action": "<action>",
"payload": {
"entities": {
"items": [
{
"sys": {
"id": "<entity_id>",
"type": "Link",
"linkType": "<Entry|Asset>",
"version": 0
}
}
]
}
},
"error": {
"sys": {
"id": "<error_type>",
"type": "Error"
}
}
}
}
Get Environment
Retrieve a single environment | key: getEnvironment
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Debug Request boolean debugRequest | false | Enabling this flag will log out the current request. | |
Environment ID string / Required environmentId | The ID of the environment | staging | |
Space ID string / Required spaceId | The ID of the space | yadj1kx9rmg0 |
Example Payload for Get Environment
{
"data": {
"name": "master",
"sys": {
"type": "Environment",
"id": "master",
"version": 1,
"space": {
"sys": {
"type": "Link",
"linkType": "Space",
"id": "fm17kie1n0p4"
}
},
"status": {
"sys": {
"type": "Link",
"linkType": "Status",
"id": "ready"
}
},
"createdBy": {
"sys": {
"type": "Link",
"linkType": "User",
"id": "5QvxuP1Kp8mVrw3PVcOp4t"
}
},
"createdAt": "2024-01-29T18:33:02Z",
"updatedBy": {
"sys": {
"type": "Link",
"linkType": "User",
"id": "5QvxuP1Kp8mVrw3PVcOp4t"
}
},
"updatedAt": "2024-01-29T18:33:02Z"
}
}
}
Get Organization
Retrieve an organization by ID | key: getOrganization
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Debug Request boolean debugRequest | false | Enabling this flag will log out the current request. | |
Organization ID string / Required organizationId | The ID of the organization | 1Qz7ThNuABCytfP4oqkF12 |
Example Payload for Get Organization
{
"data": {
"sys": {
"type": "Organization",
"id": "0D9ZC8rLWiw6x5qizZGiRs",
"version": 1,
"createdAt": "2015-05-18T11:29:46.809Z",
"updatedAt": "2015-05-18T11:29:46.809Z"
},
"name": "My organization"
}
}
Get Space
Retrieve a single space | key: getSpace
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Debug Request boolean debugRequest | false | Enabling this flag will log out the current request. | |
Space ID string / Required spaceId | The ID of the space | yadj1kx9rmg0 |
Example Payload for Get Space
{
"data": {
"sys": {
"type": "Space",
"id": "yadj1kx9rmg0",
"version": 3,
"organization": {
"sys": {
"id": "0D9ZC8rLWiw6x5qizZGiRs",
"type": "Link",
"linkType": "Organization"
}
},
"createdAt": "2015-05-18T11:29:46.809Z",
"createdBy": {
"sys": {
"type": "Link",
"linkType": "User",
"id": "7BslKh9TdKGOK41VmLDjFZ"
}
},
"updatedAt": "2015-05-18T11:29:46.809Z",
"updatedBy": {
"sys": {
"type": "Link",
"linkType": "User",
"id": "4FLrUHftHW3v2BLi9fzfjU"
}
}
},
"name": "Contentful Example API"
}
}
Get Upload
Retrieves an unmodified image | key: getUpload
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Debug Request boolean debugRequest | false | Enabling this flag will log out the current request. | |
Environment ID string / Required environmentId | The ID of the environment | staging | |
Space ID string / Required spaceId | The ID of the space | yadj1kx9rmg0 | |
Upload ID string / Required uploadId | The ID of the upload | 2DNvIbYNELgqLJUkgTeIOV |
Example Payload for Get Upload
{
"data": {
"sys": {
"type": "Upload",
"id": "2DNvIbYNELgqLJUkgTeIOV",
"space": {
"sys": {
"type": "Link",
"linkType": "Space",
"id": "yadj1kx9rmg0"
}
},
"expiresAt": "2015-05-18T11:29:46.809Z",
"createdAt": "2015-05-18T11:29:46.809Z",
"createdBy": {
"sys": {
"type": "Link",
"linkType": "User",
"id": "4FLrUHftHW3v2BLi9fzfjU"
}
}
}
}
}
Get Webhook
Retrieve a single webhook | key: getWebhook
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Debug Request boolean debugRequest | false | Enabling this flag will log out the current request. | |
Space ID string / Required spaceId | The ID of the space | yadj1kx9rmg0 | |
Webhook ID string / Required webhookId | The ID of the webhook | 5KsDBWseXY6QegucYAoacS |
Example Payload for Get Webhook
{
"data": {
"sys": {
"type": "WebhookDefinition",
"id": "0KzM2HxYr5O1pZ4SaUzK8h",
"version": 1,
"space": {
"sys": {
"type": "Link",
"linkType": "Space",
"id": "yadj1kx9rmg0"
}
},
"createdAt": "2015-05-18T11:29:46.809Z",
"createdBy": {
"sys": {
"type": "Link",
"linkType": "User",
"id": "7BslKh9TdKGOK41VmLDjFZ"
}
},
"updatedAt": "2015-05-18T11:29:46.809Z",
"updatedBy": {
"sys": {
"type": "Link",
"linkType": "User",
"id": "4FLrUHftHW3v2BLi9fzfjU"
}
}
},
"name": "My webhook",
"url": "https://www.example.com",
"topics": [
"Entry.create",
"ContentType.create",
"*.publish",
"Asset.*"
],
"httpBasicUsername": "yolo",
"headers": [
{
"key": "header1",
"value": "value1"
},
{
"key": "header2",
"value": "value2"
}
],
"filters": [],
"active": true
}
}
List Assets
Retrieve all assets of a space | key: listAssets
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Debug Request boolean debugRequest | false | Enabling this flag will log out the current request. | |
Environment ID string / Required environmentId | The ID of the environment | staging | |
Space ID string / Required spaceId | The ID of the space | yadj1kx9rmg0 |
Example Payload for List Assets
{
"data": [
{
"fields": {
"title": {
"en-US": "Playsam Streamliner"
},
"file": {
"en-US": {
"contentType": "image/jpeg",
"fileName": "example.jpeg",
"upload": "https://example.com/example.jpg"
}
}
},
"metadata": {
"tags": [
{
"sys": {
"type": "Link",
"linkType": "Tag",
"id": "nyCampaign"
}
}
]
},
"sys": {
"id": "wtrHxeu3zEoEce2MokCSi",
"type": "Asset",
"version": 1,
"space": {
"sys": {
"type": "Link",
"linkType": "Space",
"id": "yadj1kx9rmg0"
}
},
"environment": {
"sys": {
"type": "Link",
"linkType": "Environment",
"id": "staging"
}
},
"createdAt": "2015-05-18T11:29:46.809Z",
"createdBy": {
"sys": {
"type": "Link",
"linkType": "User",
"id": "7BslKh9TdKGOK41VmLDjFZ"
}
},
"updatedAt": "2015-05-18T11:29:46.809Z",
"updatedBy": {
"sys": {
"type": "Link",
"linkType": "User",
"id": "4FLrUHftHW3v2BLi9fzfjU"
}
}
}
}
]
}
List Content Types
Retrieves all content types of a space | key: listContentTypes
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Debug Request boolean debugRequest | false | Enabling this flag will log out the current request. | |
Environment ID string / Required environmentId | The ID of the environment | staging | |
Space ID string / Required spaceId | The ID of the space | yadj1kx9rmg0 |
Example Payload for List Content Types
{
"data": [
{
"sys": {
"type": "ContentType",
"id": "3ORKIAOaJqQWWg86MWkyOs",
"version": 1,
"space": {
"sys": {
"type": "Link",
"linkType": "Space",
"id": "yadj1kx9rmg0"
}
},
"environment": {
"sys": {
"type": "Link",
"linkType": "Environment",
"id": "staging"
}
},
"createdAt": "2015-05-18T11:29:46.809Z",
"createdBy": {
"sys": {
"type": "Link",
"linkType": "User",
"id": "7BslKh9TdKGOK41VmLDjFZ"
}
},
"updatedAt": "2015-05-18T11:29:46.809Z",
"updatedBy": {
"sys": {
"type": "Link",
"linkType": "User",
"id": "4FLrUHftHW3v2BLi9fzfjU"
}
}
},
"displayField": "title",
"name": "Blog Post",
"description": "A blog post",
"fields": [
{
"id": "title",
"name": "Title",
"type": "Text",
"localized": true,
"required": true,
"validations": [],
"disabled": false,
"omitted": false
},
{
"id": "body",
"name": "Body",
"type": "Text",
"localized": true,
"required": true,
"validations": [],
"disabled": false,
"omitted": false
}
]
}
]
}
List Environments
Retrieve all environments in a space | key: listEnvironments
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Debug Request boolean debugRequest | false | Enabling this flag will log out the current request. | |
Space ID string / Required spaceId | The ID of the space | yadj1kx9rmg0 |
Example Payload for List Environments
{
"data": [
{
"name": "master",
"sys": {
"type": "Environment",
"id": "master",
"version": 1,
"space": {
"sys": {
"type": "Link",
"linkType": "Space",
"id": "fm17kie1n0p4"
}
},
"status": {
"sys": {
"type": "Link",
"linkType": "Status",
"id": "ready"
}
},
"createdBy": {
"sys": {
"type": "Link",
"linkType": "User",
"id": "5QvxuP1Kp8mVrw3PVcOp4t"
}
},
"createdAt": "2024-01-29T18:33:02Z",
"updatedBy": {
"sys": {
"type": "Link",
"linkType": "User",
"id": "5QvxuP1Kp8mVrw3PVcOp4t"
}
},
"updatedAt": "2024-01-29T18:33:02Z"
}
}
]
}
List Organizations
Retrieve all organizations an account has access to | key: listOrganizations
Input | Default | Notes |
---|---|---|
Connection connection / Required connection | ||
Debug Request boolean debugRequest | false | Enabling this flag will log out the current request. |
Example Payload for List Organizations
{
"data": [
{
"sys": {
"type": "Organization",
"id": "0D9ZC8rLWiw6x5qizZGiRs",
"version": 1,
"createdAt": "2015-05-18T11:29:46.809Z",
"updatedAt": "2015-05-18T11:29:46.809Z"
},
"name": "My organization"
}
]
}
List Spaces
Retrieve all spaces an account has access to | key: listSpaces
Input | Default | Notes |
---|---|---|
Connection connection / Required connection | ||
Debug Request boolean debugRequest | false | Enabling this flag will log out the current request. |
Example Payload for List Spaces
{
"data": [
{
"sys": {
"type": "Space",
"id": "yadj1kx9rmg0",
"version": 3,
"organization": {
"sys": {
"id": "0D9ZC8rLWiw6x5qizZGiRs",
"type": "Link",
"linkType": "Organization"
}
},
"createdAt": "2015-05-18T11:29:46.809Z",
"createdBy": {
"sys": {
"type": "Link",
"linkType": "User",
"id": "7BslKh9TdKGOK41VmLDjFZ"
}
},
"updatedAt": "2015-05-18T11:29:46.809Z",
"updatedBy": {
"sys": {
"type": "Link",
"linkType": "User",
"id": "4FLrUHftHW3v2BLi9fzfjU"
}
}
},
"name": "Contentful Example API"
}
]
}
List Webhooks
Retrieves all webhooks of a space | key: listWebhooks
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Debug Request boolean debugRequest | false | Enabling this flag will log out the current request. | |
Space ID string / Required spaceId | The ID of the space | yadj1kx9rmg0 |
Example Payload for List Webhooks
{
"data": [
{
"sys": {
"type": "WebhookDefinition",
"id": "0KzM2HxYr5O1pZ4SaUzK8h",
"version": 1,
"space": {
"sys": {
"type": "Link",
"linkType": "Space",
"id": "yadj1kx9rmg0"
}
},
"createdAt": "2015-05-18T11:29:46.809Z",
"createdBy": {
"sys": {
"type": "Link",
"linkType": "User",
"id": "7BslKh9TdKGOK41VmLDjFZ"
}
},
"updatedAt": "2015-05-18T11:29:46.809Z",
"updatedBy": {
"sys": {
"type": "Link",
"linkType": "User",
"id": "4FLrUHftHW3v2BLi9fzfjU"
}
}
},
"name": "My webhook",
"url": "https://www.example.com",
"topics": [
"Entry.create",
"ContentType.create",
"*.publish",
"Asset.*"
],
"httpBasicUsername": "yolo",
"headers": [
{
"key": "header1",
"value": "value1"
},
{
"key": "header2",
"value": "value2"
}
],
"filters": [],
"active": true
}
]
}
Process Asset
Process an asset | key: processAsset
Input | Default | Notes | Example |
---|---|---|---|
Asset ID string / Required assetId | The ID of the asset | wtrHxeu3zEoEce2MokCSi | |
Connection connection / Required connection | |||
Debug Request boolean debugRequest | false | Enabling this flag will log out the current request. | |
Environment ID string / Required environmentId | The ID of the environment | staging | |
Space ID string / Required spaceId | The ID of the space | yadj1kx9rmg0 |
Example Payload for Process Asset
{
"data": {}
}
Publish an asset
Publishes an asset | key: publishAnAsset
Input | Default | Notes | Example |
---|---|---|---|
Asset ID string / Required assetId | The ID of the asset | wtrHxeu3zEoEce2MokCSi | |
Connection connection / Required connection | |||
Debug Request boolean debugRequest | false | Enabling this flag will log out the current request. | |
Environment ID string / Required environmentId | The ID of the environment | staging | |
Space ID string / Required spaceId | The ID of the space | yadj1kx9rmg0 |
Example Payload for Publish an asset
{
"data": {
"fields": {
"title": {
"en-US": "Playsam Streamliner"
},
"file": {
"en-US": {
"contentType": "image/jpeg",
"fileName": "example.jpeg",
"upload": "https://example.com/example.jpg"
}
}
},
"metadata": {
"tags": [
{
"sys": {
"type": "Link",
"linkType": "Tag",
"id": "nyCampaign"
}
}
]
},
"sys": {
"firstPublishedAt": "2015-05-15T13:38:11.311Z",
"publishedCounter": 2,
"publishedAt": "2015-05-15T13:38:11.311Z",
"publishedBy": {
"sys": {
"type": "Link",
"linkType": "User",
"id": "4FLrUHftHW3v2BLi9fzfjU"
}
},
"publishedVersion": 9
}
}
}
Publish Bulk Action
Publish a bulk action | key: publishBulkAction
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Debug Request boolean debugRequest | false | Enabling this flag will log out the current request. | |
Environment ID string / Required environmentId | The ID of the environment | staging | |
Items code / Required items | The items of the bulk action | ||
Space ID string / Required spaceId | The ID of the space | yadj1kx9rmg0 |
Example Payload for Publish Bulk Action
{
"data": {
"sys": {
"id": "<bulk_action_id>",
"type": "BulkAction",
"status": "<status>",
"createdBy": {
"sys": {
"type": "Link",
"linkType": "User",
"id": "7BslKh9TdKGOK41VmLDjFZ"
}
},
"createdAt": "2020-01-01T13:00:00.000Z",
"updatedAt": "2020-01-01T13:00:00.000Z",
"space": {
"sys": {
"type": "Link",
"id": "yadj1kx9rmg0"
}
},
"environment": {
"sys": {
"type": "Link",
"id": "staging"
}
}
},
"action": "<action>",
"payload": {
"entities": {
"items": [
{
"sys": {
"id": "<entity_id>",
"type": "Link",
"linkType": "<Entry|Asset>",
"version": 0
}
}
]
}
},
"error": {
"sys": {
"id": "<error_type>",
"type": "Error"
}
}
}
}
Raw Request
Send raw HTTP request to Contentful | key: rawRequest
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Data string data | The HTTP body payload to send to the URL. | {"exampleKey": "Example Data"} | |
Debug Request boolean debugRequest | false | Enabling this flag will log out the current request. | |
File Data string Key Value List fileData | File Data to be sent as a multipart form upload. | [{key: "example.txt", value: "My File Contents"}] | |
File Data File Names string Key Value List fileDataFileNames | File names to apply to the file data inputs. Keys must match the file data keys above. | ||
Form Data string Key Value List formData | The Form Data to be sent as a multipart form upload. | [{"key": "Example Key", "value": new Buffer("Hello World")}] | |
Header string Key Value List headers | A list of headers to send with the request. | User-Agent: curl/7.64.1 | |
Max Retry Count string maxRetries | 0 | The maximum number of retries to attempt. Specify 0 for no retries. | |
Method string / Required method | The HTTP method to use. | ||
Query Parameter string Key Value List queryParams | A list of query parameters to send with the request. This is the portion at the end of the URL similar to ?key1=value1&key2=value2. | ||
Response Type string / Required responseType | json | The type of data you expect in the response. You can request json, text, or binary data. | |
Retry On All Errors boolean retryAllErrors | false | If true, retries on all erroneous responses regardless of type. This is helpful when retrying after HTTP 429 or other 3xx or 4xx errors. Otherwise, only retries on HTTP 5xx and network errors. | |
Retry Delay (ms) string retryDelayMS | 0 | The delay in milliseconds between retries. This is used when 'Use Exponential Backoff' is disabled. | |
Timeout string timeout | The maximum time that a client will await a response to its request | 2000 | |
URL string / Required url | Input the path only (/spaces), The base URL is already included (https://api.contentful.com). For example, to connect to https://api.contentful.com/spaces, only /spaces is entered in this field. | /spaces | |
Use Exponential Backoff boolean useExponentialBackoff | false | Specifies whether to use a pre-defined exponential backoff strategy for retries. When enabled, 'Retry Delay (ms)' is ignored. |
Unpublish an asset
Unpublishes an asset | key: unpublishAnAsset
Input | Default | Notes | Example |
---|---|---|---|
Asset ID string / Required assetId | The ID of the asset | wtrHxeu3zEoEce2MokCSi | |
Connection connection / Required connection | |||
Debug Request boolean debugRequest | false | Enabling this flag will log out the current request. | |
Environment ID string / Required environmentId | The ID of the environment | staging | |
Space ID string / Required spaceId | The ID of the space | yadj1kx9rmg0 |
Example Payload for Unpublish an asset
{
"data": {
"fields": {
"title": {
"en-US": "Playsam Streamliner"
},
"file": {
"en-US": {
"contentType": "image/jpeg",
"fileName": "example.jpeg",
"upload": "https://example.com/example.jpg"
}
}
},
"metadata": {
"tags": [
{
"sys": {
"type": "Link",
"linkType": "Tag",
"id": "nyCampaign"
}
}
]
},
"sys": {
"id": "wtrHxeu3zEoEce2MokCSi",
"type": "Asset",
"version": 1,
"space": {
"sys": {
"type": "Link",
"linkType": "Space",
"id": "yadj1kx9rmg0"
}
},
"environment": {
"sys": {
"type": "Link",
"linkType": "Environment",
"id": "staging"
}
},
"createdAt": "2015-05-18T11:29:46.809Z",
"createdBy": {
"sys": {
"type": "Link",
"linkType": "User",
"id": "7BslKh9TdKGOK41VmLDjFZ"
}
},
"updatedAt": "2015-05-18T11:29:46.809Z",
"updatedBy": {
"sys": {
"type": "Link",
"linkType": "User",
"id": "4FLrUHftHW3v2BLi9fzfjU"
}
}
}
}
}
Unpublish Bulk Action
Unpublish a bulk action | key: unpublishBulkAction
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Debug Request boolean debugRequest | false | Enabling this flag will log out the current request. | |
Environment ID string / Required environmentId | The ID of the environment | staging | |
Items code / Required items | The items of the bulk action | ||
Space ID string / Required spaceId | The ID of the space | yadj1kx9rmg0 |
Example Payload for Unpublish Bulk Action
{
"data": {
"sys": {
"id": "<bulk_action_id>",
"type": "BulkAction",
"status": "<status>",
"createdBy": {
"sys": {
"type": "Link",
"linkType": "User",
"id": "7BslKh9TdKGOK41VmLDjFZ"
}
},
"createdAt": "2020-01-01T13:00:00.000Z",
"updatedAt": "2020-01-01T13:00:00.000Z",
"space": {
"sys": {
"type": "Link",
"id": "yadj1kx9rmg0"
}
},
"environment": {
"sys": {
"type": "Link",
"id": "staging"
}
}
},
"action": "<action>",
"payload": {
"entities": {
"items": [
{
"sys": {
"id": "<entity_id>",
"type": "Link",
"linkType": "<Entry|Asset>",
"version": 0
}
}
]
}
},
"error": {
"sys": {
"id": "<error_type>",
"type": "Error"
}
}
}
}
Update Asset
Update an existing asset | key: updateAsset
Input | Default | Notes | Example |
---|---|---|---|
Asset ID string / Required assetId | The ID of the asset | wtrHxeu3zEoEce2MokCSi | |
Connection connection / Required connection | |||
Debug Request boolean debugRequest | false | Enabling this flag will log out the current request. | |
New Asset Description code description | The updated description of the asset. Locale key must match the original locale of the asset to be updated | ||
Environment ID string / Required environmentId | The ID of the environment | staging | |
Space ID string / Required spaceId | The ID of the space | yadj1kx9rmg0 | |
Title code title | The updated title of the asset. Locale key must match the original locale of the asset to be updated |
Example Payload for Update Asset
{
"data": {
"fields": {
"title": {
"en-US": "Playsam Streamliner"
},
"file": {
"en-US": {
"contentType": "image/jpeg",
"fileName": "example.jpeg",
"upload": "https://example.com/example.jpg"
}
}
},
"metadata": {
"tags": [
{
"sys": {
"type": "Link",
"linkType": "Tag",
"id": "nyCampaign"
}
}
]
},
"sys": {
"id": "wtrHxeu3zEoEce2MokCSi",
"type": "Asset",
"version": 1,
"space": {
"sys": {
"type": "Link",
"linkType": "Space",
"id": "yadj1kx9rmg0"
}
},
"environment": {
"sys": {
"type": "Link",
"linkType": "Environment",
"id": "staging"
}
},
"createdAt": "2015-05-18T11:29:46.809Z",
"createdBy": {
"sys": {
"type": "Link",
"linkType": "User",
"id": "7BslKh9TdKGOK41VmLDjFZ"
}
},
"updatedAt": "2015-05-18T11:29:46.809Z",
"updatedBy": {
"sys": {
"type": "Link",
"linkType": "User",
"id": "4FLrUHftHW3v2BLi9fzfjU"
}
}
}
}
}
Update Content Type
Update an existing content type | key: updateContentType
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Content Type ID string / Required contentTypeId | The ID of the content type | 2PqfXUJwE8qSYKuM0U6w8M | |
Debug Request boolean debugRequest | false | Enabling this flag will log out the current request. | |
Description string description | The updated description for the content type | A blog post | |
Display Field string displayField | The updated Field used as the main display field for Entries | title | |
Environment ID string / Required environmentId | The ID of the environment | staging | |
Content Type Fields code fields | The updated fields for the content type | ||
Content Type Name string name | The updated name for the content type | Blog Post | |
Space ID string / Required spaceId | The ID of the space | yadj1kx9rmg0 |
Example Payload for Update Content Type
{
"data": {
"sys": {
"type": "ContentType",
"id": "3ORKIAOaJqQWWg86MWkyOs",
"version": 1,
"space": {
"sys": {
"type": "Link",
"linkType": "Space",
"id": "yadj1kx9rmg0"
}
},
"environment": {
"sys": {
"type": "Link",
"linkType": "Environment",
"id": "staging"
}
},
"createdAt": "2015-05-18T11:29:46.809Z",
"createdBy": {
"sys": {
"type": "Link",
"linkType": "User",
"id": "7BslKh9TdKGOK41VmLDjFZ"
}
},
"updatedAt": "2015-05-18T11:29:46.809Z",
"updatedBy": {
"sys": {
"type": "Link",
"linkType": "User",
"id": "4FLrUHftHW3v2BLi9fzfjU"
}
}
},
"displayField": "title",
"name": "Blog Post",
"description": "A blog post",
"fields": [
{
"id": "title",
"name": "Title",
"type": "Text",
"localized": true,
"required": true,
"validations": [],
"disabled": false,
"omitted": false
},
{
"id": "body",
"name": "Body",
"type": "Text",
"localized": true,
"required": true,
"validations": [],
"disabled": false,
"omitted": false
}
]
}
}
Update Environment
Edit an existing environment | key: updateEnvironment
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Debug Request boolean debugRequest | false | Enabling this flag will log out the current request. | |
Environment ID string / Required environmentId | The ID of the environment | staging | |
Environment Name string / Required name | The updated name for the environment | Staging | |
Space ID string / Required spaceId | The ID of the space | yadj1kx9rmg0 |
Example Payload for Update Environment
{
"data": {
"name": "master",
"sys": {
"type": "Environment",
"id": "master",
"version": 1,
"space": {
"sys": {
"type": "Link",
"linkType": "Space",
"id": "fm17kie1n0p4"
}
},
"status": {
"sys": {
"type": "Link",
"linkType": "Status",
"id": "ready"
}
},
"createdBy": {
"sys": {
"type": "Link",
"linkType": "User",
"id": "5QvxuP1Kp8mVrw3PVcOp4t"
}
},
"createdAt": "2024-01-29T18:33:02Z",
"updatedBy": {
"sys": {
"type": "Link",
"linkType": "User",
"id": "5QvxuP1Kp8mVrw3PVcOp4t"
}
},
"updatedAt": "2024-01-29T18:33:02Z"
}
}
}
Update Organization
Update an organization security contact an admin or owner has access to | key: updateOrganization
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Debug Request boolean debugRequest | false | Enabling this flag will log out the current request. | |
Organization ID string / Required organizationId | The ID of the organization | 1Qz7ThNuABCytfP4oqkF12 | |
Security ID string / Required securityId | The ID of the security contact | srdfsguf8325yusf24 |
Example Payload for Update Organization
{
"data": {
"email": "example@gmail.com",
"sys": {
"type": "Security Contact",
"id": "srdfsguf8325yusf24",
"version": "1",
"organization": {
"sys": {
"id": "0D9ZC8rLWiw6x5qizZGiRs",
"type": "Link",
"linkType": "Organization"
}
},
"createdBy": {
"sys": {
"id": "1xGZIRXr2WPnsLkKfREo0z",
"type": "Link",
"linkType": "User"
}
},
"updatedBy": {
"sys": {
"id": "1xGZIRXr2WPnsLkKfREo0z",
"type": "Link",
"linkType": "User"
}
},
"createdAt": "2019-05-18T11:39:46.809Z",
"updatedAt": "2019-05-18T11:39:46.809Z"
}
}
}
Update Space
Edit an existing Space | key: updateSpace
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Debug Request boolean debugRequest | false | Enabling this flag will log out the current request. | |
Space ID string / Required spaceId | The ID of the space | yadj1kx9rmg0 | |
Space Name string / Required spaceName | The updated name for the space | My Space |
Example Payload for Update Space
{
"data": {
"sys": {
"type": "Space",
"id": "yadj1kx9rmg0",
"version": 3,
"organization": {
"sys": {
"id": "0D9ZC8rLWiw6x5qizZGiRs",
"type": "Link",
"linkType": "Organization"
}
},
"createdAt": "2015-05-18T11:29:46.809Z",
"createdBy": {
"sys": {
"type": "Link",
"linkType": "User",
"id": "7BslKh9TdKGOK41VmLDjFZ"
}
},
"updatedAt": "2015-05-18T11:29:46.809Z",
"updatedBy": {
"sys": {
"type": "Link",
"linkType": "User",
"id": "4FLrUHftHW3v2BLi9fzfjU"
}
}
},
"name": "Contentful Example API"
}
}
Update Webhook
Update an existing webhook | key: updateWebhook
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Debug Request boolean debugRequest | false | Enabling this flag will log out the current request. | |
Name string / Required name | The updated name for the webhook | Example Webhook | |
Space ID string / Required spaceId | The ID of the space | yadj1kx9rmg0 | |
Webhook ID string / Required webhookId | The ID of the webhook | 5KsDBWseXY6QegucYAoacS |
Example Payload for Update Webhook
{
"data": {
"sys": {
"type": "WebhookDefinition",
"id": "0KzM2HxYr5O1pZ4SaUzK8h",
"version": 1,
"space": {
"sys": {
"type": "Link",
"linkType": "Space",
"id": "yadj1kx9rmg0"
}
},
"createdAt": "2015-05-18T11:29:46.809Z",
"createdBy": {
"sys": {
"type": "Link",
"linkType": "User",
"id": "7BslKh9TdKGOK41VmLDjFZ"
}
},
"updatedAt": "2015-05-18T11:29:46.809Z",
"updatedBy": {
"sys": {
"type": "Link",
"linkType": "User",
"id": "4FLrUHftHW3v2BLi9fzfjU"
}
}
},
"name": "My webhook",
"url": "https://www.example.com",
"topics": [
"Entry.create",
"ContentType.create",
"*.publish",
"Asset.*"
],
"httpBasicUsername": "yolo",
"headers": [
{
"key": "header1",
"value": "value1"
},
{
"key": "header2",
"value": "value2"
}
],
"filters": [],
"active": true
}
}
Upload File
Upload a file to temporary file storage | key: uploadFile
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Debug Request boolean debugRequest | false | Enabling this flag will log out the current request. | |
File Contents data / Required fileContents | The contents to write to a file. This can be a string of text, it can be binary data that was generated in a previous step. | My File Contents | |
Space ID string / Required spaceId | The ID of the space | yadj1kx9rmg0 |
Example Payload for Upload File
{
"data": {
"sys": {
"type": "Upload",
"id": "2DNvIbYNELgqLJUkgTeIOV",
"space": {
"sys": {
"type": "Link",
"linkType": "Space",
"id": "yadj1kx9rmg0"
}
},
"expiresAt": "2015-05-18T11:29:46.809Z",
"createdAt": "2015-05-18T11:29:46.809Z",
"createdBy": {
"sys": {
"type": "Link",
"linkType": "User",
"id": "4FLrUHftHW3v2BLi9fzfjU"
}
}
}
}
}