Hi Nolin,
There is a trigger bean to create a new segment (document) but not from a template like the GUI can. I think you could do this through the API via the "rq branchsegment --nobranch --project=[Doc Project] [Template Item ID]" command but you would need to ensure you have all the mandatory fields filled-in as part of that operation.
As usual, please be careful about using API calls in triggers and use them in Post-triggers only.