Create Filter API Endpoint sharePermissions

I am trying to create a filter using this endpoint and to add share permissions and edit permissions for the project. The filter gets created but is not shared with the project. Here is how I’m formatting the sharePermissions property:

{
  "sharePermissions": [
    {
      "type": "project",
      "id": "PROJECT ID"
    }
  ]
}

Any help would be greatly appreciated!

Hello @SamPhilips

If you refer to that endpoint’s documentation, you’ll see that the project’s ID needs to be declared inside the project object that’s inside the sharePermissions object:

{
  "sharePermissions": [
    {
      "type": "project",
	  "project":
       {
         "id": "PROJECT ID"
	  }
    }
  ]
}

@sunnyape Thank you! That worked.