I have never looked at this feature since Revit 2012, but back then you couldn't place a legend component throught the api. Our workaround was to for instance place a window component in front and top view. These components could be copied and changed by the API. That worked for us.
But again, we are in Revit 2017 now, so maybe the possibility with legends in the API have been expanded and improved.