New Relic API keys

New Relic has several different APIs that each require their own type of API key to use. This resource describes our API keys, what they're used for, and how to access them.

Manage API keys in UI

Here's a direct link to the API keys UI page. To find this from the New Relic UI:

  1. From the account dropdown, select Account settings.
  2. Select API keys.

Overview of API keys

The table below summarizes our available API keys and their uses.

Some keys are able to be used by more than one API. If you're using a specific API, see the docs for that API to understand which keys are required and recommended.

Key type What it's for Where to access

User key

(aka "personal API key")

Used for NerdGraph (our GraphQL API) and for accessing REST API endpoints (dependent on user permissions).

API keys UI

License key

Allows ingestion of data from APM agents, the infrastructure agent, and some other data-ingest APIs.

API keys UI

Insights insert key

(aka "Insert key")

Allows ingestion of events via HTTPS request from our metric, log, trace, and event APIs and the tools that use those APIs.

Go to the API keys UI and click Insights insert key.

Browser key

Allows ingestion of browser monitoring data.

API keys UI

Mobile key

(aka "mobile app token")

Allows mobile monitoring data to be sent to New Relic.

See Mobile app token.

REST API key

Note: we recommend using the user key instead because it has fewer limitations. The REST API key is for using our REST APIs for Alerts, APM, Browser, Infrastructure alerts, as well as Mobile REST APIs and the API Explorer.

Go to the API keys UI and click REST API key.

Admin API key

As of December 4, 2020, all existing admin keys have been migrated to be user keys.

For more information, see Admin key and User key below.
API keys UI (will appear as user keys)

Insights query key

(aka "Query key")

This key allows use of the Insights query API. Note: we now recommend using NerdGraph to query New Relic data.

Go to the API keys UI and click Insights query key.

User key

New Relic user keys (previously referred to as "personal API keys") are required for NerdGraph (our GraphQL API), which allows you to query most New Relic data and do some types of configuration. User keys also let you use our REST API, with restrictions based on your permissions.

The instructions below are for managing keys in the UI. For managing keys via API, see Manage keys with NerdGraph.

Create a user key
  1. Go to the API keys UI and click Create key.
  2. In the Account dropdown, choose the account for which you want the key to be created.
  3. In the Key type dropdown, select User.
  4. In the Name field, enter a descriptive name for your key.
  5. In the Notes field, add relevant details about the key.
  6. Click Create.
Edit a user key
  1. Go to the API keys UI.
  2. In the row of the user key you want to edit, click ... and select Edit.
  3. Make your changes and click Update key.
Delete a user key
  1. Go to the API keys UI.
  2. In the row of the user key you want to delete, click ... and select Delete.
  3. Click Delete key to confirm your deletion.

In December 2020, user keys supplanted Admin API keys. For details, see Admin API key.

License key

New Relic license keys allow the ingestion of data from APM agents, the infrastructure agent, and some other data-ingest APIs. If you're using a specific API, see the docs for that API to understand which keys are required or recommended.

The instructions below are for managing keys in the UI. For managing keys via API, see Manage keys with NerdGraph.

Create a license key
  1. Go to the API keys UI and click Create key.
  2. In the Account dropdown, choose the account for which you want the key to be created.
  3. In the Key type dropdown, select License.
  4. In the Name field, enter a descriptive name for your key.
  5. In the Notes field, add relevant details about the key.
  6. Click Create.
Edit a license key
  1. Go to the API keys UI.
  2. In the row of the license key you want to edit, click ... and select Edit.
  3. Make your changes and click Update key.
Delete a license API key
  1. Go to the API keys UI.
  2. In the row of the license key you want to delete, click ... and select Delete.
  3. Click Delete key to confirm your deletion.

You can't manage or delete an original license key that was created when your account was created. For that, contact New Relic support.

Browser key

The browser key allows the ingestion of data from New Relic browser monitoring.

