# Creates or updates an API key for integration with New Relic

**PUT** `/v1/integrations/newrelic/{id}/api-key`

**Operation ID**: `upsertNewRelicApiKey`
**Summary**: Creates or updates an API key for integration with New Relic
Creates a NewRelic API key for a NewRelic integration if a key doesn't exist, and updates it otherwise. If the api key is updated while the integration is being used by a pipeline, the  new key is used at pipeline restart, rescaling, or an update.  This key is used for the NewRelic API to retrieve the dashboards and alerts.

## Tags
- New Relic Integration
## Parameters

- **id** (required) - path
  - Type: string

## Request Body

**Content-Type**: `application/json`

**Schema**: `SecretApi`

## Responses

### 204

NewRelic API key upserted successfully.

### 401

Unauthorized

### 404

Integration not found.
