Skip to content
POST/api/v1/privacy/dsr

Create a Data Subject Request

Creates a Data Subject Request and computes its statutory deadline. Requires `orgId` (400 MISSING_ORG_ID), `request_type` from access|delete|correct|restrict|object|portability (400 INVALID_TYPE), and at least one of `subject_email` / `subject_id` (400 MISSING_SUBJECT). `legal_basis` defaults to `gdpr` and must be one of gdpr, uk_gdpr, ccpa, lgpd, india_dpdp, pipeda, ehds, other (400 INVALID_BASIS); it alone sets `due_at` — 30 days for GDPR/UK GDPR/DPDP/PIPEDA/EHDS/other, 45 for CCPA, 15 for LGPD. A single deadline is tracked; no separate acknowledgement clock exists. Optional `projectId`, `subject_name`, `notes`. Returns the created row (201) and fires any `dsr_received` auto-remediation playbooks. Requires the Team plan.

Authentication

Send Authorization: Bearer YOUR_API_KEY on every request. Generate API keys at /dashboard/settings/api-keys.

Response

200 example

{
  "success": true
}

All status codes

200DSR created.
201Created.
400(no description)
401(no description)
403Forbidden — the credential is valid but lacks the API-key scope, member role, or plan entitlement this operation requires.
409Conflict — CONFLICT.
429(no description)
500Internal Server Error — DB_ERROR.

Code samples

cURL

curl -X POST \
  https://evalguard.ai/api/v1/privacy/dsr \
  -H "Authorization: Bearer $EVALGUARD_API_KEY"

TypeScript

// The TypeScript SDK (@evalguard/sdk) exposes TYPED methods — runEval,
// getEval, runSecurityScan, checkFirewall, … — not a generic request().
// For an arbitrary endpoint, call it directly:

const res = await fetch("https://evalguard.ai/api/v1/privacy/dsr", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.EVALGUARD_API_KEY}` },
});
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:

import os
import requests

headers = {"Authorization": f"Bearer {os.environ['EVALGUARD_API_KEY']}"}

response = requests.request("POST", "https://evalguard.ai/api/v1/privacy/dsr", headers=headers)
print(response.status_code, response.json())

Go

package main

import (
	"context"
	"fmt"
	"net/http"
	"os"
)

func main() {
	req, _ := http.NewRequestWithContext(context.Background(), "POST", "https://evalguard.ai/api/v1/privacy/dsr", nil)
	req.Header.Set("Authorization", "Bearer "+os.Getenv("EVALGUARD_API_KEY"))
	resp, err := http.DefaultClient.Do(req)
	if err != nil { panic(err) }
	defer resp.Body.Close()
	fmt.Println(resp.Status)
}

Errors

400401403409429500

Other Compliance endpoints