The instructions below are for managing keys in the UI. For managing keys via API, see Manage keys with NerdGraph.

Create a browser key
  1. Go to the API keys UI and click Create key.
  2. In the Account dropdown, choose the account for which you want the key to be created.
  3. In the Key type dropdown, select Browser.
  4. In the Name field, enter a descriptive name for your key.
  5. In the Notes field, add relevant details about the key.
  6. Click Create.
Edit a browser key
  1. Go to the API keys UI.
  2. In the row of the browser API key you want to edit, click ... and select Edit.
  3. Make your changes and click Update key.
Delete a browser key
  1. Go to the API keys UI.
  2. In the row of the browser API key you want to delete, click ... and select Delete.
  3. Click Delete key to confirm your deletion.

You can't manage or delete an original browser key that was created when your account was created. For that, contact New Relic support.

REST API key

We recommend using a user key to use the REST API because that key has fewer limitations.

You can use a REST API key with our REST API and the API Explorer. For parent accounts with sub-accounts, each sub-account must use its own REST API key.

Availability: Each New Relic account can have only one REST API key.

Activate or change REST API key
  1. Go to the API keys UI and select REST API key.
  2. Click Regenerate REST API key.
  3. Click (Show key) to view your account's new REST API key.
  4. Copy your account's REST API key to use with New Relic's REST API.
View REST API keys

To view REST API keys:

  1. Go to the API keys UI and select REST API key.
  2. Click (Show key) to view your account's new REST API key.
Delete REST API key

To delete your account's REST API key:

  1. Before you delete an API key, make sure you have the correct account or sub-account.
  2. Go to the API keys UI and select REST API key.
  3. Select the delete [trash can icon] icon for the REST API key.
  4. Confirm the deletion by typing DELETION IS FOREVER in the text field.
  5. Select Delete.

Insights insert key

The Insights insert key (aka the "Insert key") is required for the ingestion of data via our Event API, Log API, Metric API, and Trace API, or via tools that use those APIs.

Tips on availability and access:

  • Because these keys are associated with an account and not a specific user, anyone in the account with access to a key can use it.
  • As a best practice for security purposes, we recommend you use different Insights insert keys for different applications or different data sources.
Generate an Insights insert key
  1. Go to the API keys UI and select Insights insert keys.
  2. Next to the Insert keys heading, select the button. A cURL command containing your insert key will appear, as well as NRQL query field.
  3. Edit the NRQL query field.
  4. Add comments in the Notes field if desired.
  5. Click Save your notes.
Edit or delete an Insights insert key
  1. Go to the API keys UI and select Insights insert keys.
  2. Under Insert Keys, find the key you want to modify. Select Edit or Delete.

Insights query key

The Insights query key is used for our Insights query API: we now recommend using NerdGraph for querying New Relic data.

Generate an Insights query key

You must have access to the UIs you plan to query and the correct permissions in order to register or modify this key.

Insights query keys are generated per account; they're not associated with a specific user. This means that any user in an account with access to a query key can use it.

To register this key:

  1. Go to the API keys UI and select Insights query keys.
  2. Next to the Query Keys heading, select the button. A cURL command containing your insert key will appear, as well as NRQL query field.
  3. Edit the NRQL query field.
  4. Add comments in the Notes field if desired.
  5. Click Save your notes.
Edit or delete an Insights query key

To edit or delete this key:

  1. Go to the API keys UI page and select Insights query keys.
  2. Under Query Keys, find the key you want to modify. Select Edit or Delete.

Admin key

As of December 4, 2020, all existing admin keys have been migrated to be user keys.

You don’t need to do anything for existing admin keys to remain active. They will be automatically accessible via the API keys UI, labeled as user keys, and granted identical permissions. You can manage them as you would any user key via the same workflow.

All migrated admin keys will have a note that says “Migrated from an admin user key” in the key table, so you’ll be able to find them easily.

For more help

If you need more help, check out these support and learning resources: