Appearance
Litigation Holds
Preserve data for legal proceedings with automated litigation hold management.
Overview
A litigation hold (also called legal hold) is a directive to preserve all data potentially relevant to pending or anticipated litigation. GateFlow provides comprehensive tools to manage holds while maintaining normal operations.
Creating a Litigation Hold
Basic Hold Creation
python
from openai import OpenAI
client = OpenAI(
base_url="https://api.gateflow.ai/v1",
api_key="gw_prod_..."
)
# Create a litigation hold
hold = client.post(
"/compliance/litigation-holds",
json={
"name": "Smith v. Acme Corp",
"matter_id": "CASE-2026-001",
"description": "Employment dispute - preserve all HR and email records",
"legal_counsel": "outside_counsel@lawfirm.com",
"created_by": "legal@company.com",
"effective_date": "2026-02-17",
"scope": {
"date_range": {
"start": "2024-01-01",
"end": "2026-02-17"
},
"data_types": [
"documents",
"emails",
"chat_logs",
"audit_logs"
],
"keywords": [
"Smith",
"termination",
"performance review",
"HR complaint"
]
}
}
)
print(f"Hold ID: {hold['hold_id']}")
print(f"Status: {hold['status']}")cURL Example
bash
curl -X POST https://api.gateflow.ai/v1/compliance/litigation-holds \
-H "Authorization: Bearer gw_prod_..." \
-H "Content-Type: application/json" \
-d '{
"name": "Smith v. Acme Corp",
"matter_id": "CASE-2026-001",
"description": "Employment dispute",
"effective_date": "2026-02-17",
"scope": {
"date_range": {
"start": "2024-01-01",
"end": "2026-02-17"
}
}
}'Custodian Management
Add Custodians
Custodians are individuals whose data must be preserved:
python
# Add custodians to the hold
custodians = [
{
"user_id": "user_hr_manager",
"email": "hr_manager@company.com",
"name": "Jane Doe",
"department": "Human Resources",
"role": "HR Manager"
},
{
"user_id": "user_supervisor",
"email": "supervisor@company.com",
"name": "John Smith",
"department": "Operations",
"role": "Direct Supervisor"
}
]
for custodian in custodians:
response = client.post(
f"/compliance/litigation-holds/{hold_id}/custodians",
json=custodian
)
print(f"Added custodian: {custodian['name']}")Notify Custodians
python
# Send hold notifications
notification = client.post(
f"/compliance/litigation-holds/{hold_id}/notify",
json={
"template": "standard_hold_notice",
"include_acknowledgment": True,
"acknowledgment_deadline_days": 3,
"reminder_schedule": [1, 2, 3], # Days before deadline
"escalate_to": "legal@company.com"
}
)
print(f"Notifications sent: {notification['sent_count']}")
print(f"Acknowledgment deadline: {notification['deadline']}")Track Acknowledgments
python
# Check custodian acknowledgment status
status = client.get(
f"/compliance/litigation-holds/{hold_id}/custodians"
)
print("Custodian Status:")
for custodian in status["custodians"]:
ack_status = "✓" if custodian["acknowledged"] else "✗"
print(f" {ack_status} {custodian['name']}")
if custodian["acknowledged"]:
print(f" Acknowledged: {custodian['acknowledged_at']}")
else:
print(f" Reminders sent: {custodian['reminder_count']}")Data Preservation
Automatic Preservation Rules
python
# Configure preservation rules
rules = client.post(
f"/compliance/litigation-holds/{hold_id}/preservation-rules",
json={
"rules": [
{
"name": "prevent_deletion",
"action": "block_delete",
"scope": "all_held_data"
},
{
"name": "prevent_modification",
"action": "version_on_modify",
"scope": "documents"
},
{
"name": "capture_new_data",
"action": "auto_preserve",
"scope": {
"custodians": "all",
"data_types": ["emails", "documents"]
}
}
]
}
)Preservation Actions
| Action | Description | Use Case |
|---|---|---|
block_delete | Prevent deletion entirely | Critical evidence |
version_on_modify | Keep all versions | Document changes |
auto_preserve | Automatically capture new data | Ongoing matters |
snapshot | Create point-in-time copy | Initial preservation |
quarantine | Move to secure location | High-risk data |
Data Sources
python
# Identify and add data sources to hold
sources = client.post(
f"/compliance/litigation-holds/{hold_id}/data-sources",
json={
"sources": [
{
"type": "document_collection",
"collection": "hr_documents",
"filters": {
"custodian_id": {"$in": custodian_ids},
"created_at": {"$gte": "2024-01-01"}
}
},
{
"type": "vector_store",
"collection": "email_embeddings",
"filters": {
"metadata.sender": {"$in": custodian_emails}
}
},
{
"type": "audit_log",
"filters": {
"actor": {"$in": custodian_ids}
}
}
]
}
)
print(f"Data sources identified: {sources['source_count']}")
print(f"Documents preserved: {sources['document_count']}")
print(f"Total size: {sources['total_size_gb']} GB")Hold Status and Monitoring
Check Hold Status
python
# Get comprehensive hold status
status = client.get(
f"/compliance/litigation-holds/{hold_id}"
)
print(f"Hold: {status['name']}")
print(f"Status: {status['status']}")
print(f"Created: {status['created_at']}")
print(f"\nCustodians:")
print(f" Total: {status['custodian_count']}")
print(f" Acknowledged: {status['acknowledged_count']}")
print(f"\nPreserved Data:")
print(f" Documents: {status['preserved_documents']}")
print(f" Size: {status['preserved_size_gb']} GB")
print(f"\nCompliance:")
print(f" Violations: {status['violation_count']}")
print(f" Last audit: {status['last_audit_at']}")Monitor for Violations
python
# Get hold violations
violations = client.get(
f"/compliance/litigation-holds/{hold_id}/violations"
)
if violations["violations"]:
print("⚠️ HOLD VIOLATIONS DETECTED:")
for v in violations["violations"]:
print(f"\n Type: {v['type']}")
print(f" Severity: {v['severity']}")
print(f" Actor: {v['actor']}")
print(f" Action attempted: {v['action']}")
print(f" Timestamp: {v['timestamp']}")
print(f" Blocked: {v['was_blocked']}")
else:
print("✓ No violations detected")Violation Types
| Type | Description | Severity |
|---|---|---|
deletion_attempt | Attempt to delete held data | High |
modification_attempt | Attempt to modify without versioning | Medium |
access_denied | Unauthorized access attempt | Medium |
export_attempt | Attempt to export held data | Low |
acknowledgment_overdue | Custodian hasn't acknowledged | Low |
Search and Collection
Search Held Data
python
# Search within held data for discovery
results = client.post(
f"/compliance/litigation-holds/{hold_id}/search",
json={
"query": "performance improvement plan",
"filters": {
"custodian": "user_hr_manager",
"date_range": {
"start": "2025-06-01",
"end": "2025-12-31"
}
},
"limit": 100,
"include_highlights": True
}
)
print(f"Found {results['total_count']} documents")
for doc in results["documents"][:5]:
print(f"\n{doc['title']}")
print(f" Date: {doc['created_at']}")
print(f" Custodian: {doc['custodian']}")
print(f" Highlights: {doc['highlights'][:200]}...")Export for Production
python
# Export held data for legal production
export = client.post(
f"/compliance/litigation-holds/{hold_id}/export",
json={
"format": "load_file", # Standard legal format
"include": {
"documents": True,
"metadata": True,
"audit_trail": True
},
"bates_numbering": {
"prefix": "ACME",
"start": 1,
"padding": 8 # ACME00000001
},
"redactions": {
"apply_privilege_tags": True,
"redact_non_responsive": False
}
}
)
print(f"Export ID: {export['export_id']}")
print(f"Status: {export['status']}")
print(f"Estimated completion: {export['estimated_completion']}")Releasing a Hold
Partial Release
python
# Release specific custodians
release = client.post(
f"/compliance/litigation-holds/{hold_id}/release",
json={
"type": "partial",
"release_custodians": ["user_supervisor"],
"reason": "Custodian no longer relevant to matter",
"approved_by": "legal_counsel@lawfirm.com",
"effective_date": "2026-03-01"
}
)Full Release
python
# Release entire hold
release = client.post(
f"/compliance/litigation-holds/{hold_id}/release",
json={
"type": "full",
"reason": "Matter settled - all claims resolved",
"approved_by": "legal_counsel@lawfirm.com",
"settlement_date": "2026-06-15",
"retention_policy": {
"action": "apply_standard", # Resume normal retention
"grace_period_days": 30 # Wait before deletions
}
}
)
print(f"Hold released: {release['released_at']}")
print(f"Grace period ends: {release['grace_period_ends']}")Audit and Reporting
Generate Hold Report
python
# Generate comprehensive hold report
report = client.post(
f"/compliance/litigation-holds/{hold_id}/report",
json={
"format": "pdf",
"include": [
"hold_summary",
"custodian_list",
"acknowledgment_status",
"preserved_data_inventory",
"violation_log",
"access_log",
"timeline"
],
"date_range": {
"start": "2026-02-17",
"end": "2026-03-17"
}
}
)
print(f"Report URL: {report['download_url']}")Audit Trail
python
# Get hold audit trail
audit = client.get(
f"/compliance/litigation-holds/{hold_id}/audit-log",
params={
"limit": 100,
"event_types": [
"hold_created",
"custodian_added",
"data_preserved",
"violation_detected",
"search_performed"
]
}
)
for entry in audit["entries"]:
print(f"{entry['timestamp']}: {entry['event_type']}")
print(f" Actor: {entry['actor']}")
print(f" Details: {entry['details']}")Multiple Holds
Overlapping Holds
Data can be subject to multiple holds:
python
# Check all holds affecting a document
holds = client.get(
f"/data/documents/{document_id}/litigation-holds"
)
print(f"Document subject to {len(holds['holds'])} holds:")
for hold in holds["holds"]:
print(f" - {hold['name']} ({hold['matter_id']})")
print(f" Status: {hold['status']}")
print(f" Since: {hold['effective_date']}")Cross-Hold Search
python
# Search across all active holds
results = client.post(
"/compliance/litigation-holds/search",
json={
"query": "contract breach",
"holds": "all_active",
"group_by": "hold"
}
)Defensibility
Chain of Custody
python
# Get chain of custody for specific document
chain = client.get(
f"/data/documents/{document_id}/chain-of-custody"
)
print("Chain of Custody:")
for event in chain["events"]:
print(f"\n{event['timestamp']}")
print(f" Action: {event['action']}")
print(f" Actor: {event['actor']}")
print(f" Hash: {event['document_hash'][:16]}...")
print(f" Verified: {event['hash_verified']}")Preservation Certificate
python
# Generate preservation certificate
cert = client.post(
f"/compliance/litigation-holds/{hold_id}/certificate",
json={
"type": "preservation_certificate",
"include_hash_verification": True,
"notarize": True
}
)Best Practices
- Act quickly - Implement holds as soon as litigation is anticipated
- Over-preserve initially - Easier to release than to recover
- Document everything - Maintain detailed audit trails
- Train custodians - Ensure they understand obligations
- Monitor continuously - Watch for violations
- Review regularly - Update holds as matters evolve
- Release properly - Follow formal release procedures
Next Steps
- Legal Discovery - Discovery workflow
- Audit Trail - Compliance logging
- Compliance Regimes - Legal compliance