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

# Set User Password

> Sets or resets the password for a user within the specified workspace. Also sends a notification email.



## OpenAPI

````yaml PATCH /api/v1/mgt/workspaces/{workspaceId}/users/{userId}/password
openapi: 3.1.0
info:
  title: Xenia Team API - Set User Password
  description: >-
    Allows workspace admins to update the password of a user within their
    workspace. Sends email notification after update.
  version: 1.0.0
servers:
  - url: https://api.xenia.team
security: []
paths:
  /api/v1/mgt/workspaces/{workspaceId}/users/{userId}/password:
    patch:
      tags:
        - Users
      summary: Set User Password
      description: >-
        Sets or resets the password for a user within the specified workspace.
        Also sends a notification email.
      parameters:
        - name: workspaceId
          in: path
          required: true
          description: ID of the workspace
          schema:
            type: string
            format: uuid
        - name: userId
          in: path
          required: true
          description: ID of the user whose password is to be updated
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                password:
                  type: string
                  minLength: 6
                  description: New password to be set
              required:
                - password
            example:
              password: newSecurePassword123
      responses:
        '200':
          description: Password updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                  extra_meta:
                    type: object
                    properties:
                      message:
                        type: string
              example:
                data: {}
                extra_meta:
                  message: User password updated successfully
        '400':
          description: Bad Request - Validation error (e.g., password too short)
        '401':
          description: Unauthorized - Missing or invalid authentication
        '403':
          description: Forbidden - Insufficient permissions
        '404':
          description: Not Found - User not found
        '500':
          description: Internal Server Error
      security:
        - clientKey: []
          clientSecret: []
components:
  securitySchemes:
    clientKey:
      type: apiKey
      in: header
      name: x-client-key
      description: Client API key for authentication
    clientSecret:
      type: apiKey
      in: header
      name: x-client-secret
      description: Client secret for authentication

````