How to retrieve a user keyword alert list

You can submit a keyword alert for a user by using the following URL and specifying the required parameters.

 

 Method URL
 GET  https://api.fairwarningsoftware.com/v1.1.1/user/alerts/

 

Request
{
        "user_id": <user_id>
}

 

 Field  Type Description
user_id int The ID of the user requesting the alert list.

 

If successful, a list of alerts will be returned.  If not, an error will be returned instead.

 Status Response
 200

{
    "alerts": [
        {
            "alert" : {
                "alert_id" : <alert_id>,
                "alert_active" : <alert_active>,
                "user_id" : <user_id>,
                "alert_keyword" : <alert_keyword>
            }
        },
        ...
    ]
}

401  {"error":"The API keys provided are invalid."}
403  {"error":"API keys are missing."}
500  {"error": <custom error>}

 

 Field  Type Description
alerts object An object containing an array of alerts.
    alert object An object containing details of an individual alert.
        alert_id int The ID of the keyword alert.
        alert_active bool Whether the alert is currently active.
        user_id int The ID of the user associated with the keyword alert.
        alert_keyword string The keyword(s) for the alert.