How can i create custom rest api to create new collection type and components dynamically?

i have to create custom api for creating collection type and components through nodejs

Do you find any solution yet?