Are you making a call to our Create a task (POST /tasks) endpoint? If so you need to provide one of workspace, parent or projects in your request body in order for the request to succeed. Also, if you take a look at our documentation for request body for our Create a task (POST /tasks) endpoint (See BODY PARAMS section) we do not list memberships as an option in our request body.
If you want to create a task in a project and add it to a section I would suggest:
Make a request to our Create a task (POST /tasks) endpoint and provide the project_gid in the projects request body params. So for example:
"name": "Test of API Integration",
"notes": "API Test Notes",