---
updatedAt: 2026-09-28T12:07:43.000Z
agentTools:
  projectIndex: https://docs.umbrellacost.io/llms.txt
---

# Manage a role's sub-roles

Adds and/or removes sub-roles from a role. A role inherits permissions and data access from its sub-roles, so this endpoint is how that inheritance is wired up - this is an incremental add/remove operation, not a full replacement of the sub-role list.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "user-management/roles API",
    "version": "1.0.0",
    "description": "API documentation for user-management/roles endpoints"
  },
  "servers": [
    {
      "url": "https://api.umbrellacost.io/api/v2/user-management/roles"
    }
  ],
  "paths": {
    "/{roleId}/sub-roles": {
      "put": {
        "operationId": "putroleIdsubroles",
        "summary": "Manage a role's sub-roles",
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer token for authentication"
          },
          {
            "name": "apikey",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "API key for authorization"
          },
          {
            "name": "roleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "500": {
            "description": "Internal Server Error"
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "subRoleIdsToAdd": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "subRoleIdsToRemove": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": false
  }
}
```