---
title: Update Password
slug: kron-pam-api-collection-3-9-0/update-password
docTags: 
createdAt: 2026-10-21T06:10:28.166Z
---

{
  "id": "-5s5ZYXbdUQJYK_8eU-R4",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "{{url}}/aioc-rest-web/rest/sc/sapm/updatePassword",
    "name": "",
    "description": "<h3>Request Overview</h3>\n<p>Using this API, you can reset the password of a dynamic account that is already registered if it has been manually changed. You need to provide the new password and a comment. KRON PAM will connect using the new password, reset the password, and store it in the same Vault account.</p>\n<ul>\n<li>\n<p><strong>sapmdbId</strong>: ID of the Vault account.</p>\n</li>\n<li>\n<p><strong>newPassword</strong>: The new password for the account.</p>\n</li>\n<li>\n<p><strong>comment</strong>: A comment describing the reason or context for the password change.</p>\n</li>\n</ul>",
    "contentType": "application/json",
    "request": {
      "headerParameters": [
        {
          "name": "X-XSRF-TOKEN",
          "description": "",
          "default": "{{csrftoken}}",
          "value": "{{csrftoken}}",
          "type": "string"
        }
      ],
      "queryParameters": [],
      "pathParameters": [
        {
          "name": "url",
          "description": "",
          "default": "url",
          "value": "url",
          "type": "string"
        }
      ],
      "bodyDataParameters": [
        {
          "name": "body",
          "description": "",
          "default": "{\n\t\"sapmDbId\":85287\n\t,\"newPassword\":\"f6DaSH8x\"\n\t,\"comment\":\"xxx\"\n}",
          "value": "{\n\t\"sapmDbId\":85287\n\t,\"newPassword\":\"f6DaSH8x\"\n\t,\"comment\":\"xxx\"\n}",
          "type": "object"
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Update Password",
        "jsonExample": "SUCCESS"
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "mEJZOGdd8g1HqmcnF_q_O",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url {{url}}/aioc-rest-web/rest/sc/sapm/updatePassword \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --header 'x-xsrf-token: {{csrftoken}}' \\\n     --data '\"{\\n\\t\\\"sapmDbId\\\":85287\\n\\t,\\\"newPassword\\\":\\\"f6DaSH8x\\\"\\n\\t,\\\"comment\\\":\\\"xxx\\\"\\n}\"'"
        },
        {
          "id": "XdPMYWIa8pZKgbsaa8KEv",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\nmyHeaders.append(\"x-xsrf-token\", \"{{csrftoken}}\");\n\nvar raw = JSON.stringify(\"{\\n\\t\\\"sapmDbId\\\":85287\\n\\t,\\\"newPassword\\\":\\\"f6DaSH8x\\\"\\n\\t,\\\"comment\\\":\\\"xxx\\\"\\n}\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"{{url}}/aioc-rest-web/rest/sc/sapm/updatePassword\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "KwusQwGU8wsWSuCs6ioZv",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/sc/sapm/updatePassword\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest[\"x-xsrf-token\"] = \"{{csrftoken}}\"\nrequest.body = JSON.dump(\"{\\n\\t\\\"sapmDbId\\\":85287\\n\\t,\\\"newPassword\\\":\\\"f6DaSH8x\\\"\\n\\t,\\\"comment\\\":\\\"xxx\\\"\\n}\")\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "4AphcqLQiFpJmeEA5lBzm",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"{{url}}/aioc-rest-web/rest/sc/sapm/updatePassword\"\n\npayload = json.dumps(\"{\\n\\t\\\"sapmDbId\\\":85287\\n\\t,\\\"newPassword\\\":\\\"f6DaSH8x\\\"\\n\\t,\\\"comment\\\":\\\"xxx\\\"\\n}\")\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json',\n   'x-xsrf-token': '{{csrftoken}}'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "mEJZOGdd8g1HqmcnF_q_O"
    },
    "results": {
      "languages": [
        {
          "id": "y3HmfwWnkoe00DBRbzXAr",
          "language": "200",
          "code": "SUCCESS"
        }
      ],
      "selectedLanguageId": "y3HmfwWnkoe00DBRbzXAr"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}