> ## 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.

# Removes the asset from its policy. This operation is only possible if the asset has been created on the same branch it is being removed on



## OpenAPI

````yaml /openapi.json delete /assets/{assetId}
openapi: 3.0.0
info:
  title: Korint Documentation
  description: Korint API Documentation
  version: 1.0.0
  contact: {}
servers: []
security:
  - bearerAuth: []
tags: []
paths:
  /assets/{assetId}:
    delete:
      tags:
        - asset
      summary: >-
        Removes the asset from its policy. This operation is only possible if
        the asset has been created on the same branch it is being removed on
      operationId: AssetController_removeAsset
      parameters:
        - name: assetId
          required: true
          in: path
          description: assetId
          schema:
            type: string
        - 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
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RemoveAssetOutput'
        '400':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/InvalidEventCreationDateErrorDto'
              examples:
                INVALID_EVENT_CREATION_DATE:
                  $ref: '#/components/schemas/InvalidEventCreationDateErrorDto'
          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/AssetNotFoundErrorDto'
              examples:
                ASSET_NOT_FOUND:
                  $ref: '#/components/schemas/AssetNotFoundErrorDto'
          description: ''
        '409':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/AssetNotCreatedOnThisBranchErrorDto'
                  - $ref: '#/components/schemas/ConflictingAssetStatusErrorDto'
                  - $ref: '#/components/schemas/ConflictingPolicyStatusErrorDto'
                  - $ref: '#/components/schemas/ConflictingBranchStatusErrorDto'
              examples:
                ASSET_NOT_CREATED_ON_THIS_BRANCH:
                  $ref: '#/components/schemas/AssetNotCreatedOnThisBranchErrorDto'
                CONFLICTING_ASSET_STATUS:
                  $ref: '#/components/schemas/ConflictingAssetStatusErrorDto'
                CONFLICTING_POLICY_STATUS:
                  $ref: '#/components/schemas/ConflictingPolicyStatusErrorDto'
                CONFLICTING_BRANCH_STATUS:
                  $ref: '#/components/schemas/ConflictingBranchStatusErrorDto'
          description: ''
components:
  schemas:
    RemoveAssetOutput:
      type: object
      properties: {}
    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
    ForbiddenErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - FORBIDDEN
        message:
          type: string
          example: Forbidden
        details:
          $ref: '#/components/schemas/ForbiddenDetailsDto'
      required:
        - code
        - message
        - details
    AssetNotFoundErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - ASSET_NOT_FOUND
        message:
          type: string
          example: Asset {assetId} ({branchId}) not found
        details:
          $ref: '#/components/schemas/AssetNotFoundDetailsDto'
      required:
        - code
        - message
        - details
    AssetNotCreatedOnThisBranchErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - ASSET_NOT_CREATED_ON_THIS_BRANCH
        message:
          type: string
          example: >-
            Asset {assetId} as not been created on BRANCH {currentBranchId},
            asset was created on BRANCH {creationBranchId}
        details:
          $ref: '#/components/schemas/AssetNotCreatedOnThisBranchDetailsDto'
      required:
        - code
        - message
        - details
    ConflictingAssetStatusErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - CONFLICTING_ASSET_STATUS
        message:
          type: string
          example: Asset status {requirement} {assetStatus} to perform {action}
        details:
          $ref: '#/components/schemas/ConflictingAssetStatusDetailsDto'
      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
    ConflictingBranchStatusErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - CONFLICTING_BRANCH_STATUS
        message:
          type: string
          example: Branch status {requirement} {branchStatus} to perform {action}
        details:
          $ref: '#/components/schemas/ConflictingBranchStatusDetailsDto'
      required:
        - code
        - message
        - details
    InvalidEventCreationDateDetailsDto:
      type: object
      properties:
        createdAt:
          format: date-time
          type: string
        latestCreatedAt:
          format: date-time
          type: string
      required:
        - createdAt
        - latestCreatedAt
    ForbiddenDetailsDto:
      type: object
      properties:
        message:
          type: string
        documentKey:
          type: string
        userId:
          type: string
        ownerId:
          type: string
      required:
        - message
        - documentKey
        - userId
        - ownerId
    AssetNotFoundDetailsDto:
      type: object
      properties:
        assetId:
          type: string
        branchId:
          type: string
        whenAt:
          type: string
        simulatedAt:
          type: string
      required:
        - assetId
    AssetNotCreatedOnThisBranchDetailsDto:
      type: object
      properties:
        assetId:
          type: string
        creationBranchId:
          type: string
        currentBranchId:
          type: string
      required:
        - assetId
        - creationBranchId
        - currentBranchId
    ConflictingAssetStatusDetailsDto:
      type: object
      properties:
        assetStatus:
          allOf:
            - $ref: '#/components/schemas/AssetStatus'
        requirement:
          allOf:
            - $ref: '#/components/schemas/OperationRequirement'
        action:
          allOf:
            - $ref: '#/components/schemas/Action'
        additionalData:
          type: object
          additionalProperties: true
      required:
        - assetStatus
        - requirement
        - action
    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
    ConflictingBranchStatusDetailsDto:
      type: object
      properties:
        branchStatus:
          allOf:
            - $ref: '#/components/schemas/BranchStatus'
        requirement:
          allOf:
            - $ref: '#/components/schemas/OperationRequirement'
        action:
          allOf:
            - $ref: '#/components/schemas/Action'
      required:
        - branchStatus
        - requirement
        - action
    AssetStatus:
      type: string
      enum:
        - ASSET_CREATED
        - ASSET_REMOVED
        - ASSET_QUOTED
        - ASSET_CONFIRMED
        - ASSET_STARTED
        - ASSET_STOPPED
        - ASSET_CANCELLED
    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
    BranchStatus:
      type: string
      enum:
        - BRANCH_OPEN
        - BRANCH_MERGED
        - BRANCH_CLOSED

````