post:
  operationId: setPassword
  tags:
    - Password Management
  summary: Set Identity's Password
  description: |
    This API is used to set a password for an identity. 
    
    An identity can change their own password if they use a token generated by their IDN user, such as a [personal access token](https://developer.sailpoint.com/idn/api/authentication#personal-access-tokens) or ["authorization_code" derived OAuth token](https://developer.sailpoint.com/idn/api/authentication#authorization-code-grant-flow).
    
    A token with [API authority](https://developer.sailpoint.com/idn/api/authentication#client-credentials-grant-flow) can be used to change **any** identity's password.  "API authority" refers to a token that only has the "client_credentials" grant type.
  requestBody:
    required: true
    content:
      application/json:
        schema:
          $ref: '../schemas/PasswordChangeRequest.yaml'
  responses:
    '202':
      description: Reference to the password change.
      content:
        application/json:
          schema:
            $ref: '../schemas/PasswordChangeResponse.yaml'
    '400':
      $ref: '../../v3/responses/400.yaml'
    '401':
      $ref: '../../v3/responses/401.yaml'
    '403':
      $ref: '../../v3/responses/403.yaml'
    '429':
      $ref: '../../v3/responses/429.yaml'
    '500':
      $ref: '../../v3/responses/500.yaml'