Skip to content

Error when re-activating a docket alert via the API #4859

Answered by mlissner
HPK-MrJJ asked this question in Q&A
Discussion options

You must be logged in to vote

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 be subscription or unsubscription.

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".

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@HPK-MrJJ
Comment options

Answer selected by HPK-MrJJ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #4858 on December 30, 2024 03:03.