Here we will discuss how we can change or set the default value to a field or column in SharePoint list using Rest API. I am doing this demo in a SharePoint online site. Here I have a list name as: MyChartList and in that list I have a column name as MyDefaultValueColumn. In the MyDefaultValueColumn I have set a default value as Hiii like below:



Then I have added a script editor web part in a web part page and then added the below code inside the script editor web part.

 
<script>
 
$(function(){
 
    $("#btnClick").click(function(){
 
        var requestUri = _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getbytitle('MyChartList')/fields/getbytitle('MyDefaultValueColumn')";
 
        $.ajax({
 
            url: requestUri,
 
            type: "POST",
 
            data: "{ '__metadata': { 'type':'SP.Field' }, 'DefaultValue': 'Hello Updated Value' }",
 
            headers: {
 
                "Accept":"application/json;odata=verbose",
 
                "X-HTTP-Method":"MERGE",
 
                "content-type":"application/json;odata=verbose",
 
                "X-RequestDigest":$('#__REQUESTDIGEST').val(),
 
                "If-Match": "*",
 
            },
 
            success: onSuccess,
 
            error: onError
 
        });
 
  
 
        function onSuccess(data) {
 
            alert('Success');
 
        }
 
  
 
        function onError(error) {
 
            alert('Error');
 
        }
 
  
 
    });
 
  
 
});
 
  
 
</script>

<input type="button" id="btnClick" value="Update Default Column Value"/>


Here Once user click on the button, then the Default value will be updated with "Hello Updated Value" which we have set inside the code. And now if you will check the default value for the particular column it will look like below: