Create a role
Changed on<b>Required scope: </b><code>roles:write</code>
Creates a new RBAC role in the workspace.
Request
- Base URL: https://app.asana.com/api/1.0
- URL: https://app.asana.com/api/1.0/roles
- Auth: one of:
- HTTP bearer
- OAuth 2 (authorization code, authorization URL https://app.asana.com/-/oauth_authorize, token URL https://app.asana.com/-/oauth_token, scopes: roles:write)
Query parameters
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.
Request body
Example request
{
"data": {
"gid": "12345",
"resource_type": "role",
"name": "Developer",
"description": "This role has exclusive access to create app and PAT tokens.",
"creation_time": "2012-02-22T02:06:58.147Z",
"modified_at": "2012-02-22T02:06:58.147Z",
"permissions": {
"create_app_authorization": true,
"create_pat_authorization": true,
"share_goal_with_domain": true,
"share_portfolios_with_org": true,
"assign_roles": true,
"manage_roles": true,
"export_project_data": true,
"task_deletion_policy": "all",
"download_mobile_attachments": true,
"import_data": true,
"create_global_custom_fields": true,
"upload_attachments": true,
"create_team": true,
"allowed_guest_invites": "all",
"create_and_edit_ai_automations": true,
"proactive_ai": true,
"standard_ai": true,
"create_and_edit_ai_teammates": true,
"share_teams_with_org": true,
"create_goal": true,
"create_project": true,
"create_read_only_link": true,
"create_portfolio": true,
"view_public_teams": true,
"view_shared_with_org_projects": true,
"view_shared_with_org_tasks": true,
"view_shared_with_org_portfolios": true
},
"workspace": "12345"
}
}Response
Successfully created a new role.
Example response
{
"data": {
"gid": "12345",
"resource_type": "role",
"name": "Developer",
"description": "This role has exclusive access to create app and PAT tokens.",
"creation_time": "2012-02-22T02:06:58.147Z",
"modified_at": "2012-02-22T02:06:58.147Z",
"permissions": {
"create_app_authorization": true,
"create_pat_authorization": true,
"share_goal_with_domain": true,
"share_portfolios_with_org": true,
"assign_roles": true,
"manage_roles": true,
"export_project_data": true,
"task_deletion_policy": "all",
"download_mobile_attachments": true,
"import_data": true,
"create_global_custom_fields": true,
"upload_attachments": true,
"create_team": true,
"allowed_guest_invites": "all",
"create_and_edit_ai_automations": true,
"proactive_ai": true,
"standard_ai": true,
"create_and_edit_ai_teammates": true,
"share_teams_with_org": true,
"create_goal": true,
"create_project": true,
"create_read_only_link": true,
"create_portfolio": true,
"view_public_teams": true,
"view_shared_with_org_projects": true,
"view_shared_with_org_tasks": true,
"view_shared_with_org_portfolios": true
},
"workspace": {
"gid": "12345",
"resource_type": "workspace",
"name": "My Company Workspace"
}
}
}Changes
- breaking
added the new required request property
//
- breaking
- info
added the new optional request property
/////// - info
added the new optional request property
/////// - info
added the new optional request property
/////// - info
added the new optional request property
/////// - info
added the new optional request property
/////// - info
added the new optional request property
/////// - info
added the new optional request property
/////// - info
added the new optional request property
/////// - info
added the new optional request property
/////// - info
added the enum value
permissions.create_goalto the propertyitems/of thequeryrequest parameteropt_fields - info
added the enum value
permissions.create_portfolioto the propertyitems/of thequeryrequest parameteropt_fields - info
added the enum value
permissions.create_projectto the propertyitems/of thequeryrequest parameteropt_fields - info
added the enum value
permissions.create_read_only_linkto the propertyitems/of thequeryrequest parameteropt_fields - info
added the enum value
permissions.share_teams_with_orgto the propertyitems/of thequeryrequest parameteropt_fields - info
added the enum value
permissions.view_public_teamsto the propertyitems/of thequeryrequest parameteropt_fields - info
added the enum value
permissions.view_shared_with_org_portfoliosto the propertyitems/of thequeryrequest parameteropt_fields - info
added the enum value
permissions.view_shared_with_org_projectsto the propertyitems/of thequeryrequest parameteropt_fields - info
added the enum value
permissions.view_shared_with_org_tasksto the propertyitems/of thequeryrequest parameteropt_fields - info
added the optional property
///////to the response with the status - info
added the optional property
///////to the response with the status - info
added the optional property
///////to the response with the status - info
added the optional property
///////to the response with the status - info
added the optional property
///////to the response with the status - info
added the optional property
///////to the response with the status - info
added the optional property
///////to the response with the status - info
added the optional property
///////to the response with the status - info
added the optional property
///////to the response with the status
- info