Skip to main content
POST
/
clear
Clear All Data
curl --request POST \
  --url https://memory.stru.ai/clear \
  --header 'X-API-Key: <x-api-key>'
{
  "message": "<string>"
}

Overview

Clear ALL data from the entire system. This deletes everything - all groups, episodes, facts, entities, and relationships.
EXTREMELY DESTRUCTIVE - NUCLEAR OPTION!This endpoint:
  • Deletes ALL data for ALL users
  • Is permanent and cannot be undone
  • Should ONLY be used in development/testing environments
  • Should NEVER be exposed in production applications

Authentication

X-API-Key
string
required
Your API key for authentication
X-API-Key: windowseat

Response

message
string
Confirmation message
"message": "All data cleared successfully"

Example Request

curl -X POST https://memory.stru.ai/clear \
  -H "X-API-Key: windowseat"

Example Response

{
  "message": "All data cleared successfully"
}

When to Use

Development/Testing Only

ONLY use in development or testing environments to reset the system state

Never in Production

Do NOT expose this endpoint in production applications - it will delete all user data

Safer Alternatives

Use DELETE /group/{group_id} to delete a specific user’s data
DELETE https://memory.stru.ai/group/user_oauth_sub
Use DELETE /episodes/{group_id}/{source_description} to delete a specific conversation
DELETE https://memory.stru.ai/episodes/user_oauth_sub/conv_12345
Use DELETE /episode/{uuid} to delete a specific episode
DELETE https://memory.stru.ai/episode/episode_uuid_123

Security Recommendations

Production Safety Measures:
  1. Remove or restrict access to this endpoint in production
  2. Implement additional authentication layers if needed
  3. Add confirmation mechanisms with multiple steps
  4. Log all attempts to call this endpoint
  5. Consider rate limiting or IP whitelisting