REST API: create project with powershell returns unspecified internal error
Your script works, just update the last content type to application/json:
Invoke-RestMethod -Uri $adoTaskUri -ContentType &quot;application/json&quot; -Body $body -headers $adoHeader -Method POST

PATCH is used to update a team project: https://docs.microsoft.com/en-us/rest/api/azure/devops/core/projects/update?view=azure-devops-rest-6.1