Create a new component

Authentication

AuthorizationBearer
Contentful Management API token

Path parameters

spaceIdstringRequired
environmentIdstringRequired

Query parameters

access_tokenstringOptional

Request

Body
descriptionstringRequired
contentPropertieslist of objectsRequired

Declares the data a component accepts. Supported types include scalar values, RichText, JSON, DateTime, Array, Record, TypeRef, ResourceLink, Literal, and DiscriminatedUnion. JSON does not accept defaultValue; declare Record members in fields.

designPropertieslist of objectsRequired
componentTreelist of objectsRequired
The component's component tree. Send an array of nodes for a composed component (an empty array is allowed), or send null for a coded component that has no component tree. The field is required: a request that omits it is rejected with a 422 ComponentTreeRequired error. On update, null removes the stored tree.
namestringOptional
slotslist of objectsOptional
metadataobjectOptional
dataAssemblieslist of objectsOptional

Response

201
sysobject
namestring
descriptionstring
contentPropertieslist of objects
designPropertieslist of objects
componentTreelist of objects or nullOptional
slotslist of objectsOptional
metadataobjectOptional
dataAssemblieslist of objectsOptional

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
422
Unprocessable Entity Error
500
Internal Server Error
503
Service Unavailable Error