{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"<b>Required scope: </b><code>roles:write</code>\n\nCreates a new RBAC role in the workspace.","properties":{"query":{"type":"object","properties":{"opt_pretty":{"type":"boolean","examples":[true],"description":"Provides “pretty” output.\nProvides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging."},"opt_fields":{"type":"array","items":{"type":"string","enum":["base_role_type","creation_time","description","is_standard_role","modified_at","name","permissions","permissions.allowed_guest_invites","permissions.assign_roles","permissions.create_and_edit_ai_automations","permissions.create_and_edit_ai_teammates","permissions.create_app_authorization","permissions.create_global_custom_fields","permissions.create_goal","permissions.create_pat_authorization","permissions.create_portfolio","permissions.create_project","permissions.create_read_only_link","permissions.create_team","permissions.download_mobile_attachments","permissions.export_project_data","permissions.import_data","permissions.manage_roles","permissions.proactive_ai","permissions.share_goal_with_domain","permissions.share_portfolios_with_org","permissions.share_teams_with_org","permissions.standard_ai","permissions.task_deletion_policy","permissions.upload_attachments","permissions.view_public_teams","permissions.view_shared_with_org_portfolios","permissions.view_shared_with_org_projects","permissions.view_shared_with_org_tasks","workspace","workspace.name"]},"examples":[["base_role_type","creation_time","description","is_standard_role","modified_at","name","permissions","permissions.allowed_guest_invites","permissions.assign_roles","permissions.create_and_edit_ai_automations","permissions.create_and_edit_ai_teammates","permissions.create_app_authorization","permissions.create_global_custom_fields","permissions.create_goal","permissions.create_pat_authorization","permissions.create_portfolio","permissions.create_project","permissions.create_read_only_link","permissions.create_team","permissions.download_mobile_attachments","permissions.export_project_data","permissions.import_data","permissions.manage_roles","permissions.proactive_ai","permissions.share_goal_with_domain","permissions.share_portfolios_with_org","permissions.share_teams_with_org","permissions.standard_ai","permissions.task_deletion_policy","permissions.upload_attachments","permissions.view_public_teams","permissions.view_shared_with_org_portfolios","permissions.view_shared_with_org_projects","permissions.view_shared_with_org_tasks","workspace","workspace.name"]],"description":"This endpoint returns a resource which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. Properties can include nested fields. To learn more, see the [input/output options guide](/docs/inputoutput-options#selecting-nested-fields)."}},"required":[],"additionalProperties":false},"body":{"type":"object","properties":{"data":{"$ref":"#/definitions/RbacRoleRequest"}}}},"required":["body"],"additionalProperties":false,"definitions":{"RbacRoleRequest":{"allOf":[{"$ref":"#/definitions/RbacRoleBase"},{"type":"object","required":["name","description","base_role_type","workspace"],"properties":{"base_role_type":{"description":"The base role type of the role.","type":"string","enum":["guest","member","admin"]},"workspace":{"type":"string","description":"*Create-only*. The GID of the workspace this role is associated with. Once created, roles cannot be moved to a different workspace. This attribute can only be specified at creation time.","examples":["12345"]}}}]},"RbacRoleBase":{"allOf":[{"$ref":"#/definitions/RbacRoleCompact"},{"type":"object","properties":{"base_role_type":{"description":"The base role type of the role.","type":"string","enum":["guest","member","admin","super_admin"]},"permissions":{"description":"The permissions of the role.","type":"object","properties":{"create_app_authorization":{"description":"Controls whether users with this role can create app authorizations","type":"boolean","examples":[true]},"create_pat_authorization":{"description":"Controls whether users with this role can create PAT authorizations","type":"boolean","examples":[true]},"share_goal_with_domain":{"description":"Controls whether users with this role can create company-wide goals","type":"boolean","examples":[true]},"share_portfolios_with_org":{"description":"Controls whether users with this role can create portfolios that are shared with the organization and share existing portfolios to the organization","type":"boolean","examples":[true]},"assign_roles":{"description":"Controls whether users with this role can assign guest, member, and admin roles to other users","type":"boolean","examples":[true]},"manage_roles":{"description":"Controls whether users with this role can create, edit, and delete roles","type":"boolean","examples":[true]},"export_project_data":{"description":"Controls whether users with this role can export project data","type":"boolean","examples":[true]},"task_deletion_policy":{"description":"Determines what tasks users with this role are allowed to delete","type":"string","enum":["all","owned","none"],"examples":["all"]},"download_mobile_attachments":{"description":"Controls whether users with this role can download attachments from mobile app","type":"boolean","examples":[true]},"import_data":{"description":"Controls whether users with this role can import data into the domain","type":"boolean","examples":[true]},"create_global_custom_fields":{"description":"Controls whether users with this role can create global custom fields","type":"boolean","examples":[true]},"upload_attachments":{"description":"Controls whether users with this role can upload attachments","type":"boolean","examples":[true]},"create_team":{"description":"Controls whether users with this role can create teams","type":"boolean","examples":[true]},"allowed_guest_invites":{"description":"Controls what type of email users with this role are allowed to invite","type":"string","enum":["all","none"],"examples":["all"]},"create_and_edit_ai_automations":{"description":"Controls whether users with this role can create and edit AI automations","type":"boolean","examples":[true]},"proactive_ai":{"description":"Controls whether users with this role can use proactive AI features","type":"boolean","examples":[true]},"standard_ai":{"description":"Controls whether users with this role can use standard AI features","type":"boolean","examples":[true]},"create_and_edit_ai_teammates":{"description":"Controls whether users with this role can create and edit AI teammates","type":"boolean","examples":[true]},"share_teams_with_org":{"description":"Controls whether users with this role can share teams with the organization","type":"boolean","examples":[true]},"create_goal":{"description":"Controls whether users with this role can create goals","type":"boolean","examples":[true]},"create_project":{"description":"Controls whether users with this role can create projects","type":"boolean","examples":[true]},"create_read_only_link":{"description":"Controls whether users with this role can create read-only links","type":"boolean","examples":[true]},"create_portfolio":{"description":"Controls whether users with this role can create portfolios","type":"boolean","examples":[true]},"view_public_teams":{"description":"Controls whether users with this role can view public teams","type":"boolean","examples":[true]},"view_shared_with_org_projects":{"description":"Controls whether users with this role can view projects shared with the organization","type":"boolean","examples":[true]},"view_shared_with_org_tasks":{"description":"Controls whether users with this role can view tasks shared with the organization","type":"boolean","examples":[true]},"view_shared_with_org_portfolios":{"description":"Controls whether users with this role can view portfolios shared with the organization","type":"boolean","examples":[true]}}}}}]},"RbacRoleCompact":{"description":"A *role* represents a group of permissions that can be assigned to a user or team.","type":"object","properties":{"name":{"description":"The name of the role.","type":"string","examples":["Developer"]},"description":{"description":"The description of the role.","type":"string","examples":["This role has exclusive access to create app and PAT tokens."]},"is_standard_role":{"description":"Whether the role is a standard role or a custom role. Defaults to `false`.","type":"boolean","examples":[false]}}}}},"name":"Create a role","id":"asana.createrole","example":{"body":{}},"maxRequests":1,"summary":false}}