POST
/
trpc
/
datasets.deleteUserVault
Delete User Vault
curl --request POST \
  --url https://api.kontext.dev/trpc/datasets.deleteUserVault \
  --header 'x-api-key: <x-api-key>'

Overview

  • Permanently deletes ALL vectors in a user’s namespace
  • Affects all user-anchored datasets for this user
  • Cannot be undone - namespace is completely cleared

Authentication

x-api-key
string
required
Your API key

Request (tRPC HTTP)

Body (JSON): { "input": { userId } }
  • userId (string, required)

Response (tRPC envelope)

200 OK
{
  "result": {
    "data": {
      "cleared": true,
      "namespace": "kontext.dev.{developerId}.user.{userId}"
    }
  }
}
Note: SDK and tRPC clients return the inner object directly (no wrapper).

Important Notes

⚠️ Destructive Operation: This completely wipes the user’s vector index
  • All semantic search capability for this user is lost
  • Dataset records remain in database (use datasets.delete to remove those)
  • User facts remain in database (not affected by this operation)
  • Use case: Compliance, user account deletion, namespace cleanup

Errors

  • 401 UNAUTHORIZED — Missing or invalid API key

Examples

curl -X POST https://api.kontext.dev/trpc/datasets.deleteUserVault \
  -H "x-api-key: ktext_abc123..." \
  -H "content-type: application/json" \
  -d '{
    "input": {
      "userId": "user_abc123"
    }
  }'
  • datasets.delete: Remove individual datasets with optional fact deletion
  • datasets.listByUser: Find all datasets for a user before vault deletion