Delete a notification by id
1 min
DELETE
https://app.amberflo.io/customer-portal/notification/{notification_id}
Path Parameters
- notification_idstringrequired
Query Parameters
- sessionTokenstringrequiredDescription
Responses
200
- notification-response
- objectnotification-put-request
- idstringrequiredDescription
- namestringrequiredDescriptionDefaultToo many api calls
- descriptionstringDescriptionDefaultAlert on too many api calls
- notificationTypestring<usage | invoice | prepaid | product-item-units | product-item-price | undefined-meter | undefined-customer>Defaultusage
- meterIdstringDescriptionDefault24ad0b40-a217-11eb-b01a-19ff91d9370d
- cronstringDescription
- frequencystringDescriptionDefaultevery 1h
- webhookUrlstringDescriptionDefaulthttps://hooks.slack.com/services/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
- webhookHeadersstringDescription
- webhookPayloadstringDescription
- emailstring[]DescriptionDefault
- customSubjectstringDescription
- thresholdConditionstring<less-than | greater-than | equals | percent-change | always-true | less-than-percent | greater-than-percent>Defaultgreater-than
- thresholdValuenumberDescriptionDefault1000
- rangestring<hour | day | week | month>DescriptionDefaultday
- productPlanIdstringDescription
- enabledbooleanDescriptionDefaulttrue
- object
- createTimeintegerDescription
- updateTimeintegerDescription
curl
curl --request DELETE \
--url 'https://app.amberflo.io/customer-portal/notification/{notification_id}?sessionToken=string' \
--header 'accept: application/json'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var requestOptions = {
method: 'DELETE',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://app.amberflo.io/customer-portal/notification/{notification_id}?sessionToken=string", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://app.amberflo.io/customer-portal/notification/{notification_id}?sessionToken=string")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://app.amberflo.io/customer-portal/notification/{notification_id}?sessionToken=string"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("DELETE", url, headers=headers, data=payload)
print(response.text)
200
// Successful response
{
"id": "",
"name": "",
"description": "",
"notificationType": "",
"meterId": "",
"cron": "",
"frequency": "",
"webhookUrl": "",
"webhookHeaders": "",
"webhookPayload": "",
"email": [
""
],
"customSubject": "",
"thresholdCondition": "",
"thresholdValue": 0,
"range": "",
"productPlanId": "",
"enabled": false,
"createTime": 0,
"updateTime": 0
}