DELETE
/api/v1/account/deletePermanently delete account (GDPR erasure)
Irreversible account deletion. Requires body {confirmation:'DELETE MY ACCOUNT'}. Flow: first call emails a confirmation token; re-send with the x-delete-confirmation-token header to verify, then a 24h grace period schedules deletion, and a final call after grace runs the atomic purge.
Authentication
Send Authorization: Bearer YOUR_API_KEY on every request. Generate API keys at /dashboard/settings/api-keys.
Parameters
x-delete-confirmation-token in headerEmailed confirmation token. Omit on the first call (token is sent to email); include it to confirm.
stringRequest body required
Example
{
"confirmation": "DELETE MY ACCOUNT"
}Schema
{
"application/json": {
"schema": {
"type": "object",
"required": [
"confirmation"
],
"properties": {
"confirmation": {
"type": "string",
"enum": [
"DELETE MY ACCOUNT"
],
"description": "Exact phrase required (400 CONFIRMATION_REQUIRED otherwise)."
}
}
}
}
}Response
200 example
{
"success": true
}All status codes
200Confirmation-token issued (requiresConfirmation:true) OR account permanently deleted.
202Deletion scheduled — 24h grace period.
400(no description)
401(no description)
403INVALID_TOKEN / TOKEN_EXPIRED.
429RateLimited or GRACE_PERIOD_ACTIVE (must wait for the 24h window).
500Internal Server Error — AUDIT_WRITE_FAILED, DELETE_AUTH_USER_FAILED, DELETE_RPC_FAILED, MISSING_ADMIN_CREDENTIALS.
Code samples
cURL
curl -X DELETE \
https://evalguard.ai/api/v1/account/delete \
-H "Authorization: Bearer $EVALGUARD_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "confirmation": "DELETE MY ACCOUNT" }'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/account/delete", {
method: "DELETE",
headers: {
Authorization: `Bearer ${process.env.EVALGUARD_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"confirmation": "DELETE MY ACCOUNT"
}),
});
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']}"}
headers["Content-Type"] = "application/json"
response = requests.request(
"DELETE",
"https://evalguard.ai/api/v1/account/delete",
headers=headers,
json={
"confirmation": "DELETE MY ACCOUNT"
},
)
print(response.status_code, response.json())Go
package main
import (
"context"
"fmt"
"net/http"
"os"
"strings"
)
func main() {
body := strings.NewReader(`{"confirmation":"DELETE MY ACCOUNT"}`)
req, _ := http.NewRequestWithContext(context.Background(), "DELETE", "https://evalguard.ai/api/v1/account/delete", 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)
}Errors
400401403429500