title: SharePoint 2013 Custom file properties update using rest
body: <p>I am trying to update custom document properties for a file in SharePoint 2013 using REST and JavaScript</p>
  
  <pre><code>function uploadFileProp() 
  {
               $.ajax({
                  url: "https://sp/sites/xxxx/_api/web/getFileByServerRelativeUrl('/sites/xxxx/ta/cs_architecture_3_0.png')/ListItemAllFields",
                  type: "POST",
                   data: "{ '__metadata': { 'type': 'SP.ListItem' }, 'OperatingGroup': 'New' }",
                  headers: {
                      "accept": "application/json;odata=verbose",
                      "X-RequestDigest": $("#__REQUESTDIGEST").val(),
                      "X-HTTP-Method":"Merge"
                  },
                  complete: function (data) {
                      alert('succes');
                  },
                  error: function (err) {
                       alert('failed');
                  }
          });
  }
  </code></pre>
  
  <p>But it is not updating my custom property.</p>
  
  <p>Response :</p>
  
  <blockquote>
    <p>{"error":{"code":"-1,
    Microsoft.SharePoint.Client.InvalidClientQueryException","message":{"lang":"en-US","value":"Invalid
    request."}}}</p>
  </blockquote>