url: "<app web url>/_api/SP.AppContextSite(@target)/web
?@target='<host web url>'",
body: "This is the new content.",
It creates a file from the file system to your sharepoint online site. Kindly validate if this is the needed answer.