# AccountResetLicenseKey

Reset this account's license key

`POST /api/v2/accounts/{id}/resetlicensekey`

**API:** AvaTax API
**Tag:** Accounts
**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/Accounts/AccountResetLicenseKey/

## Description

Resets the existing license key for this account to a new key.
            
To reset your account, you must specify the ID of the account you wish to reset and confirm the action.
            
This API is only available to account administrators for the account in question, and may only be called after
an account has been activated by reading and accepting Avalara's terms and conditions.  To activate your account
please log onto the AvaTax website or call the `ActivateAccount` API.
            
You can only reset license with 'Default' license key name.
Resetting a license key cannot be undone.  Any previous license keys will immediately cease to work when a new key is created.
            
When you call this API, all account administrators for this account will receive an email with the newly updated license key.
The email will specify which user reset the license key and it will contain the new key to use to update your connectors.
Note: The reset license key functionality will only be available for existing active license key i.e. when you reset license key for the account, the Default license key will be reset.The reset license key functionality is not available for newly created license keys i.e. license keys other than Default

### Security Policies

* This API requires one of the following user roles: AccountAdmin, AvaTaxOnlyAccountAdmin, BatchServiceAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `id` | integer | path | Yes | The ID of the account you wish to update. |
| `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:** `ResetLicenseKeyModel`

Represents a license key reset request.

| Property | Type | Required | Description |
|---|---|---|---|
| `accountId` | integer | **Yes** | The primary key of the account ID to reset Example: `123456789`. |
| `confirmResetLicenseKey` | boolean | **Yes** | Set this value to true to reset the license key for this account.
This license key reset function will only work when called using the credentials of the account administrator of this account. Example: `true`. |

## Responses

| Status | Description | Schema |
|---|---|---|
| 200 | Success | `LicenseKeyModel` |
| 400 | Bad Request |  |
| 401 | Unauthorized |  |
| 404 | Not Found |  |

### 200 Response: `LicenseKeyModel`

Represents a license key for this account.

| Property | Type | Required | Description |
|---|---|---|---|
| `accountId` | integer | No | The primary key of the account Example: `123456789`. |
| `privateLicenseKey` | string | No | This is your private license key.  You must record this license key for safekeeping.
If you lose this key, you must contact the ResetLicenseKey API in order to request a new one.
Each account can only have one license key at a time. Example: `742A02AA463CDE741E932EC365360CA3CF378BD9`. |
| `httpRequestHeader` | string | No | If your software allows you to specify the HTTP Authorization header directly, this is the header string you
should use when contacting Avalara to make API calls with this license key. Example: `Basic MTIzNDU2Nzg5Ojc0MkEwMkFBNDYzQ0RFNzQxRTkzMkVDMzY1MzYwQ0EzQ0YzNzhCRDk=`. |

## Example Request

```bash
curl -X POST "https://sandbox-rest.avatax.com/api/v2/accounts/{id}/resetlicensekey" \
  -H "Authorization: Basic <credentials>" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
  "accountId": 123456789,
  "confirmResetLicenseKey": true
}'
```