---
title: "Create a NewRelic integration"
method: POST
path: "/v1/integrations/newrelic"
tags: ["New Relic Integration"]
---

# Create a NewRelic integration

`POST /v1/integrations/newrelic`

## Request

- Base URL: `https://docs.grepr.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://docs.grepr.ai/v1/integrations/newrelic`
- Auth: one of:
  - API key in header `GREPR-API-KEY`
  - OpenID Connect (`https://grepr-prod.us.auth0.com/.well-known/openid-configuration`)

Creates an integration to connect to NewRelic.

## Request body

- WriteNewRelic
  - `name` string, required: Name of the integration.
  - `payload` NewRelic, required: The payload containing integration data.
    - `accountId` string: Account Id for New Relic.
    - `apiKey` string: Masked API key for New Relic.
    - `dashboardFreshnessWindow` string, ISO-8601: The time window in which a dashboard must have been accessed to be considered active.
    - `exceptions` object: The imported exceptions from NewRelic. This is a map from the vendor resource ID to the exception.
    - `licenseKey` string: Masked license key for New Relic.
    - `privateLink` boolean: Route logs to New Relic over AWS PrivateLink using the private log endpoint.
    - `site` string, required: New Relic API endpoint url base
  - `teamIds` string[]: The team IDs that this integration is associated with.
  - `type` 'newrelic', required: The type of the integration. This is used to determine the payload type.
  - `version` integer, required: Version of the integration. Should be increased by one for every new update in order for the write to succeed. Otherwise, a '409 Conflict' will be returned.

## Response `200`

Integration created successfully

- ReadNewRelic
  - `createdAt` string, date-time, required: Timestamp when the integration was created.
  - `id` string, required: The integration id
  - `jobIds` string[], required: List of job IDs associated with the integration.
  - `name` string, required: Name of the integration.
  - `organizationId` string, required: Organization ID of the integration.
  - `payload` NewRelic, required: The payload containing integration data.
    - `accountId` string: Account Id for New Relic.
    - `apiKey` string: Masked API key for New Relic.
    - `dashboardFreshnessWindow` string, ISO-8601: The time window in which a dashboard must have been accessed to be considered active.
    - `exceptions` object: The imported exceptions from NewRelic. This is a map from the vendor resource ID to the exception.
    - `licenseKey` string: Masked license key for New Relic.
    - `privateLink` boolean: Route logs to New Relic over AWS PrivateLink using the private log endpoint.
    - `site` string, required: New Relic API endpoint url base
  - `teamIds` string[]: The team IDs that this integration is associated with.
  - `type` 'newrelic', required: The type of the integration. This is used to determine the payload type.
  - `updatedAt` string, date-time, required: Timestamp when the integration was last updated.
  - `version` integer, required: Version of the integration. Should be increased by one for every new update in order for the write to succeed. Otherwise, a '409 Conflict' will be returned.

## Other responses

- `401`: Unauthorized
- `409`: Integration already exists.

---

[API](https://skmtc.dev/grepr/apis/grepr-api.md) - [All operations](https://skmtc.dev/grepr/apis/grepr-api/llms.txt) - [OpenAPI document](https://skmtc.dev/grepr/apis/grepr-api/revisions/2a5ce03a0bf0?raw)
