-
I noticed that if I activate alerts on a docket through the API, then go onto the webpage and manually disable the alerts by hitting the button, and then send the request again to activate it again, I get this error:
which seems to be the same error I get if I try to activate an alert through the API on a docket I already have alerts turned on for. I've confirmed this on multiple dockets. If I activate alerts via API, and then manually disable them, all subsequent attempts to activate the alert are treated as if the alert is already activated, even though it is not listed as activated on the docket page or on the list of docket alerts in my profile. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi, thanks for the question. This is how the API is designed to work. In the examples here: https://www.courtlistener.com/help/api/rest/v4/alerts/ You can see that each alert has an What's happening is that you're trying to create a new alert object for a docket-user pair when you already have one. You think you deleted it because you unsubscribed from the case, but in reality, you set the type to "unsubscription" instead of "subscription". The fix is to either delete alerts fully using the API before recreating them or use an HTTP |
Beta Was this translation helpful? Give feedback.
Hi, thanks for the question. This is how the API is designed to work. In the examples here:
https://www.courtlistener.com/help/api/rest/v4/alerts/
You can see that each alert has an
alert_type
field, which can besubscription
orunsubscription
.What's happening is that you're trying to create a new alert object for a docket-user pair when you already have one. You think you deleted it because you unsubscribed from the case, but in reality, you set the type to "unsubscription" instead of "subscription".
The fix is to either delete alerts fully using the API before recreating them or use an HTTP
PATCH
request to update the existing alert from "unsubscription" to "subscription".