I am also having a similar issue, I tried to delete the customer with the same API but getting this error
"errorMessage": "Customers cannot be removed from this service desk because it has open access enabled",
Hello @shubham tak,
Thank you for reaching out to Atlassian Community!
The error message means that the Service Desk project is open to anyone with an account on the site, that's why it's not possible to remove the customer.
If you want to remove them just from the project and not from the entire site, then you must set the project as closed.
For that, please go to Project settings > Customer permissions (Classic) or Project settings > Channels > Customer permissions (Next-gen) and change the option "Who can access the portal and send requests to…?" to "Customers my team adds to the project" > Save.
If you want to delete the customer account from the site, then it must be manually on Cog icon > User management > Jira Service Desk because currently, there is no API do delete the account.
We often have questions from folks using Jira Service Management about the benefits to using Premium. Check out this video to learn how you can unlock even more value in our Premium plan. &nb...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events