# ChangePassword

Change Password

`PUT /api/v2/passwords`

**API:** AvaTax API
**Tag:** Users
**API Version:** v2
**Base URL:** https://sandbox-rest.avatax.com/
**Content-Type:** `application/json`
**Accepts:** `application/json`
**Authentication:** API Key (`Authorization` in header) or OAuth 2.0 or Basic (username + license key)

Source: https://developer.avalara.com/products/crossborder/api/methods/Users/ChangePassword/

## Description

Allows a user to change their password via an API call.
            
This API allows an authenticated user to change their password via an API call.  This feature is only available
for accounts that do not use SAML integrated password validation.
            
This API only allows the currently authenticated user to change their password; it cannot be used to apply to a
different user than the one authenticating the current API call.

### Security Policies

* This API requires one of the following user roles: AccountAdmin, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, AvaTaxOnlyUserAdmin, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `X-Avalara-Client` | string | header | No | Identifies the software you are using to call this API.  For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . |

## Request Body

**Schema:** `PasswordChangeModel`

Password Change Model

| Property | Type | Required | Description |
|---|---|---|---|
| `oldPassword` | string | **Yes** | Old Password Example: `MyOldPassword123!`. |
| `newPassword` | string | **Yes** | New Password Example: `ANewPassword567:)`. |

## Responses

| Status | Description | Schema |
|---|---|---|
| 200 | Success |  |
| 400 | Bad Request |  |
| 401 | Unauthorized |  |

## Example Request

```bash
curl -X PUT "https://sandbox-rest.avatax.com/api/v2/passwords" \
  -H "Authorization: Basic <credentials>" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
  "oldPassword": "MyOldPassword123!",
  "newPassword": "ANewPassword567:)"
}'
```