Dynamic creation of courses and course content

Hi, I’m new to this whole open edX thing. I was wondering if there is a way to programatically add courses and their content or maybe through and API?
Lets say I have an app that generates course content and I want to create that course on my open edX app how would I do that?

@bornaradinovic,

Check if this could fulfill your need
https://edx.readthedocs.io/projects/open-edx-ca/en/latest/releasing_course/export_import_course.html