/ng-cms/content-types/{projectId}/{key}https://apis-spb.konso.io/ng-cms/content-types/{projectId}/{key}Update a content type
Параметры запроса
projectIdstringThe unique identifier of the project
keystringThe ID or key of the content type to update
Тело запроса
UpdateContentTypeRequestidstringID of the content type to update
namestringHuman-readable display name for the content type
keystringUnique machine-readable identifier for the content type (e.g. 'blog-post')
descriptionstringOptional description of the content type's purpose
displayFieldstringKey of the schema field used as the display/title field for entries
schemaCmsSchemaField[]Full replacement array of field definitions for the content type's schema
CmsSchemaFieldkeystringUnique field identifier within the schema
labelstringHuman-readable field label
typestringField data type: text, richtext, number, boolean, date, reference
requiredbooleanWhether the field is required when creating entries
minLengthnumberMinimum character length for text fields
maxLengthnumberMaximum character length for text fields
minnumberMinimum value for numeric fields
maxnumberMaximum value for numeric fields
regexstringRegular expression pattern for value validation
uniquebooleanWhether field values must be unique across entries
allowedValuesstring[]Enumerated list of permitted values
referenceContentTypeIdstringID of another content type for reference/relation fields
Ответы
тип: ApiResponse<string>
successbooleanIndicates whether the request was successfulresultstringThe ID of the updated content typeerrorsErrorDetail[]List of errors (empty on success)тип: ApiResponse<T>
isValidbooleanAlways false for validation errorsvalidationErrorsValidationError[]List of validation failuresnamestringField that failed validationattemptedValueobjectThe value that was submittedmessagestringHuman-readable validation messageтип: ApiResponse<T>
successbooleanAlways falseerrorsErrorDetail[]List of server-side errorscorrelationIdstringUnique ID for tracing the errormessagestringError messagestackstringStack trace (non-production only)curl --request PUT \\
--url https://apis-spb.konso.io/ng-cms/content-types/{projectId}/{key} \\
--header 'x-api-key: <api-key>' \\
--header 'Content-Type: application/json' \\
--data '{
"name": "Blog Post",
"key": "blog-post",
"description": "Updated blog post content type",
"displayField": "title",
"schema": [
{ "key": "title", "label": "Title", "type": "text", "required": true, "maxLength": 300 },
{ "key": "body", "label": "Body", "type": "richtext", "required": true }
]
}'{
"success": true,
"result": "ct_a1b2c3d4e5f6",
"errors": []
}