Instead of using REST API, suggest you use CSOM to hide a list content type field.
The demo code for your reference:
#Load SharePoint CSOM Assemblies
Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll"
Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll"
#function to Hide Column From List Content Type in SharePoint Online
Function Hide-ColumnFromContentType()
{
param
(
[Parameter(Mandatory=$true)] [string] $SiteURL,
[Parameter(Mandatory=$true)] [string] $ListName,
[Parameter(Mandatory=$true)] [string] $ContentTypeName,
[Parameter(Mandatory=$true)] [string] $ColumnName
)
Try {
$Cred= Get-Credential
$Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Cred.Username, $Cred.Password)
#Setup the context
$Ctx = New-Object Microsoft.SharePoint.Client.ClientContext($SiteURL)
$Ctx.Credentials = $Credentials
#Get the List
$List = $Ctx.Web.Lists.GetByTitle($ListName)
$Ctx.Load($List)
$Ctx.ExecuteQuery()
#Get the content type
$ContentTypes = $List.ContentTypes
$Ctx.Load($ContentTypes)
$Ctx.ExecuteQuery()
$ContentType = $ContentTypes | Where {$_.Name -eq $ContentTypeName}
#Get the Field link from content type
$FieldLinks =$ContentType.FieldLinks
$Ctx.Load($FieldLinks)
$Ctx.ExecuteQuery()
$FieldLink = $FieldLinks | Where {$_.Name -eq $ColumnName}
#Hide the Field link
$FieldLink.Hidden = $True
#Update Content type
$ContentType.update($False)
$Ctx.ExecuteQuery()
Write-host "Column Hidden from the Content Type Successfully!" -ForegroundColor Green
}
Catch {
write-host -f Red "Error Hiding Column in Content Type!" $_.Exception.Message
}
}
#Set parameter values
$SiteURL="https://crescent.sharepoint.com"
$ListName="Projects"
$ContentTypeName="Item"
$ColumnName="Priority"
#Call the function
Hide-ColumnFromContentType -SiteURL $SiteURL -ListName $ListName -ContentTypeName $ContentTypeName -ColumnName $ColumnName
More information, please refer to the blog.