I am trying to create an Asana task using curl on the Debian command line. I am assigning the task to a specific project and a specific section within that project. My curl command creates a task until I add the "memberships" parameter. Here is what that parameter looks like.
-d "memberships=[{project:{id:96927952190628},section:{id:96927952190688}}]"
Here is the full command (with some information removed for privacy):
curl -H 'Authorization: Bearer <id>' https://app.asana.com/api/1.0/tasks -d "assignee=me" -d "name=New Task" -d "completed=false" -d "workspace=923066726484" -d "memberships=[{project:{id:96927952190628},section:{id:96927952190688}}]"
This appears to be match the requirements based on the Asana API described here: https://asana.com/developers/api-reference/tasks#create (see the example in the definition for the 'memberships' field).
When I execute this command, Asana returns the following json.
{"errors":[{"message":"memberships: [0]: project: Missing required field","help":"For more information on API status codes and how to handle them, read the docs on errors: https://asana.com/developers/documentation/getting-started/errors"}]}
So, what am I doing wrong?
Thanks!