Missing required `team` field when creating projects in a workspace

I am trying to create a project in my workspace (which is an organization). Although I have added the workspace id and team id (which is the id of our department in Asana) in the code, I still get this error message repeatedly. ""Missing required team field ""

As the API developer manual says ‘if the workspace for your project is an organization, you must also supply a team to share the project with.’ What is the team ID, isn’t it the ID in the URL of the team detail page?

Please help and let me know how can I fix this problem. Thanks!

Below is my code:

result = client.projects.create_project_for_workspace(‘workstationID’,{
“data”: {
“archived”: False,
“color”: “light-green”,
“current_status”: {
“author”: {“name”: “NYC”},
“color”: “green”,
“created_by”: {“name”: “NYC”},
“modified_at”: None,
“text”: “The project is moving forward according to plan…”,
“title”: “NYC Trial Project”},
“due_date”: “2020-10-15”,
“due_on”: “2020-10-15”,
“followers”: “NYC”,
“is_template”: False,
“name”: “xxxxxx”,
“notes”: "Please check ",
“owner”: “NYC”,
“public”: False,
“start_on”: “2020-10-15”,
“team”:“my 16 digit teamID”
}, opt_pretty=True)

Hi @Claire_Yu,

If you can, try this endpoint instead:

That is the Team ID.

Thanks Phil! It’s working now.

1 Like