SukeshCrimson here is my JSON code from an HTTP call in Logic apps. It's possible you can perform a similar call in Flow as well, but I haven't tried as there is no direct code edit there.
"Apply_Label": {
"inputs": {
"body": {
"body": "{\n'complianceTag': '@{variables('MyComplianceTagName')}',\n'isTagPolicyHold': 'True',\n'isTagPolicyRecord': 'True'\n}",
"headers": {
"Accept": "application/json;odata=verbose",
"Content-Type": "application/json;odata=verbose"
},
"method": "POST",
"uri": "_api/web/Lists/GetById('@{outputs('Library')}')/items(@{outputs('LocalDocId')})/SetComplianceTag()"
},
"host": {
"connection": {
"name": "@parameters('$connections')['sharepointonline']['connectionId']"
}
},
"method": "post",
"path": "/datasets/@{encodeURIComponent(encodeURIComponent(outputs('DocSite')))}/httprequest"
},
"runAfter": {
"XYZ": [
"Succeeded"
]
},
"type": "ApiConnection"
}
The following is the input interpreted by Logic Apps, including the headers and body:
{
"method": "post",
"path": "/datasets/https%253A%252F%252FmyTenant.sharepoint.com%252Fsites%252FmySite/httprequest",
"host": {
"connection": {
"name": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/MyRG/providers/Microsoft.Web/connections/sharepointonline"
}
},
"body": {
"body": "{\n'complianceTag': 'Exact label name',\n'isTagPolicyHold': 'True',\n'isTagPolicyRecord': 'True'\n}",
"headers": {
"Accept": "application/json;odata=verbose",
"Content-Type": "application/json;odata=verbose"
},
"method": "POST",
"uri": "_api/web/Lists/GetById('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx')/items(1234)/SetComplianceTag()"
}
}