younifyd
Menu

Create Content Type

Create a content type

POST/spaces/{spaceId}/environments/{environmentId}/content_types

Use it in a workflow

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

Request

Path parameters

spaceIdstringrequired

ID of the space

environmentIdstringrequired

ID of the environment

Request body

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

descriptionstring

Description of the content type

displayFieldstring

ID of the field to use as the display field

fieldsarray<object>required
idstringrequired

ID of the field

itemsobject
linkTypestring

For Link fields, defines what type of resource it links to

One ofEntryAsset

localizedbooleanrequired

Whether the field is localized

namestringrequired

Name of the field

requiredbooleanrequired

Whether the field is required

defaultValueobject

Default value for the field

typestringrequired

Type of the field

One ofSymbolTextIntegerNumberDateLocationBooleanLinkArrayObject

omittedboolean

Whether the field is omitted

disabledboolean

Whether the field is disabled

validationsarray<object>15 fields

Validations that can be applied to the field

namestringrequired

Name of the content type

json
{
  "fields": [
    {
      "id": "string",
      "localized": false,
      "name": "string",
      "required": false,
      "type": "Symbol",
      "items": {},
      "linkType": "Entry",
      "defaultValue": {},
      "omitted": false,
      "disabled": false,
      "validations": [
        {
          "size": {},
          "linkContentType": {},
          "linkMimetypeGroup": {},
          "in": {},
          "regexp": {},
          "unique": {},
          "range": {},
          "dateRange": {},
          "assetImageDimensions": {},
          "assetFileSize": {},
          "assetFileType": {},
          "enabledNodeTypes": {}
        }
      ]
    }
  ],
  "name": "string",
  "description": "string",
  "displayField": "string"
}

Response

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

descriptionstring

Description of the content type

displayFieldstring

ID of the field to use as the display field

fieldsarray<object>
idstringrequired

ID of the field

itemsobject
linkTypestring

For Link fields, defines what type of resource it links to

One ofEntryAsset

localizedbooleanrequired

Whether the field is localized

namestringrequired

Name of the field

requiredbooleanrequired

Whether the field is required

defaultValueobject

Default value for the field

typestringrequired

Type of the field

One ofSymbolTextIntegerNumberDateLocationBooleanLinkArrayObject

omittedboolean

Whether the field is omitted

disabledboolean

Whether the field is disabled

validationsarray<object>15 fields

Validations that can be applied to the field

namestring

Name of the content type

sysobject
idstringrequired

Resource ID

typestringrequired

Resource type

environmentobject1 fields
spaceobjectrequired1 fields
createdByobjectrequired1 fields
updatedByobject1 fields
updatedAtstring (date-time)

Last update timestamp

versioninteger (int64)required

Resource version

json
{
  "fields": [
    {
      "id": "string",
      "localized": false,
      "name": "string",
      "required": false,
      "type": "Symbol",
      "items": {},
      "linkType": "Entry",
      "defaultValue": {},
      "omitted": false,
      "disabled": false,
      "validations": [
        {
          "size": {},
          "linkContentType": {},
          "linkMimetypeGroup": {},
          "in": {},
          "regexp": {},
          "unique": {},
          "range": {},
          "dateRange": {},
          "assetImageDimensions": {},
          "assetFileSize": {},
          "assetFileType": {},
          "enabledNodeTypes": {}
        }
      ]
    }
  ],
  "name": "string",
  "sys": {
    "id": "string",
    "type": "string",
    "space": {
      "sys": {
        "id": "string",
        "type": "string",
        "linkType": "string"
      }
    },
    "createdBy": {
      "sys": {
        "id": "string",
        "type": "string",
        "linkType": "string"
      }
    },
    "version": 0,
    "environment": {
      "sys": {
        "id": "string",
        "type": "string",
        "linkType": "string"
      }
    },
    "updatedBy": {
      "sys": {
        "id": "string",
        "type": "string",
        "linkType": "string"
      }
    },
    "updatedAt": "2025-01-01T00:00:00Z"
  },
  "description": "string",
  "displayField": "string"
}

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

Was this page helpful?