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

# Create Asset



## OpenAPI

````yaml /openapi.json post /assets
openapi: 3.0.0
info:
  title: Korint Documentation
  description: Korint API Documentation
  version: 1.0.0
  contact: {}
servers: []
security:
  - bearerAuth: []
tags: []
paths:
  /assets:
    post:
      tags:
        - asset
      summary: Create Asset
      operationId: AssetController_createAsset
      parameters:
        - name: whenAt
          required: false
          in: query
          description: 'Optional: the whenAt datetime'
          schema:
            type: string
        - name: branchId
          required: true
          in: query
          description: the branchId
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAssetBody'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateAssetOutput'
        '400':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/InvalidCustomFieldsErrorDto'
                  - $ref: '#/components/schemas/InvalidEventCreationDateErrorDto'
                  - $ref: '#/components/schemas/InvalidProductErrorDto'
                  - $ref: '#/components/schemas/InvalidAssetStartedAtErrorDto'
              examples:
                INVALID_CUSTOM_FIELDS:
                  $ref: '#/components/schemas/InvalidCustomFieldsErrorDto'
                INVALID_EVENT_CREATION_DATE:
                  $ref: '#/components/schemas/InvalidEventCreationDateErrorDto'
                INVALID_PRODUCT:
                  $ref: '#/components/schemas/InvalidProductErrorDto'
                INVALID_ASSET_STARTED_AT:
                  $ref: '#/components/schemas/InvalidAssetStartedAtErrorDto'
          description: ''
        '403':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/ForbiddenErrorDto'
              examples:
                FORBIDDEN:
                  $ref: '#/components/schemas/ForbiddenErrorDto'
          description: ''
        '404':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/PolicyNotFoundErrorDto'
              examples:
                POLICY_NOT_FOUND:
                  $ref: '#/components/schemas/PolicyNotFoundErrorDto'
          description: ''
        '409':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/ConflictingContractTypeErrorDto'
                  - $ref: '#/components/schemas/ConflictingFieldDefinitionErrorDto'
                  - $ref: '#/components/schemas/ConflictingPolicyStatusErrorDto'
              examples:
                CONFLICTING_CONTRACT_TYPE:
                  $ref: '#/components/schemas/ConflictingContractTypeErrorDto'
                CONFLICTING_FIELD_DEFINITION:
                  $ref: '#/components/schemas/ConflictingFieldDefinitionErrorDto'
                CONFLICTING_POLICY_STATUS:
                  $ref: '#/components/schemas/ConflictingPolicyStatusErrorDto'
          description: ''
