Trying to create team on asana using api. But getting error


Trying to create team but getting this error.

Hi @Atharva_Anant_Diwan,

The error pretty clearly explains the issue: a top-level workspace object in Asana can either be a Workspace or an Organization. Only Organizations can have Teams, and the ID you supplied is a Workspace so it can’t have Teams.

You’ll need to convert that Workspace to an Organization, or create a new Organization, in order to create Teams within it.

Is there a way to only get list of organization gid through API

I have an app where I want to achieve following:

  1. Fetch all organization gid and show them to user.
  2. User will select one of the organization gid.
  3. After running the app it will create team inside selected organization gid.

I am calling the get API of workspace, it gives me both workspace and organizations.

Last two are organization in this image but resource type is workspace only. So if there is any way to get only organizations then it will be helpful.

If you use ?opt_fields=is_organization in your query string, you’ll get that boolean property which will tell you if it’s an organization or not.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.