Hello @pkasliwal2 ,
You may try https://learn.microsoft.com/en-us/rest/api/apimanagement/2019-12-01/tag/assigntooperation
You can use Httpclient to make an API call to the endpoints mentioned in the document. You may need to pass an authorization token for validation , for that please refer to this
If may try with ARM template , https://learn.microsoft.com/en-us/azure/templates/microsoft.apimanagement/service/apis/tags - but I believe you might have to pass empty properties to make it work. Please refer to : https://learn.microsoft.com/en-us/answers/questions/212164/index.html
Please let me know if this helps!