components:
  schemas:
    CreateAssetBody:
      type: object
      properties:
        customFields:
          description: custom fields per product
          type: array
          items:
            $ref: '#/components/schemas/NullableCustomFieldDto'
        name:
          type: string
          description: 'Optional: Name of the entity'
        policyId:
          type: string
          description: policyId of asset owner
        externalAssetId:
          type: string
          description: externalAssetId
        startedAt:
          type: string
          description: startedAt
      required:
        - policyId
    CreateAssetOutput:
      type: object
      properties:
        type:
          type: string
          description: type of entity
        id:
          type: string
          description: id of the entity
      required:
        - type
        - id
    InvalidCustomFieldsErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - INVALID_CUSTOM_FIELDS
        message:
          type: string
          example: Invalid custom fields
        details:
          $ref: '#/components/schemas/InvalidCustomFieldsDetailsDto'
      required:
        - code
        - message
        - details
    InvalidEventCreationDateErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - INVALID_EVENT_CREATION_DATE
        message:
          type: string
          example: >-
            You are trying to push an event that is created on {createdAt}, but
            the creation date should be after the latest event which was created
            on {latestCreatedAt}
        details:
          $ref: '#/components/schemas/InvalidEventCreationDateDetailsDto'
      required:
        - code
        - message
        - details
    InvalidProductErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - INVALID_PRODUCT
        message:
          type: string
          example: Invalid product {product}
        details:
          $ref: '#/components/schemas/InvalidProductDetailsDto'
      required:
        - code
        - message
        - details
    InvalidAssetStartedAtErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - INVALID_ASSET_STARTED_AT
        message:
          type: string
          example: Invalid asset startedAt with given date {givenDate}
        details:
          $ref: '#/components/schemas/InvalidAssetStartedAtDetailsDto'
      required:
        - code
        - message
        - details
    ForbiddenErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - FORBIDDEN
        message:
          type: string
          example: Forbidden
        details:
          $ref: '#/components/schemas/ForbiddenDetailsDto'
      required:
        - code
        - message
        - details
    PolicyNotFoundErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - POLICY_NOT_FOUND
        message:
          type: string
          example: Policy {policyId} ({branchId}) not found
        details:
          $ref: '#/components/schemas/PolicyNotFoundDetailsDto'
      required:
        - code
        - message
        - details
    ConflictingContractTypeErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - CONFLICTING_CONTRACT_TYPE
        message:
          type: string
          example: Contract type {requirement} {contractType} to perform {action}
        details:
          $ref: '#/components/schemas/ConflictContractTypeDetailsDto'
      required:
        - code
        - message
        - details
    ConflictingFieldDefinitionErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - CONFLICTING_FIELD_DEFINITION
        message:
          type: string
          example: '{entity} {id} {field} {requirement} {qualifier}'
        details:
          $ref: >-
            #/components/schemas/ConflictingBusinessEntityFieldDefinitionDetailsDto
      required:
        - code
        - message
        - details
    ConflictingPolicyStatusErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - CONFLICTING_POLICY_STATUS
        message:
          type: string
          example: '{policyId} status {requirement} {policyStatus} to perform {action}'
        details:
          $ref: '#/components/schemas/ConflictingPolicyStatusDetailsDto'
      required:
        - code
        - message
        - details
    NullableCustomFieldDto:
      type: object
      properties:
        key:
          type: string
        value:
          oneOf:
            - type: string
            - type: number
            - type: boolean
          nullable: true
      required:
        - key
        - value
    InvalidCustomFieldsDetailsDto:
      type: object
      properties:
        productId:
          type: string
        errors:
          type: array
          items:
            $ref: '#/components/schemas/InvalidCustomFieldsDetailsErrorsDto'
      required:
        - errors
    InvalidEventCreationDateDetailsDto:
      type: object
      properties:
        createdAt:
          format: date-time
          type: string
        latestCreatedAt:
          format: date-time
          type: string
      required:
        - createdAt
        - latestCreatedAt
    InvalidProductDetailsDto:
      type: object
      properties:
        tenant:
          type: string
        product:
          type: string
        expectedProduct:
          type: string
      required:
        - product
    InvalidAssetStartedAtDetailsDto:
      type: object
      properties:
        givenDate:
          type: string
        limitDate:
          type: string
        userHelp:
          type: string
      required:
        - givenDate
    ForbiddenDetailsDto:
      type: object
      properties:
        message:
          type: string
        documentKey:
          type: string
        userId:
          type: string
        ownerId:
          type: string
      required:
        - message
        - documentKey
        - userId
        - ownerId
    PolicyNotFoundDetailsDto:
      type: object
      properties:
        policyId:
          type: string
        branchId:
          type: string
        whenAt:
          type: string
        simulatedAt:
          type: string
      required:
        - policyId
    ConflictContractTypeDetailsDto:
      type: object
      properties:
        contractType:
          type: string
        requirement:
          allOf:
            - $ref: '#/components/schemas/OperationRequirement'
        action:
          allOf:
            - $ref: '#/components/schemas/Action'
      required:
        - contractType
        - requirement
        - action
    ConflictingBusinessEntityFieldDefinitionDetailsDto:
      type: object
      properties:
        entity:
          allOf:
            - $ref: '#/components/schemas/BusinessEntity'
        id:
          type: string
        field:
          type: string
        requirement:
          allOf:
            - $ref: '#/components/schemas/OperationRequirement'
        qualifier:
          allOf:
            - $ref: '#/components/schemas/FieldQualifier'
        additionalData:
          type: string
        rawData:
          type: object
          additionalProperties: true
      required:
        - entity
        - field
        - requirement
        - qualifier
    ConflictingPolicyStatusDetailsDto:
      type: object
      properties:
        policyStatus:
          oneOf:
            - type: string
            - type: array
              items:
                type: string
        policyId:
          type: string
        requirement:
          allOf:
            - $ref: '#/components/schemas/OperationRequirement'
        action:
          allOf:
            - $ref: '#/components/schemas/Action'
        additionalData:
          type: object
          additionalProperties: true
      required:
        - policyStatus
        - policyId
        - requirement
        - action
    InvalidCustomFieldsDetailsErrorsDto:
      type: object
      properties:
        key:
          type: string
        errorDetails:
          type: array
          items:
            type: string
        value:
          type: object
      required:
        - key
        - errorDetails
    OperationRequirement:
      type: string
      enum:
        - must be
        - must NOT be
        - must contain
        - must NOT contain
    Action:
      type: string
      enum:
        - PERFORM THIS ACTION
        - CREATE POLICY
        - CREATE ASSET
        - CREATE ASSET WITH START DATE
        - REPLACE ASSET
        - REMOVE ASSET
        - CHOOSE ASSET OPTIONS
        - STOP ASSET
        - EDIT ASSET
        - EDIT ASSET WITH START DATE
        - CREATE BRANCH
        - CREATE DEROGATION
        - CREATE MTA BRANCH
        - FORK TO NEW MTA BRANCH
        - FORK TO NEW NB BRANCH
        - FORK TO NEW RENEWAL BRANCH
        - FORK TO NEW REPRICING BRANCH
        - DEFINE PARENT POLICY ID
        - INITIALIZE CUSTOMER
        - EDIT CUSTOMER
        - DELETE CUSTOMER FROM POLICY
        - DECLARE CLAIMS HISTORY
        - SIGN
        - EDIT POLICY
        - EDIT POLICY EXTERNAL ID
        - CONFIRM POLICY
        - QUOTE POLICY
        - RETRIEVING QUOTE
        - STOP POLICY
        - SUSPEND POLICY
        - ACTIVATE POLICY
        - GENERATE MANDATE SIGNATURE REQUEST
        - GENERATE PAYMENT METHOD SECRET
        - CREATE CLAIM
        - FINALIZE RENEWAL
        - SEND CONTRACT TO SIGNATURE
        - GENERATE SIGNATURE REQUEST
        - GENERATE DOCUMENTS FOR SIGNATURE
        - APPROVE DISTRIBUTION REQUEST
        - DENY DISTRIBUTION REQUEST
        - REVOKED_DISTRIBUTION_REQUEST
        - DELETE DISTRIBUTION REQUEST
        - WAITING FOR SIGNATURE DISTRIBUTION REQUEST
        - UPDATE POLICY QUOTE
    BusinessEntity:
      type: string
      enum:
        - PAYMENT_METHOD
        - PAYMENT
        - POLICY
        - CUSTOMER
        - ASSET
        - INVOICE
        - DOCUMENT
        - SIGNATURE
        - TENANT
        - PRODUCT
        - QUOTE
        - BROKERAGE_FIRM
        - CLAIM
        - EXTERNAL_SERVICE
        - NOTIFICATION
        - PREMIUM_SCHEDULE
        - CHECK
        - ALERT
        - DISTRIBUTION_REQUEST
        - DEROGATION
        - BROKERAGE_FEE
        - COMMENT
        - CONVERSATION
        - CONVERSATION_MESSAGE
    FieldQualifier:
      type: string
      enum:
        - DEFINED
        - AFTER
        - BEFORE
        - ON or AFTER
        - BEFORE or ON
        - 'ON'
        - EMPTY
        - in

````