ArcGIS Online currently offers the ability to publish hosted feature services from zipped shapefiles, service definitions, and even csvs. However, options are a bit limited for developers wanting to create a hosted feature service by other means, without access to traditional GIS data. This is especially true for non-point features (lines, polys).
It would be advantageous to offer the ability to generate hosted feature services directly through the API. I see at least two options for this.