bpmn file

Hi,

Is there any way to create dinamically the bpmn file instead of getting it from the studio (Export as … BPMN 2.0)? Can I use the api to obtain it?

Thanks!