POST
/ng-cms/content-type-templates/{projectId}/{code}/applyhttps://apis-spb.konso.io/ng-cms/content-type-templates/{projectId}/{code}/applysmart_toyAgentic specApply a content type template
Создает пакет новых типов контента на основе заданного шаблона в рамках проекта и разрешает ссылки между вновь созданными типами.
Параметры запроса
projectIdstringThe unique identifier of the project
codestringTemplate code to apply, as returned by the list-templates endpoint (e.g. 'website', 'blog', 'documentation', 'marketplace')
Ответы
200Content types created from the template. If a content type with the same key already exists in the project, its key and name are suffixed to avoid a collision. Returns the newly created content types, with reference fields resolved to the real IDs of the other content types created in the same call.
тип: ApiResponse<CmsContentTypeDto[]>
successbooleanAlways true on successresultCmsContentTypeDto[]The content types created from the templateidstringUnique identifier of the content typeprojectIdstringProject (bucket) this content type belongs tonamestringHuman-readable display namekeystringUnique machine-readable identifierdescriptionstringOptional description of the content typedisplayFieldstringSchema field key used as the display/title field for entriesschemaCmsSchemaField[]Array of field definitions. Reference fields point at the real content type ID via referenceContentTypeIdschemaVersionnumberIncremented each time the schema is modifiedfieldsCountnumberNumber of fields in the schemaentriesCountnumberNumber of content entries for this content type (0 for a freshly applied template)isActivebooleanWhether the content type is activecreatedBynumberID of the user who created the content typeupdatedBynumberID of the user who last updated the content typeupdatedByNamestringName of the user who last updated the content typecreatedAtstringISO 8601 timestamp of creationupdatedAtstringISO 8601 timestamp of last updatehasNestedbooleanWhether the content type has nested/child content typessystemTagsstring[]System-assigned tagserrorsErrorDetail[]Empty on success401Unauthorized. A valid API key is required.
404No template exists for the given code.
412Precondition Failed. The project's current plan does not allow access to this resource, or payment is required.
500Unexpected server error.
тип: ApiResponse<T>
successbooleanAlways falseerrorsErrorDetail[]List of server-side errorscorrelationIdstringUnique ID for tracing the errormessagestringError messagestackstringStack trace (non-production only)Язык:
expand_more
Пример запроса
curl --request POST \
--url https://apis-spb.konso.io/ng-cms/content-type-templates/{projectId}/{code}/apply \
--header 'x-api-key: <api-key>'Response Example200
{
"success": true,
"result": [
{
"id": "ct_a1b2c3d4e5f6",
"projectId": "my-project-id",
"name": "Author",
"key": "author",
"description": null,
"displayField": "name",
"schema": [
{ "key": "name", "label": "Name", "type": "shorttext", "required": true },
{ "key": "bio", "label": "Bio", "type": "longtext" }
],
"schemaVersion": 1,
"fieldsCount": 2,
"entriesCount": 0,
"isActive": true,
"createdBy": 42,
"updatedBy": null,
"updatedByName": null,
"createdAt": "2026-07-24T10:00:00Z",
"updatedAt": "2026-07-24T10:00:00Z",
"hasNested": false,
"systemTags": []
},
{
"id": "ct_b2c3d4e5f6a7",
"projectId": "my-project-id",
"name": "Blog Post",
"key": "blog_post",
"description": null,
"displayField": "title",
"schema": [
{ "key": "title", "label": "Title", "type": "shorttext", "required": true },
{ "key": "author", "label": "Author", "type": "reference", "referenceContentTypeId": "ct_a1b2c3d4e5f6" }
],
"schemaVersion": 1,
"fieldsCount": 2,
"entriesCount": 0,
"isActive": true,
"createdBy": 42,
"updatedBy": null,
"updatedByName": null,
"createdAt": "2026-07-24T10:00:00Z",
"updatedAt": "2026-07-24T10:00:00Z",
"hasNested": false,
"systemTags": []
}
],
"errors": []
}KONSO