How to update created and modified properties of a file in sharepoint online using REST in C#

%3CLINGO-SUB%20id%3D%22lingo-sub-213258%22%20slang%3D%22en-US%22%3EHow%20to%20update%20created%20and%20modified%20properties%20of%20a%20file%20in%20sharepoint%20online%20using%20REST%20in%20C%23%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-213258%22%20slang%3D%22en-US%22%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EHow%20to%20update%20the%20modified%20date%20and%20the%20created%20date%20to%20my%20own%20value%20of%20an%20item%20in%20document%20library%20using%20REST%20API%20in%20c%23.%3C%2FP%3E%3CP%3Evar%20body%20%3D%20%22%7B%20'__metadata'%3A%20%7B'type'%3A'SP.ListItem'%7D%2C'Modified'%3A'2012-03-30T17%3A24%3A17Z'%7D%22%3B%3CBR%20%2F%3E%3CBR%20%2F%3Evar%20json%20%3D%20client.UploadString(url%2C%20body)%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-213258%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Highlighted
Deleted
Not applicable

 

Hi,

How to update the modified date and the created date to my own value of an item in document library using REST API in c#.

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

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

 

Thanks.