All New Relic Partner API calls require authentication with both your partnership owner account's REST API key and your Partner ID. Otherwise, Partner API calls will be rejected.
Use Partner API v2
The New Relic Partner API is organized around REST. This API is designed to have predictable, resource-oriented URLs and to use HTTP response codes to indicate API errors. The API uses the JSON response format.
This information is for version 2 of the Partner API. Earlier versions have been deprecated. If you have problems with an older integration, upgrade to version 2.
Find your Partner API key
The Partner API requires that you authenticate with the REST API key that is specific to your partnership owner account. You cannot use an Admin user's API key with the Partner API, nor can you use the REST API key from another New Relic account.
Find your Partner ID
The Partner API also requires that you authenticate by providing a Partner ID specific to your partnership. This is unique from the account ID for your partnership owner account.
To obtain your Partner ID, go to your partner admin console and retrieve the partner ID number that is listed in your URL:
You must include the Partner ID as part of the base URL for the Partner API.
|URL component||URL pattern|
Partner API endpoint
Resource URL patterns
Authenticate the API call
To authenticate to the Partner API when making an API call:
- Add a request header labeled x-api-key and set its value to your Partner API key.
- Include your Partner ID at the specified point in the request URI.
New Relic uses conventional HTTP response codes to indicate success or failure of an API request. In general, codes in the
2xx range indicate success and codes in the
4xx range indicate an error that resulted from the provided information (for example, a required parameter was missing).
|400 Bad Request||Most commonly the call is missing a required parameter.|
|401 Unauthorized||A valid API key was not provided.|
|402 Request Failed||Parameters were valid but request failed for some reason.|
|404 Not Found||
The requested item doesn't exist.
|422 Unprocessable Entity||
Your account has special terms and cannot be changed.
For more help
Additional documentation resources include:
- Partner integration guide (how to work with New Relic as a partner)
- Partnership API account object (the primary JSON container object in the API)
- Partnership API user object (defined as an array within the account object)
- Partnership API subscription object (the level of service a customer purchases for one or more New Relic products)
- Partnership billing integration API (functions to replace a customer's existing subscription with a new one, or to update invoice information for New Relic partner accounts)