---
title: Reset Password
slug: single-connect-api-3-2-0/reset-password
description: Learn how to use cURL to make a secure POST request for password reset with this helpful code example. The document showcases the correct headers and data needed to successfully reset passwords for a specific URL.
docTags: 
createdAt: 2022-11-10T14:24:52.000Z
---

{
  "id": "Yt2dUvjoJKjBI9xRnzNW6",
  "data": {
    "url": "{{url}}/aioc-rest-web/rest/sc/sapm/resetPassword",
    "method": "POST",
    "request": {
      "pathParameters": [],
      "queryParameters": [],
      "headerParameters": [
        {
          "name": "X-XSRF-TOKEN",
          "type": "string",
          "example": "{{csrftoken}}",
          "description": ""
        }
      ],
      "bodyDataParameters": [
        {
          "name": "body",
          "type": "string",
          "example": "{\n\t\"dbId\":85287\n}",
          "description": ""
        }
      ],
      "formDataParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Reset Password",
        "jsonExample": "SUCCESS"
      }
    ],
    "contentType": "application/json",
    "description": "<p>Using this API, you can reset the password of a dynamic account that is already registered. Since Single Connect already has current password of the account you give, it will only reset password and continue keeping it.</p>",
    "examples": {
      "languages": [
        {
          "id": "Q2aq3qPVSUlWiCcP-72N5",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url {{url}}/aioc-rest-web/rest/sc/sapm/resetPassword \\\n     --header 'accept: application/json'"
        },
        {
          "id": "Kxi1vPc34SqM8wYF2rtsM",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"{{url}}/aioc-rest-web/rest/sc/sapm/resetPassword\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "8kHzrx1x3HmNwks4a_AtR",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/sc/sapm/resetPassword\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "KSnCnLkttzm8V45QwOP2i",
          "language": "python",
          "label": "Python",
          "code": "import requests\n\nurl = \"{{url}}/aioc-rest-web/rest/sc/sapm/resetPassword\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "Q2aq3qPVSUlWiCcP-72N5"
    },
    "results": {
      "languages": [
        {
          "id": "Yl3Ir7cXWiVJIE5fLSZ66",
          "language": "200",
          "code": "SUCCESS"
        }
      ],
      "selectedLanguageId": "Yl3Ir7cXWiVJIE5fLSZ66"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}