# Create an API key

`POST https://testing-backend.estactics.com/api/apiTokens/createUserApiToken`

Creates an API key with no permissions. You can have up to 5.

Authentication: `Authorization: Bearer YOUR_API_KEY`. Required permission: `apiTokens.MANAGE`.

## Body parameters

- `name` (string, required): A name that reminds you what the key is for.
- `duration` (s | m | h | d | M | Y): Unit of time for the expiry. Leave out for a key that does not expire.
- `amount` (integer): How many units until the key expires.

## Example request body

```json
{
  "name": "Website",
  "duration": "M",
  "amount": 6
}
```

## Example response

```json
{
  "success": true,
  "data": {
    "id": 8,
    "userId": 18,
    "token": "atsec_your_new_key",
    "expiredAt": null
  }
}
```
