POST/ng-cms/content/{projectId}/{typeKey}

Create a content entry

Параметры запроса

projectIdstring
Обязательный

The unique identifier of the project

typeKeystring
Обязательный

The key of the content type (e.g. blog-post). Must match an existing content type in the project.

Тело запроса

CreateContentEntryRequest
fieldsobject
Обязательный

Key-value map of field data. Keys must match the field keys defined in the content type schema. Values are validated against each field's type and constraints.

Ответы

201Entry created successfully in Draft status. Returns the new entry ID.

тип: ApiResponse<string>

successbooleanIndicates whether the request was successful
resultstringThe ID of the newly created content entry
errorsErrorDetail[]List of errors (empty on success)
400Validation failed — fields do not satisfy the content type schema constraints.

тип: ApiResponse<T>

isValidbooleanAlways false for validation errors
validationErrorsValidationError[]List of validation failures
namestringField that failed validation
attemptedValueobjectThe value that was submitted
messagestringHuman-readable validation message
401Unauthorized. A valid API key is required.
404Not Found. No content type exists with the given typeKey in this project.
412Precondition Failed. The project's current plan does not allow access to this resource, or payment is required to proceed.
500Unexpected server error.

тип: ApiResponse<T>

successbooleanAlways false
errorsErrorDetail[]List of server-side errors
correlationIdstringUnique ID for tracing the error
messagestringError message
stackstringStack trace (non-production only)

Исходный код

Референсные реализации этого эндпоинта — если поведение неочевидно, проще свериться с кодом, чем гадать.

Клиентские библиотеки

Официальные SDK для вызова этого метода из вашего кода — без ручной сборки запроса.

Konso.Clients.Cms
NuGet
dotnet add package Konso.Clients.Cms
Страница пакетаarrow_outward
@konso/cms-client
npm
npm install @konso/cms-client
Страница пакетаarrow_outward

Оставаясь на сайте, Вы даете свое согласие на использование файлов cookie