# Management API keys

> You can create and manage the API keys used to interact with the Management API. This API is used for backoffice operations, such as importing coupons, or retrieving campaign data.

> For the complete documentation index, see [llms.txt](https://docs.talon.one/llms.txt).

<FeatureAccessInfoBox/>

Every Management API key you generate enables the developer to access the endpoints of
your choice. Use this feature to increase security by controlling the level of access you
want to provide to your developers.

We recommend using Management API keys for authentication
over the [bearer token scheme](/management-api#section/Authentication).

:::note
If the user who created a Management API key is:
- [Disabled][user disabled]: The key is invalid but becomes valid again if that user is
  reactivated.
- [Deleted][user deleted]: The key is permanently invalid and any software that uses that
  key automatically loses access to the Management API.
:::

## API key states

API keys have the following states:

- <StateLabel type="valid" name="Valid" />: The key is valid and can be used.
- <StateLabel type="expsoon" name="Expires Soon" />: The key is valid and can be used but expires sometime in the next seven days.
- <StateLabel type="expired" name="Expired" />: They key has passed its expiration date and can no longer be used.
- <StateLabel type="invalid" name="Invalid" />: The user profile that created the key was either [disabled](/docs/product/account/account-settings/manage-users#disable-a-user) or [deleted](/docs/product/account/account-settings/manage-users#delete-a-user), and the key can no longer be used.

## Create a Management API key

1. On the leftmost menu, click <Account className="icon"/> **Account** > <Tools className="icon" /> **Tools** > **Management API keys**.
1. Click **Create Key**.
1. In **Key name**, type a name to identify the key.
1. In **Key expiration date**, select a date.

   :::tip
   Avoid choosing expiration dates that fall at the end of the year or during other
   high-traffic periods.
   :::

1. (Optional) In **Applications**, select the Applications that this key should work with. If
   you select none, the key works with all Applications.
   :::note
   If you select one or more Applications, the allowed endpoints list only contains endpoints
   that work with individual Applications.
   :::

1. In **Allowed endpoints**, select the endpoints that this key gives access to.
   See [the API docs][mapi] to learn about each endpoint.
1. Click **Create Key**.
1. Copy it and share it with the developer of your choice. The can be used immediately.
   :::note
   You cannot display the API key after this step. If you lose the value, create a
   new API key.
   :::

## Use a Management API key

To use the Management API key as a developer, see the
[Management API Authentication section](/management-api#section/Authentication).

## Delete an API key

Deleting an API key cannot be undone. The software that uses the key immediately loses
access to the [Management API][mapi].

1. On the leftmost menu, click <Account className="icon"/> **Account** > <Tools className="icon"/> **Tools** > **Management API keys**.
1. Click <TrashIcon className="icon"/> to delete the API key of your choice.

## Related pages

- [Management API overview](/docs/dev/management-api/overview.md)
- [Management API reference docs][mapi]
- [Manage Integration API keys][iapikeys]

[mapi]: /management-api
[user disabled]: /docs/product/account/account-settings/manage-users.md#disable-a-user
[user deleted]: /docs/product/account/account-settings/manage-users.md#delete-a-user
[iapikeys]: /docs/product/applications/manage-api-keys
