openapi: 3.1.0 info: title: New Relic Event Alerts Events API description: The New Relic Event API allows you to send custom event data to the New Relic platform via HTTP POST. Custom events submitted through this API can be queried and visualized using NRQL, making it suitable for tracking arbitrary business or application events. Each event is a JSON object with an eventType and any number of additional attribute key-value pairs. version: '1' contact: name: New Relic Support url: https://support.newrelic.com/ termsOfService: https://newrelic.com/termsandconditions/terms x-last-validated: '2026-04-18' servers: - url: https://insights-collector.newrelic.com description: US Production - url: https://insights-collector.eu01.nr-data.net description: EU Production security: - apiKey: [] tags: - name: Events description: Custom event ingestion endpoints paths: /v1/accounts/{accountId}/events: post: operationId: sendEvents summary: New Relic Send Custom Events description: Sends one or more custom events to the specified New Relic account. The request body must be a JSON array of event objects. Each event must include an eventType attribute. Payloads may be gzip-compressed. Events are immediately available for querying via NRQL after processing. A single request may contain up to 2000 events and must not exceed 1 MB uncompressed. tags: - Events parameters: - name: accountId in: path required: true description: The New Relic account ID to ingest events into schema: type: integer example: 42 - name: Content-Encoding in: header description: Use gzip for compressed payloads schema: type: string enum: - gzip example: gzip - name: Content-Type in: header required: true schema: type: string enum: - application/json example: application/json requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/EventPayload' example: - eventType: PurchaseEvent account: 3 amount: 259.54 success: true userEmail: test@example.com - eventType: PageView uri: /some/page referrer: https://example.com duration: 0.42 responses: '200': description: Success. All events were accepted. content: application/json: schema: $ref: '#/components/schemas/SuccessResponse' examples: Sendevents200Example: summary: Default sendEvents 200 response x-microcks-default: true value: success: true uuid: '500123' '400': description: Bad request. The payload is malformed. content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: Sendevents400Example: summary: Default sendEvents 400 response x-microcks-default: true value: success: false error: example_string errors: &id001 - error: example_string timestamp: example_string '403': description: Forbidden. The API key is invalid or lacks insert permissions. content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: Sendevents403Example: summary: Default sendEvents 403 response x-microcks-default: true value: success: false error: example_string errors: *id001 '408': description: Request timeout. The server did not receive the request in time. '413': description: Payload too large. The request body exceeds 1 MB. content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: Sendevents413Example: summary: Default sendEvents 413 response x-microcks-default: true value: success: false error: example_string errors: *id001 '429': description: Too many requests. Rate limit exceeded. content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: Sendevents429Example: summary: Default sendEvents 429 response x-microcks-default: true value: success: false error: example_string errors: *id001 x-microcks-operation: delay: 0 dispatcher: FALLBACK /alerts_events.json: get: tags: - Events summary: New Relic Get Alerts Events description: '🔥 This endpoint will be deprecated after 2024/01 🔥 New users should use these docs about managing alerts via NerdGraph.
This API endpoint allows you to list the alert events for your account.
Alerts events can be filter by product, target type, group ID, instance ID, and event type.
The options for products are: APM, BROWSER, MOBILE, SERVERS, SYNTHETICS, and ALERTS.
The options for entity type are: Application, Server, KeyTransaction, MobileApplication, BrowserApplication, and Monitor.
The options for event type are: NOTIFICATION, DEPLOYMENT, VIOLATION_OPEN, VIOLATION_CLOSE, VIOLATION, and INSTRUMENTATION.
The group option is normally the same as the entity (e.g. an Application group and entity will be the same)
See our documentation for a discussion on output pagination.
' parameters: - name: filter[product] in: query description: Filter by New Relic product schema: type: string example: example_string - name: filter[entity_type] in: query description: Filter by entity type schema: type: string example: standard - name: filter[entity_group_id] in: query description: Filter by entity group ID schema: type: integer example: 100 - name: filter[entity_id] in: query description: Filter by entity ID schema: type: integer example: 100 - name: filter[event_type] in: query description: Filter by event type schema: type: string example: standard - name: filter[incident_id] in: query description: Filter by incident id schema: type: integer example: 100 - name: page in: query description: Pagination index schema: type: integer example: 100 responses: '200': description: No response was specified headers: link: description: 'Links to related resources, in the format defined by [RFC 5988](https://tools.ietf.org/html/rfc5988#section-5). This will include a link with relation type `next` to the next page and `last` to the last page, unless this page is itself the last page. ' schema: type: array items: type: string content: application/json: schema: $ref: '#/components/schemas/RecentEventResponse' examples: Getalertsevents200Example: summary: Default getAlertsEvents 200 response x-microcks-default: true value: recent_event: description: {} entity_group_id: {} entity_id: {} entity_type: {} event_type: {} id: {} incident_id: {} priority: {} product: {} timestamp: {} application/xml: schema: $ref: '#/components/schemas/RecentEventResponse' examples: Getalertsevents200Example: summary: Default getAlertsEvents 200 response x-microcks-default: true value: recent_event: description: {} entity_group_id: {} entity_id: {} entity_type: {} event_type: {} id: {} incident_id: {} priority: {} product: {} timestamp: {} x-api-evangelist-processing: PascalCaseOperationSummaries: true CaselCaseOperationIds: true GenerateOperationSummariesFromPath: true ChooseTags: true operationId: getAlertsEvents x-microcks-operation: delay: 0 dispatcher: FALLBACK components: schemas: RecentEventResponseType: type: object properties: description: type: string example: example_string entity_group_id: type: integer example: 100 entity_id: type: integer example: 100 entity_type: type: string example: standard event_type: type: string example: standard id: type: integer example: 100 incident_id: type: integer example: 100 priority: type: string example: example_string product: type: string example: example_string timestamp: type: integer example: 1718153645993 CustomEvent: type: object description: A custom event to record. Must include eventType. All other attributes are user-defined key-value pairs. Attribute names must not start with nr. (reserved). Values can be strings, numbers, or booleans. required: - eventType properties: eventType: type: string description: The type of event. Used as the NRDB event table name. Must match the pattern [a-zA-Z0-9:_ ]+, max 255 characters. maxLength: 255 example: standard timestamp: type: integer description: Unix epoch timestamp in seconds. If omitted, the current time is used. Cannot be more than 48 hours in the past or 24 hours in the future. example: 1718153645993 additionalProperties: description: Additional user-defined event attributes oneOf: - type: string maxLength: 4096 - type: number - type: boolean EventPayload: type: array description: An array of custom event objects to ingest maxItems: 2000 items: $ref: '#/components/schemas/CustomEvent' SuccessResponse: type: object description: Successful ingestion response properties: success: type: boolean description: Whether the request was accepted example: true uuid: type: string description: Unique request identifier example: '500123' RecentEventResponse: type: object properties: recent_event: $ref: '#/components/schemas/RecentEventResponseType' ErrorResponse: type: object description: Error response properties: success: type: boolean example: false error: type: string description: Error message example: example_string errors: type: array description: List of validation errors items: type: object properties: error: type: string timestamp: type: string example: - error: example_string timestamp: example_string securitySchemes: apiKey: type: apiKey in: header name: Api-Key description: New Relic License Key or Ingest API Key externalDocs: description: New Relic Event API Documentation url: https://docs.newrelic.com/docs/data-apis/ingest-apis/event-api/introduction-event-api/