Declares a custom object type. Give it a type slug (such as size_guide), a name, and the fieldDefinitions its records will carry - each with a key, a type and optional validations. Once created, you can add Metaobjects of this type.
Request body
Property
Type
Required
Description
description
string | null
-
displayNameField
string | null
-
The key of the field definition used as the display name for records of this type. Optional - when omitted it is null and records have no derived display name. When set, it must match the key of one of this definition's fieldDefinitions, otherwise the request is rejected with 422.
fieldDefinitions
EmbeddedMetaobjectFieldDefinitionResource[]
-
The field definitions that make up this metaobject definition.
Show fieldDefinitions fields
Property
Type
Required
Description
description
string | null
-
An optional description of the field.
key
string
required
The field key, unique within the definition (referenced by metaobject fields).
name
string
required
The human-readable name of the field.
required
boolean
-
Whether a value for this field is required on metaobjects of the definition.
The validation parameter value. Format depends on the validation type.
name
string
required
type
string
required
Response
201 - MetaobjectDefinition resource created
Property
Type
Required
Description
@context
string | object
-
@id
string
required
@type
string
required
createdAt
string
-
The date and time when the resource was created (ISO 8601 format).
description
string | null
-
The description of the metaobject definition.
displayNameField
string | null
-
The key of the field definition used as the display name for records of this type. Optional - when omitted it is null and records have no derived display name. When set, it must match the key of one of this definition's fieldDefinitions, otherwise the request is rejected with 422.
fieldDefinitions
EmbeddedMetaobjectFieldDefinitionResource[]
-
The field definitions that make up this metaobject definition.
Show fieldDefinitions fields
Property
Type
Required
Description
description
string | null
-
An optional description of the field.
id
string
-
The resource's unique identifier (UUID).
key
string
required
The field key, unique within the definition (referenced by metaobject fields).
name
string
required
The human-readable name of the field.
required
boolean
-
Whether a value for this field is required on metaobjects of the definition.
The validation parameter value. Format depends on the validation type.
id
string
-
The resource's unique identifier (UUID).
name
string
required
The human-readable name of the metaobject definition.
type
string
required
The unique slug identifier for this metaobject definition.
updatedAt
string
-
The date and time when the resource was last modified (ISO 8601 format).
Property
Type
Required
Description
createdAt
string
-
The date and time when the resource was created (ISO 8601 format).
description
string | null
-
The description of the metaobject definition.
displayNameField
string | null
-
The key of the field definition used as the display name for records of this type. Optional - when omitted it is null and records have no derived display name. When set, it must match the key of one of this definition's fieldDefinitions, otherwise the request is rejected with 422.
fieldDefinitions
EmbeddedMetaobjectFieldDefinitionResource[]
-
The field definitions that make up this metaobject definition.
Show fieldDefinitions fields
Property
Type
Required
Description
description
string | null
-
An optional description of the field.
id
string
-
The resource's unique identifier (UUID).
key
string
required
The field key, unique within the definition (referenced by metaobject fields).
name
string
required
The human-readable name of the field.
required
boolean
-
Whether a value for this field is required on metaobjects of the definition.