Skip to main content

Changing an account password

Now that we know the ID of the account, we can now change its password. The endpoint used to achieve this is PATCH /accounts({accountKey}).

  1. From Swagger UI, locate PATCH /accounts({accountKey}), which is under Accounts.

    42729.png
  2. Click PATCH /accounts({accountKey}) .

  3. Click Try it out.

  4. Fill in the accountKey field, and provide json containing the operation and password in the request body.

    PATCH /accounts({accountKey}) supports replace, remove and test operations.

    • replace: change a password

    • remove: remove a password

    • test: verify a password

    An example json looks like:

    [
       {
          "op":"replace",
          "path":"/password",
          "value":"Qwerty123"
       }
    ]

    Here, we will change the account’s password to Qwerty123 using the replace operation.

  5. Click Execute.

    42730.png
  6. Check that the endpoint returned a 202 (Accepted) code; the request was successfully submitted, however it does not tell us the status of the password change.

    42731.png

    The response header returns a location field, containing the operation key of the request (in this case, 90cd48c8-e1de-4801-981e-a7699c2a4ec6) We will use that to get the operation result.