There is an action to import data from text files:
As you do not say anything about the files and their structure, it is hard to tell whether there is an alternative.
I mean, it could also be a way to prepare the data with your web API to let it be imported with the already existing action.