I need to add a feature layer to ArcGIS Online account from code.

i have created a developer account where if i want to create a feature layer i have to upload a CSV file and it makes the feature layer.

> 
> Problem is: i need to create the sane feature layer using my code.
>  like is there any REST API or some API which ArcGIS provide this
>  option?
> 
> 
>