---
updatedAt: 2026-05-28T08:16:45.000Z
agentTools:
  projectIndex: https://docs.scalr.io/llms.txt
---

# Update a Role

This endpoint updates [IAM](https://docs.scalr.io/docs/identity-and-access-management) role by ID.

# OpenAPI definition

```json
{
  "components": {
    "schemas": {
      "Role": {
        "description": "A collection of permissions that can be assigned to a user, team, or service account via an [access policy](/docs/identity-and-access-management#access-policies).",
        "properties": {
          "attributes": {
            "properties": {
              "description": {
                "description": "The description of the role.",
                "maxLength": 255,
                "nullable": true,
                "type": "string"
              },
              "is-system": {
                "description": "When `true` the role is built-in, and cannot be modified or deleted.",
                "readOnly": true,
                "type": "boolean"
              },
              "name": {
                "description": "The name of the role.",
                "maxLength": 128,
                "type": "string"
              }
            },
            "required": [
              "name"
            ],
            "type": "object"
          },
          "id": {
            "readOnly": true,
            "type": "string"
          },
          "links": {
            "properties": {
              "self": {
                "readOnly": true,
                "type": "string"
              }
            },
            "readOnly": true,
            "type": "object"
          },
          "relationships": {
            "properties": {
              "account": {
                "description": "The account this role belongs to.",
                "properties": {
                  "data": {
                    "nullable": true,
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "type": {
                        "enum": [
                          "accounts",
                          ""
                        ],
                        "type": "string"
                      }
                    },
                    "required": [
                      "type",
                      "id"
                    ],
                    "type": "object"
                  }
                },
                "readOnly": true,
                "required": [
                  "data"
                ],
                "type": "object"
              },
              "permissions": {
                "description": "The collection of [permissions](permissions.html)",
                "properties": {
                  "data": {
                    "items": {
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "type": {
                          "enum": [
                            "permissions",
                            ""
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "id"
                      ],
                      "type": "object"
                    },
                    "nullable": true,
                    "type": "array"
                  }
                },
                "required": [
                  "data"
                ],
                "type": "object"
              }
            },
            "type": "object"
          },
          "type": {
            "enum": [
              "roles"
            ],
            "type": "string"
          }
        },
        "required": [
          "type",
          "attributes"
        ],
        "type": "object"
      },
      "RoleDocument": {
        "description": "JSON:API Document.\n\nsee: https://jsonapi.org/format/#document-structure",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Role"
          },
          "included": {
            "items": {
              "type": "object"
            },
            "readOnly": true,
            "type": "array"
          },
          "meta": {
            "readOnly": true,
            "type": "object"
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "API-Key": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "Scalr IACP API",
    "license": {
      "name": "Apache 2.0",
      "url": "https://www.apache.org/licenses/LICENSE-2.0"
    },
    "title": "Scalr IACP API",
    "version": "unversioned"
  },
  "openapi": "3.0.0",
  "paths": {
    "/roles/{role}": {
      "patch": {
        "description": "This endpoint updates [IAM](https://docs.scalr.io/docs/identity-and-access-management) role by ID.",
        "operationId": "update_role",
        "parameters": [
          {
            "description": "The ID of the role to update.",
            "in": "path",
            "name": "role",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The comma-separated list of relationship paths.",
            "explode": false,
            "in": "query",
            "name": "include",
            "required": false,
            "schema": {
              "items": {
                "enum": [
                  "account",
                  "permissions"
                ],
                "type": "string"
              },
              "type": "array"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/vnd.api+json": {
              "schema": {
                "$ref": "#/components/schemas/RoleDocument"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/vnd.api+json": {
                "schema": {
                  "$ref": "#/components/schemas/RoleDocument"
                }
              }
            },
            "description": "Successfully updated."
          },
          "403": {
            "description": "User unauthorized to perform this action."
          },
          "404": {
            "description": "Role not found."
          },
          "422": {
            "description": "Malformed request body (missing attributes, wrong types, etc.)."
          },
          "4XX": {
            "description": "Client error."
          },
          "5XX": {
            "description": "Server error."
          }
        },
        "summary": "Update a Role",
        "tags": [
          "roles"
        ],
        "x-resource": "Role",
        "x-service": "tf-api"
      }
    }
  },
  "security": [
    {
      "API-Key": []
    }
  ],
  "servers": [
    {
      "url": "https://{Domain}/api/iacp/v3",
      "variables": {
        "Domain": {
          "default": "example.scalr.io",
          "description": "Domain where Scalr is hosted"
        }
      }
    }
  ]
}
```

# Sibling pages

* [List Roles](https://docs.scalr.io/scalr/reference/get_roles.md)
* [Create a Role](https://docs.scalr.io/scalr/reference/create_role.md)
* [Delete a Role](https://docs.scalr.io/scalr/reference/delete_role.md)
* [Get a Role](https://docs.scalr.io/scalr/reference/get_role.md)