How to update created and modified properties to my own value of a file in SharePoint online using REST API in C#

Isn't it possible to update created and modified like the following method?

This works for other column properties but nothing happens in modified and created column.

var body = "{ '__metadata': {'type':'SP.ListItem'},'Modified':'2012-03-30T17:24:17Z'}";

var json = client.UploadString(url, body);