API to Add Configurations

I have a number of models that I would like to add configurations too. The configuration name for each file will be different. And in some cases one file that will require multiple configurations. I am looking for a way to take a list of files and add the configurations to them. Any help would be greatly appreciated.

 

Example:

File ListConfig to add
123456.sldprt123456-01
123456.sldprt123456-02
123456.sldprt123456-03
123456.sldprt123456-04
234567.sldprt234567-15
345678.sldprt345678-09
345678.sldprt345678-10