---
updatedAt: 2025-09-08T22:58:46.000Z
agentTools:
  projectIndex: https://docs.lightup.ai/llms.txt
---

# Change user's workspace role

# OpenAPI definition

```json
{
  "info": {
    "description": "Lightup Metrics API provides CRUD interface to Dashboard objects.",
    "title": "Lightup Dashboard API",
    "version": "1.0.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/api/v0/ws/{workspace_id}/users/{user_id}": {
      "patch": {
        "description": "",
        "parameters": [
          {
            "description": "UUID of the workspace; visible in the workspace URL.",
            "explode": true,
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "description": "UUID of the workspace; visible in the workspace URL.",
              "title": "workspace_id",
              "type": "string"
            }
          },
          {
            "description": "ID of the user",
            "explode": true,
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "description": "ID of the user",
              "title": "user_id",
              "type": "integer"
            }
          },
          {
            "description": "Input 'Bearer _access-token_'. To obtain access token, see API, API Credentials: Get access token.",
            "explode": true,
            "in": "header",
            "name": "authorization",
            "required": true,
            "schema": {
              "description": "Input 'Bearer _access-token_'. To obtain access token, see API, API Credentials: Get access token.",
              "title": "authorization",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "definitions": {
                  "WorkspaceRole": {
                    "description": "An enumeration.",
                    "enum": [
                      "admin",
                      "editor",
                      "viewer",
                      "observer"
                    ],
                    "title": "WorkspaceRole",
                    "type": "string"
                  }
                },
                "properties": {
                  "role": {
                    "allOf": [
                      {
                        "$ref": "#/paths/~1api~1v0~1ws~1%7Bworkspace_id%7D~1users~1%7Buser_id%7D/patch/requestBody/content/application~1json/schema/definitions/WorkspaceRole"
                      }
                    ],
                    "description": "Workspace role to assign to user"
                  }
                },
                "required": [
                  "role"
                ],
                "title": "PatchWorkspaceUserRequest",
                "type": "object"
              }
            }
          },
          "description": "",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/paths/~1api~1v0~1ws~1%7Bworkspace_id%7D~1users~1/post/requestBody/content/application~1json/schema"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Change user's workspace role",
        "tags": [
          "Users"
        ]
      }
    }
  },
  "servers": [
    {
      "description": "Enter your Lightup subdomain",
      "url": "https://app.{clusterId}.lightup.ai",
      "variables": {
        "clusterId": {
          "default": "demo"
        }
      }
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```