/api/v1/privacy/dsr/{id}/items/{itemId}/actionTake action on DSR item
IRREVERSIBLY fulfils one DSR item — it mutates the underlying resource, it does not merely record intent. `action` (defaults to delete when omitted): `delete` removes the row from its source table (traces, eval_runs, security_scans, prompts, datasets, audit_logs); `redact` overwrites that resource type's PII string columns with a `[REDACTED via DSR ...]` sentinel and strips PII keys out of its JSONB columns (400 REDACT_UNSUPPORTED for a type with no redaction map); `export` stamps the item as exported for an access request; `skip` records that it was passed over. ORG-ADMIN ONLY. The item must belong to the DSR named in the path, and the DSR's org gates the caller. Every call stamps `action_taken`/`acted_at` on the item and writes an `audit_logs` row carrying the DSR id, request type, legal basis and SHA-256 hashes (never plaintext) of the subject's email/id, so a regulator can verify without the PII being reintroduced. Returns { item_id, action, result }.
Authentication
Send Authorization: Bearer YOUR_API_KEY on every request. Generate API keys at /dashboard/settings/api-keys.
Parameters
id in pathrequiredstringitemId in pathrequiredstringRequest body required
Example
{
"action": "delete",
"notes": "string"
}Schema
{
"application/json": {
"schema": {
"type": "object",
"required": [
"action"
],
"properties": {
"action": {
"type": "string",
"enum": [
"delete",
"redact",
"export",
"ignore",
"escalate"
]
},
"notes": {
"type": "string"
}
}
}
}
}Response
200 example
{
"success": true
}All status codes
Code samples
cURL
# {id}, {itemId} are shown with EXAMPLE values — replace them with real values.
curl -X POST \
https://evalguard.ai/api/v1/privacy/dsr/00000000-0000-0000-0000-000000000000/items/00000000-0000-0000-0000-000000000000/action \
-H "Authorization: Bearer $EVALGUARD_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "action": "delete", "notes": "string" }'TypeScript
// The TypeScript SDK (@evalguard/sdk) exposes TYPED methods — runEval,
// getEval, runSecurityScan, checkFirewall, … — not a generic request().
// For an arbitrary endpoint, call it directly:
// {id}, {itemId} are shown with EXAMPLE values — replace them with real values.
const res = await fetch("https://evalguard.ai/api/v1/privacy/dsr/00000000-0000-0000-0000-000000000000/items/00000000-0000-0000-0000-000000000000/action", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.EVALGUARD_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"action": "delete",
"notes": "string"
}),
});
console.log(res.status, await res.json());Python
# The Python SDK (pip install evalguardai) exposes TYPED methods on
# EvalGuardClient — run_eval, get_eval, … — not a generic request().
# For an arbitrary endpoint, call it directly:
# {id}, {itemId} are shown with EXAMPLE values — replace them with real values.
import os
import requests
headers = {"Authorization": f"Bearer {os.environ['EVALGUARD_API_KEY']}"}
headers["Content-Type"] = "application/json"
response = requests.request(
"POST",
"https://evalguard.ai/api/v1/privacy/dsr/00000000-0000-0000-0000-000000000000/items/00000000-0000-0000-0000-000000000000/action",
headers=headers,
json={
"action": "delete",
"notes": "string"
},
)
print(response.status_code, response.json())Go
package main
import (
"context"
"fmt"
"net/http"
"os"
"strings"
)
// {id}, {itemId} are shown with EXAMPLE values — replace them with real values.
func main() {
body := strings.NewReader(`{"action":"delete","notes":"string"}`)
req, _ := http.NewRequestWithContext(context.Background(), "POST", "https://evalguard.ai/api/v1/privacy/dsr/00000000-0000-0000-0000-000000000000/items/00000000-0000-0000-0000-000000000000/action", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("EVALGUARD_API_KEY"))
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer resp.Body.Close()
fmt.Println(resp.Status)
}