PUT
/watchlist/cases/{id}Update a watchlist case
Changes a case's riskLevel and/or status.
Overview
Changes a case's riskLevel and/or status. For example, change the status to stop tracking a case without fully archiving it, or correct a risk classification by hand.
Auth API keyContent-Type application/json
Send your API key in the
X-CasePrimus-Api-Key header. See Authentication for how to create a key, and Rate limits & errors for how requests are counted.Parameters
| Name | In | Description |
|---|---|---|
idstring Required | path | The id returned when the resource was created. |
Request body
| Field | Description |
|---|---|
riskLevelenum Optional | VERY_HIGHHIGHMODERATELOWUNCLASSIFIED |
statusenum Optional | ACTIVEPENDING_BACKOFFICE_REVIEWREJECTEDARCHIVED |
Body: Success
{
"riskLevel": "HIGH"
}Example request
Replace CASEPRIMUS_API_KEY with your key.
Request
BASE="https://api.caseprimus.ai/api/caseprimus/v1" curl -X PUT "$BASE/watchlist/cases/CASE_ID" \ -H "X-CasePrimus-Api-Key: $CASEPRIMUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "riskLevel": "HIGH" }'
const BASE = "https://api.caseprimus.ai/api/caseprimus/v1"; const res = await fetch(BASE + "/watchlist/cases/CASE_ID", { method: "PUT", headers: { "Content-Type": "application/json", "X-CasePrimus-Api-Key": process.env.CASEPRIMUS_API_KEY, }, body: JSON.stringify({ "riskLevel": "HIGH" }), }); const data = await res.json();
import os import requests BASE = "https://api.caseprimus.ai/api/caseprimus/v1" res = requests.request( "PUT", BASE + "/watchlist/cases/CASE_ID", headers={"X-CasePrimus-Api-Key": os.environ["CASEPRIMUS_API_KEY"]}, json={ "riskLevel": "HIGH", }, ) data = res.json()
Responses
200Case updated.
Response 200
{}400Case does not exist.
Response 400
{
"httpStatusCode": 400,
"code": 60401,
"message": "Watchlist case does not exist",
"appError": true
}403This case has not been shared with you.
Error responses share one shape, listed on Rate limits & errors.