> ## Documentation Index
> Fetch the complete documentation index at: https://docs.justanotheruptime.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update user role in project

> Update a user's role in a specific project



## OpenAPI

````yaml /openapi.json patch /projects/{id}/users/{userId}/role
openapi: 3.0.0
info:
  title: Uptime Monitor API
  description: >-
    API documentation for the Uptime Monitor application. This API allows users
    to create and manage website monitors, perform checks, and view statistics.
  version: '1.0'
  contact: {}
servers:
  - url: https://api.justanotheruptime.com
security: []
tags:
  - name: auth
    description: Authentication endpoints
  - name: projects
    description: Project management endpoints
  - name: monitors
    description: Monitor management endpoints
  - name: checks
    description: Check-related endpoints
  - name: statistics
    description: Monitor statistics endpoints
paths:
  /projects/{id}/users/{userId}/role:
    patch:
      tags:
        - Projects
      summary: Update user role in project
      description: Update a user's role in a specific project
      operationId: ProjectController_updateUserRole
      parameters:
        - name: id
          required: true
          in: path
          description: Project ID
          schema:
            type: string
        - name: userId
          required: true
          in: path
          description: User ID to update
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateUserRoleDto'
      responses:
        '200':
          description: User role successfully updated
        '400':
          description: Invalid input
        '401':
          description: Unauthorized
        '403':
          description: Forbidden - Admin access required
        '404':
          description: Project or user not found
      security:
        - bearer: []
components:
  schemas:
    UpdateUserRoleDto:
      type: object
      properties:
        role:
          type: string
          enum:
            - user
            - admin
            - project_manager
            - super_admin
      required:
        - role
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````