Roles

Update a role

<b>Required scope: </b><code>roles:write</code>

Updates a role in a workspace.

put/roles/{role_gid}

Request

  • Base URL: https://app.asana.com/api/1.0
  • URL: https://app.asana.com/api/1.0/roles/{role_gid}
  • 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

opt_fieldsstring[]

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
    }
  }
}

Response

Successfully updated the 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

No recorded changes to this operation across all 2 revisions of this API.