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

# Update Project User

> Update a project user: its name, properties, or role. Setting `userRoleId` is how you move a user onto another role; the user's next token carries that role's permissions.



## OpenAPI

````yaml put /v1/api/projects/{projectId}/users/{projectUserId}
openapi: 3.1.0
info:
  title: Upsolve API
  version: 1.5.0
servers:
  - url: https://api.upsolve.ai
security: []
tags: []
paths:
  /v1/api/projects/{projectId}/users/{projectUserId}:
    put:
      summary: 'Update a project user: its name, properties, or r…'
      description: >-
        Update a project user: its name, properties, or role. Setting
        `userRoleId` is how you move a user onto another role; the user's next
        token carries that role's permissions.
      operationId: PutV1ApiProjectsProjectIdUsersProjectUserId
      parameters:
        - name: projectUserId
          in: path
          required: true
          description: PUT /v1/api/projects/:projectId/users/:projectUserId Parameter
          schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
        - name: projectId
          in: path
          required: true
          description: PUT /v1/api/projects/:projectId/users/:projectUserId Parameter
          schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
      requestBody:
        description: PUT /v1/api/projects/:projectId/users/:projectUserId Request body
        content:
          application/json:
            schema:
              type: object
              properties:
                apiKey:
                  type: string
                  minLength: 1
                  description: >-
                    Upsolve API key, generated under Account → Developer
                    settings in the Upsolve Hub. Keys are user-scoped: pass
                    organizationId alongside the key to select which org to act
                    on.
                  examples:
                    - up_embed_************
                organizationId:
                  description: >-
                    Your Upsolve organization's UUID — the org that owns the API
                    key and project. This is NOT a project organization: do not
                    pass a value registered via /projects/register-organization,
                    and do not pass an `externalId` (only
                    `projectOrganizationId` accepts those). Omit it when using
                    an org-bound API key — the org is read from the key and any
                    value sent here is ignored. Required only for user-scoped
                    API keys (created under Account → Developer settings) and
                    for the Supabase JWT path, where the org is ambiguous and
                    membership is verified against it.
                  examples:
                    - 123e4567-e89b-12d3-a456-426614174000
                  type: string
                  format: uuid
                  pattern: >-
                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
                name:
                  type: string
                  minLength: 1
                properties:
                  description: >-
                    The user's properties, read by row-level security as
                    `{{user.<key>}}`. Replaces the stored set. The same field
                    `register-user` and `embed-token` call `properties`.
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties: {}
                payload:
                  description: 'Deprecated: the old name of `properties`, still accepted.'
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties: {}
                userRoleId:
                  description: >-
                    The user's role, from `GET
                    /v1/api/projects/{projectId}/user-roles`. `null` removes it,
                    which leaves the user view-only. Takes effect on the user's
                    next token.
                  type:
                    - string
                    - 'null'
                  format: uuid
                  pattern: >-
                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
                projectOrganizationId:
                  type:
                    - string
                    - 'null'
                  format: uuid
                  pattern: >-
                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
              required:
                - name
            examples:
              example1:
                value:
                  apiKey: up_embed_************
                  organizationId: 123e4567-e89b-12d3-a456-426614174000
        required: true
      responses:
        '200':
          description: >-
            PUT /v1/api/projects/:projectId/users/:projectUserId Positive
            response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    const: success
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
                      name:
                        type: string
                      organization_id:
                        type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
                      properties:
                        type: object
                        propertyNames:
                          type: string
                        additionalProperties: {}
                      user_role_id:
                        type:
                          - string
                          - 'null'
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
                      project_id:
                        type:
                          - string
                          - 'null'
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
                      project_organization_id:
                        type:
                          - string
                          - 'null'
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
                      created_at: {}
                      updated_at: {}
                      user_role_name:
                        type:
                          - string
                          - 'null'
                      member_user_id:
                        type:
                          - string
                          - 'null'
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
                      is_managed:
                        type: boolean
                        description: >-
                          True for a shadow project user provisioned for an
                          organization member. Its name, role and identity are
                          fixed; only `properties` and the project organization
                          can be edited, and it cannot be deleted.
                    required:
                      - id
                      - name
                      - organization_id
                      - properties
                      - user_role_id
                      - project_id
                      - project_organization_id
                      - created_at
                      - updated_at
                      - user_role_name
                      - member_user_id
                      - is_managed
                    additionalProperties: false
                required:
                  - status
                  - data
                additionalProperties: false
        '400':
          description: >-
            PUT /v1/api/projects/:projectId/users/:projectUserId Negative
            response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    const: error
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                      code:
                        type: string
                      details:
                        type: object
                        propertyNames:
                          type: string
                        additionalProperties: {}
                    required:
                      - message
                    additionalProperties: false
                required:
                  - status
                  - error
                additionalProperties: false
      security:
        - APIKEY_1: []
components:
  securitySchemes:
    APIKEY_1:
      type: apiKey
      in: query
      name: apiKey
      x-in-actual: body
      description: apiKey MUST be supplied within the request body instead of query

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.