# Create new content Upload files using multipart/form-data to directly upload files. Comprehensive Validation System: The content creation endpoint performs multiple layers of validation to ensure data integrity: 1. Schema Validation: - categoryId: Must be a valid UUID - metadata: Must be a valid JSON object (if provided) - fileFormat: Required string specifying the file's MIME type - fileName: Optional string for the file name 2. Business Logic Validation: - Category Existence: Validates that the specified categoryId exists in the dataspace's ontology - Metadata Query Binding: Ensures all provided metadata queries are bound to the specified category - Data Type Validation: Verifies that metadata values match the expected data types (STRING, SHORT_STRING, NUMBER, BOOLEAN, DATE) 3. Required Metadata Validation: - Default Behavior: validateRequiredMetadata defaults to true when not specified - When enabled (default): Enforces that all required metadata queries and unique index elements are provided - When disabled (validateRequiredMetadata=false): Allows content creation without required metadata queries 4. File Upload Validation: - File must be provided in the multipart form data - File format fallback: Uses detected MIME type if fileFormat not specified - File name fallback: Uses original filename if fileName not specified Query Parameters: - validateRequiredMetadata: Optional boolean (defaults to true) - Set to "false" to skip required metadata validation - Set to "true" or omit to enforce required metadata validation Error Scenarios: - 400 Bad Request: Invalid schema, category not found, unbound metadata queries, type mismatches, missing required metadata - 401 Unauthorized: Invalid or missing authentication - 404 Not Found: Dataspace not found Endpoint: POST /content/{dataspaceId} Version: 1.0.0 Security: bearerAuth ## Path parameters: - `dataspaceId` (string, required) Short dataspace ID with sds- prefix Example: "sds-abc12345" ## Query parameters: - `validateRequiredMetadata` (string) Whether to validate that all required metadata queries are provided (defaults to true when not specified) ## Request fields (multipart/form-data): - `categoryId` (string) UUID of the category Example: "123e4567-e89b-12d3-a456-426614174001" - `metadata` (object) Optional metadata for the content item Example: {"author":"John Doe","category":"research"} - `fileFormat` (string, required) Format of the file Example: "application/pdf" - `fileName` (string) Name of the file Example: "document.pdf" - `file` (string) The file to upload ## Response 201 fields (application/json): - `contentId` (string, required) Example: "123e4567-e89b-12d3-a456-426614174000" - `categoryId` (string, required) Example: "123e4567-e89b-12d3-a456-426614174001" - `dataspaceId` (string, required) Example: "123e4567-e89b-12d3-a456-426614174002" - `fileFormat` (string, required) Example: "application/pdf" - `metadata` (object) Optional metadata for the content item Example: {"category":"documents","priority":1} - `inferenceTaskExecutions` (object) Optional record of inference task executions that modified this content Example: {"categoryId":"789e0123-e89b-12d3-a456-426614174002"} - `vectorStoreFileId` (string,null) OpenAI vector store file ID (generated internally) Example: "file-abc123xyz789" - `createdAt` (string, required) Example: "2024-01-15T10:30:00Z" - `updatedAt` (string,null, required) Example: "2024-01-15T14:30:00Z" ## Response 400 fields ## Response 401 fields ## Response 404 fields