# Authorization

All requests to Acquire's API require an **API\_KEY**. Authentication is provided by the API\_KEY. To create or delete an API\_KEY, log in to Acquire and go t&#x6F;**`Settings > For Developers > API Key`**\
\
**Authentication example**\
Include this HTTP header for each API request:

`Authorization: Bearer ${API_KEY}`

**Header Name:** Authorization\
**Header Value:** Bearer {{API\_KEY}}

Note: *Please make sure there is a space between the Bearer and API KEY.*

### **Sample Code**

```javascript
curl --request GET 'https://{{account_id}}.acquire.io/api/v1/account/department' \
--header 'Authorization: Bearer ${API_KEY}'
```

### **How to Generate an API\_KEY**

{% hint style="danger" %}
Make sure you have the necessary permissions to generate an **API\_KEY**.
{% endhint %}

Follow the steps to generate an API\_KEY:

1. Log in to your Acquire account.
2. Navigate to `Settings > For Developers > API Key`.
3. Click on 'Create API Key' and enter a token name and select your token permissions.
4. Click on 'Next'. An API\_KEY will be generated.
5. Copy the API\_KEY and secure it in a safe location. You will not be able to display it again if you misplace it.
6. Once done, close the menu.

![Settings > For Developers > API Key](https://2694727699-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LMa9C05MmCnAr03_v9O%2F-MVzrt7m23l-L9qEJur4%2F-MVzvWPLJPsguYna66jd%2Fapikey.gif?alt=media\&token=11f08b3c-1b3e-4d8e-b737-d35282ae7e4e)

{% hint style="warning" %}

#### Save Your API\_KEY

There is no way to display your API\_KEY after closing the menu. Secure it in a safe location before exiting the screen.
{% endhint %}

{% hint style="success" %}
All API requests must be over HTTPS.&#x20;
{% endhint %}

### Revoking an API KEY&#x20;

Following steps to revoke API Key

1. Log in to your Acquire account.
2. Navigate to `Settings > For Developers > API Key`
3. In the 'Action' column, click on the ellipsis ('...') and select 'Delete'.
4. A confirmation will display. Click on 'Delete API Key' to delete the key.

![Delete API KEY](https://2694727699-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LMa9C05MmCnAr03_v9O%2F-MW-9BMuFX14YDIWGrag%2F-MW-Ae13f3BwGU6ps-xn%2Fdelete-api-key.gif?alt=media\&token=a8f3a672-665e-4e07-9905-566b46c2ffb4)

{% hint style="danger" %}

### Delete Carefully

Deleting an API\_KEY cannot be undone, so delete with caution.
{% endhint %}
