> For the complete documentation index, see [llms.txt](https://docs.navigaglobal.com/naviga-subscribe-api/MhIk9TtEtuSKzip2tsSt/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.navigaglobal.com/naviga-subscribe-api/MhIk9TtEtuSKzip2tsSt/users-orchestrator-api/migration-to-usersorchestrator-api/update-password.md).

# Update Password

## **Introduction** <a href="#migrationtopaymentsapi-applypayment" id="migrationtopaymentsapi-applypayment"></a>

This endpoint handles the workflow orchestration between the integration services (such as Auth0, Gigya, SSOR, and Firefly) and Subscribe Registration API to update the password of a user based on the provided CustomerRegistrationId.

## **Comparison** <a href="#migrationfromusertousersorchestrator-comparison" id="migrationfromusertousersorchestrator-comparison"></a>

**Note:** *The old model is in PascalCase, while the new model is in CamelCase.*

<table data-full-width="true"><thead><tr><th width="183.33333333333337"> </th><th width="422">User API</th><th>Users Orchestrator API</th></tr></thead><tbody><tr><td>URL</td><td>/User/{<strong>customerRegistrationId</strong>}</td><td>/v4/Users/{<strong>CustomerRegistrationId</strong>}/Password</td></tr><tr><td>Method</td><td>PUT</td><td>PATCH</td></tr><tr><td>Request</td><td><pre class="language-json"><code class="lang-json">{
  "OldPassword": "string",
  "Password": "string"
}
</code></pre></td><td><pre class="language-json"><code class="lang-json">{
  "password": "string"
}
</code></pre><p> </p></td></tr><tr><td>Response</td><td><pre class="language-json"><code class="lang-json">{
  "Code": 0,
  "Errors": [
    {
      "Message": "string",
      "Code": "string",
      "Type": {
        "Id": 0,
        "Code": "string"
      },
      "ErrorSource": "string"
    }
  ],
  "Result": {
    "CustomerRegistrationId": "string",
    "Updated": true
  },
  "SessionId": "string",
  "RequestId": "string"
}
</code></pre></td><td><pre class="language-json"><code class="lang-json">{
  "message": {
    "code": "string",
    "text": "string",
    "type": 0
  },
  "meta": "string"
</code></pre></td></tr></tbody></table>

***

## Update Password

<mark style="color:purple;">`PATCH`</mark> `/Users/{{customerRegistrationId}}/Password`

This endpoint is used to update the password of a user.

**Note:** *The parameters marked with an asterisk* (<mark style="color:red;">\*</mark>) *are mandatory and must be included in the input model.*

#### Path Parameters

| Name                                                     | Type   | Description                                                   |
| -------------------------------------------------------- | ------ | ------------------------------------------------------------- |
| CustomerRegistrationId<mark style="color:red;">\*</mark> | String | Unique identifier for the user in the authentication provider |

#### Headers

| Name                                                | Type   | Description                                   |
| --------------------------------------------------- | ------ | --------------------------------------------- |
| Authorization<mark style="color:red;">\*</mark>     | String | JSON Web Token used for security purposes     |
| X-SourceSystem<mark style="color:red;">\*</mark>    | String | To identify the consumer or the Source System |
| X-ClientCode<mark style="color:red;">\*</mark>      | String | Client Code of the Tenant                     |
| X-PaperCode<mark style="color:red;">\*</mark>       | String | Paper Code of the Tenant                      |
| X-ClientGroupCode<mark style="color:red;">\*</mark> | String | Client Group Code of the Tenant               |

#### Request Body

| Name                                       | Type   | Description            |
| ------------------------------------------ | ------ | ---------------------- |
| Password<mark style="color:red;">\*</mark> | String | Subscriber’s password. |

{% tabs %}
{% tab title="200" %}

```json
{
  "message":{
      "code": "UsersOrchestrator_S200_11",
      "text": "Update password completed.",
      "type": "Success"
  },
  meta: null
}
```

{% endtab %}

{% tab title="400" %}

<table><thead><tr><th width="149">Status Code</th><th>Code</th><th>Message</th></tr></thead><tbody><tr><td>400</td><td>UsersOrchestrator_E400</td><td>Bad Request</td></tr><tr><td>400</td><td>UsersOrchestrator_E400_00</td><td>Invalid InputModel - {Message}</td></tr><tr><td>500</td><td>UsersOrchestrator_E500</td><td>Internal Server Error</td></tr><tr><td>500</td><td>UsersOrchestrator_E500_01</td><td>There was a problem during the GetById workflow.</td></tr></tbody></table>
{% endtab %}
{% endtabs %}

## Events <a href="#events.8" id="events.8"></a>

**Note:–** The associated Event IDs for the Event Type Codes are specified in parentheses (i.e., **EventTypeCode (EventID)**) in the table below.

<table><thead><tr><th width="160">Current</th><th width="310">New</th><th>Note</th></tr></thead><tbody><tr><td>GETUSERBYID (1042)</td><td><ul><li><strong>AUTHSYSTEM_USER_GETBYID (4601)</strong></li><li><strong>SUBSCRIBE_USER_GETBYID (4001)</strong></li></ul></td><td>For each GETUSERBYID old event, we now create two events: one for the call to the third-party system and one for the call to our database.</td></tr><tr><td>CHGPWD (22)</td><td><ul><li><strong>AUTHSYSTEM_USER_CHANGEPASSWORD (4609)</strong></li><li><strong>SUBSCRIBE_USER_CHANGEPASSWORD (4010)</strong></li></ul></td><td>For each CHGPWD old event, we now create two events: one for the call to the third-party system and one for the call to our database. SUBSCRIBE_USER_CHANGEPASSWORD is responsible for sending the email.</td></tr></tbody></table>
