Your data. Anywhere you go.

New Relic for iOS or Android

Download on the App Store    Android App on Google play

New Relic Insights App for iOS

Download on the App Store

Learn more

Close icon

Posting Events to not working



I am currently trying to post an event to the insights api at My problem is that I am not able to query for it in insights. It seems like the event is not posting correctly. When I run a curl command locally i get a return value of {}%. My guess is that its an issue with my account_id/key but I’m not sure how I confirm that. Here is the curl command I’m running:

curl --data ‘{“eventType” : “Alert”, “message” : “This is an Alert!”}’
–request POST
–header “Content-Type: application/json”
–header “X-Insert-Key: MY_KEY”

Any help on figuring this out would be great.



Run this in insights:


Not entirely sure you have that curl statement correct. It’s hard to tell because this forum software sometimes alters the text.

curl -XPOST -H 'X-Insert-Key: foo' -H "Content-type: application/json" -d '{“eventType” : “Alert”, “message” : “This is an Alert!”}' ''


The query works and gives me a list of our event types. The curl command returns the same empty response {}%.



Does it show the “Alert” event type?

What NRQL query are you using to find your alert event?

You are using an insert API key?

You are using a paid account?

You can see any other custom event types?


Hey - I think @6MM may be right here about the event type being missing. I just ran the SHOW EVENT TYPES SINCE 1 week ago query in your account and I’m not seeing any event named Alert.

Can you double check your insert key and the CURL command you are using to push that data in?


So there won’t be any Alert Types showing up because they are new, or rather, I’m trying to set them up by posting them. Is there something that has to be done, to onboard a new type other than post it? I’ve tried @6MM 's curl command and got the same results. At this point I’m guessing its the the key privileges. I will follow up on that and report back. Thank you for your help!


Hi - The documentation explains how to generate an Insights key


Hey I just ran a test with the Event Insert API on my own account and I see that it worked fine for me. My CURL command is below, copied exactly from the Insights API Insert Key UI.

gzip -c example_events.json | curl --data-binary @- -X POST -H "Content-Type: application/json" -H "X-Insert-Key: CNGIWTii5MvU8MSGOK4Yqis0ZotmNEvK" -H "Content-Encoding: gzip"

(This API key has now been deleted, PLEASE DO NOT share API keys here in the Explorers Hub.)

Could you run a test with the same CURL command as you can find in the Insert API key page? (The URL will be something like:


I’d double check you have a pro subscription.


@6MM - I confirmed that the account ID listed here by does have a subscription supporting custom events. :slight_smile:


The issue was that the key I was using was incorrect. I don’t have access to the generation or update of these keys. I had someone create a new one and it worked. Thanks everyone for your help.


Fantastic! Thanks for letting us know you got this sorted out :slight_smile: