Skip to content
DELETE/api/v1/account/delete

Permanently 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/api-keys.

Parameters

x-delete-confirmation-token in header

Emailed confirmation token. Omit on the first call (token is sent to email); include it to confirm.

string

Request 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).

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

import { EvalGuard } from "@evalguard/sdk";

const client = new EvalGuard({ apiKey: process.env.EVALGUARD_API_KEY });

const response = await client.request({
  method: "DELETE",
  path: "/api/v1/account/delete",
  body: {
    "confirmation": "DELETE MY ACCOUNT"
  },
});
console.log(response);

Python

from evalguard import EvalGuard
import os

client = EvalGuard(api_key=os.environ["EVALGUARD_API_KEY"])

response = client.request(
    method="DELETE",
    path="/api/v1/account/delete",
    body={
    "confirmation": "DELETE MY ACCOUNT"
},
)
print(response)

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

400401403429

Other Compliance endpoints