Docs·Notifications
DELETE
/api/v1/spreelytics/notification-rules/:ruleIdDelete a notification rule
Deletes a notification rule for good, but not the notifications it already wrote. Those stay, still carrying its name, and their ruleId becomes null. This cannot be undone.
It answers 404 when the id is not a rule in this audience. Needs the Editor or Admin role in the workspace that owns the audience. A Viewer gets 403.
Keys: an account key. Getting started explains both kinds.
Parameters
| Prop | In | Type | Notes |
|---|---|---|---|
ruleId | path | string | The rule id. |
contactListId | query | string | The audience id, a UUID. With an audience key it must be that key's own audience. |
Response
204 with an empty body.
Request
curl -X DELETE 'https://app.spreelytics.com/api/v1/spreelytics/notification-rules/:ruleId?contactListId=…' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{ … }'
const res = await fetch('https://app.spreelytics.com/api/v1/spreelytics/notification-rules/:ruleId', {
method: 'DELETE',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({ /* see Request body above */ }),
});
const data = await res.json();
import requests
res = requests.delete(
"https://app.spreelytics.com/api/v1/spreelytics/notification-rules/:ruleId",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={}, # see Request body above
)
data = res.json()