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

Create a Synthetic via API with emails attribute



I’m trying to create a Synthetic via API call, with an email attribute to receive alerts if the check fails.

I added the following to the payload for the cURL call documented here.

\"emails\" : [ "" ],

Which I thought would work because the emails attribute is supposedly supported per this.

But, no. “Monitor creation failed”

What am I missing? (The create call works fine without that field.)


Hi, @wyatt.andersen: The following curl command worked for me:

curl \
   -X POST -H 'X-Api-Key: MY_ADMIN_KEY' \
   -H 'Content-Type: application/json' \
   -d '{ "name" : "Test", "frequency" : 60, "uri" : "", "locations" : [ "AWS_US_WEST_1" ], "type" : "SIMPLE", "status" : "enabled", "slaThreshold" : "1.0", "emails" : [ "" ] }' 

Assuming you are using an admin API key, the only difference I see is that I did not escape the quotes around "emails".