If you create records programmatically using CreateRequest with the parameter SuppressDuplicateDetection as false, then duplicate detection will take place and if the record is a duplicate record then it won`t be created and the below error will be shown: