> ## Documentation Index
> Fetch the complete documentation index at: https://docs.useinvent.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Content

> Create a new content for the organization.



## OpenAPI

````yaml https://api.useinvent.com/openapi.json post /orgs/{org_id}/knowledge/contents
openapi: 3.1.0
info:
  version: 1.0.0
  title: Invent API
servers:
  - url: https://api.useinvent.com
security:
  - bearerAuth: []
paths:
  /orgs/{org_id}/knowledge/contents:
    post:
      tags:
        - Orgs Knowledge
      summary: Create Content
      description: Create a new content for the organization.
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the org
          name: org_id
          in: path
      requestBody:
        description: The content information.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateVectorContentSchema'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/CreateVectorContentSchema'
      responses:
        '200':
          description: The created content.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VectorContentLimitedSchema'
components:
  schemas:
    CreateVectorContentSchema:
      type: object
      properties:
        title:
          type: string
          minLength: 1
          maxLength: 255
        content:
          $ref: '#/components/schemas/VectorContentConfigSchema'
      required:
        - content
      description: Schema for creating a vector
    VectorContentLimitedSchema:
      type: object
      properties:
        id:
          type: string
        title:
          type: string
          description: Title of the vector
        type:
          $ref: '#/components/schemas/VectorTypeSchema'
        content:
          $ref: '#/components/schemas/VectorContentConfigSchema'
        parent_content_id:
          type: string
          description: Parent content ID
        size:
          type: number
          description: Size of the vector in bytes
        chunks_processed:
          type: number
          description: Number of chunks processed for the vector
        chunks_count:
          type: number
          description: Number of chunks in the vector
        children:
          type: array
          items:
            $ref: '#/components/schemas/VectorContentChildSchema'
          description: Children (for URL crawl parents)
        error:
          type:
            - string
            - 'null'
          description: Error message if vector processing failed
        status:
          $ref: '#/components/schemas/VectorStatusSchema'
        created_at:
          type:
            - string
            - 'null'
          format: date-time
        updated_at:
          type:
            - string
            - 'null'
          format: date-time
      required:
        - id
        - title
        - type
        - content
        - size
        - chunks_processed
        - chunks_count
        - error
        - status
        - created_at
        - updated_at
      description: Schema for vector content
    VectorContentConfigSchema:
      oneOf:
        - $ref: '#/components/schemas/VectorContentTextConfigSchema'
        - $ref: '#/components/schemas/VectorContentFileConfigSchema'
        - $ref: '#/components/schemas/VectorContentUrlConfigSchema'
      discriminator:
        propertyName: type
        mapping:
          TEXT:
            $ref: '#/components/schemas/VectorContentTextConfigSchema'
          FILE:
            $ref: '#/components/schemas/VectorContentFileConfigSchema'
          URL:
            $ref: '#/components/schemas/VectorContentUrlConfigSchema'
      description: Content configuration schema for different vector input types
    VectorTypeSchema:
      type: string
      enum:
        - TEXT
        - FILE
        - URL
      description: Type of the vector content
    VectorContentChildSchema:
      type: object
      properties:
        id:
          type: string
        status:
          $ref: '#/components/schemas/VectorStatusSchema'
        title:
          type: string
          description: Title of the child content
        content:
          $ref: '#/components/schemas/VectorContentConfigSchema'
        parent_content_id:
          type: string
          description: Parent content ID
        size:
          type: number
          description: Size of the vector in bytes
        chunks_processed:
          type: number
          description: Number of chunks processed for the vector
        chunks_count:
          type: number
          description: Number of chunks in the vector
        error:
          type:
            - string
            - 'null'
          description: Error message if vector processing failed
        created_at:
          type:
            - string
            - 'null'
          format: date-time
        updated_at:
          type:
            - string
            - 'null'
          format: date-time
      required:
        - id
        - status
        - title
        - content
        - size
        - chunks_processed
        - chunks_count
        - error
        - created_at
        - updated_at
      description: Child content reference
    VectorStatusSchema:
      type: string
      enum:
        - PENDING
        - PROCESSING
        - PROCESSED
        - FAILED
      description: Status of vector processing
    VectorContentTextConfigSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - TEXT
        text:
          type: string
          minLength: 1
          maxLength: 2097152
      required:
        - type
    VectorContentFileConfigSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - FILE
        file:
          $ref: '#/components/schemas/FileSchema'
      required:
        - type
        - file
    VectorContentUrlConfigSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - URL
        mode:
          $ref: '#/components/schemas/VectorContentUrlModeSchema'
        url:
          type: string
          maxLength: 2048
        include_path_patterns:
          type: array
          items:
            type: string
            maxLength: 2048
          maxItems: 256
          description: Include paths patterns
          example:
            - /docs/*
            - /api/*
        exclude_path_patterns:
          type: array
          items:
            type: string
            maxLength: 2048
          maxItems: 256
          description: Exclude paths patterns
          example:
            - /admin/*
            - /private/*
      required:
        - type
        - mode
        - url
    FileSchema:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the file
        file_path:
          type: string
          maxLength: 2048
          description: Path to the file in the storage system
        file_filename:
          type: string
          maxLength: 255
          description: Name of the file
          example: document.pdf
        file_size:
          type: number
          description: Size of the file in bytes
          example: 1024
        file_mimetype:
          type: string
          maxLength: 255
          description: MIME type of the file
          example: application/pdf
        file_url:
          type: string
          maxLength: 2048
          description: URL to access the file
        created_at:
          type:
            - string
            - 'null'
          format: date-time
          description: Timestamp when the file was created
      required:
        - id
        - file_path
        - file_filename
        - file_size
        - file_mimetype
        - file_url
        - created_at
      description: Detailed information about a file
    VectorContentUrlModeSchema:
      type: string
      enum:
        - CRAWL
        - SINGLE_URL
      description: Mode of URL content processing
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: Bearer token authentication using your API key

````