Skip to main content

Data Retention

TrustGate enforces data retention policies to comply with AML regulations and GDPR storage limitation principles. Retention periods are determined by applicant status and are enforced at the platform level.

Regulatory Requirements

Different regulations impose different retention requirements:

RegulationRequirementTypical Period
AML (US BSA)Customer records5 years after relationship ends
AML (EU AMLD)Customer records5 years after relationship ends
GDPRPersonal dataMinimum necessary
SOXFinancial records7 years
MiFID IIClient records5-7 years

Data Minimization

GDPR requires that personal data is not kept longer than necessary. TrustGate balances:

  • Regulatory minimums -- Must retain for AML/KYC compliance
  • GDPR storage limitation -- Article 5(1)(e) requires deletion when no longer needed
  • Legal hold overrides -- Court orders and investigations take precedence

Retention Policies

Retention periods are defined by applicant status and enforced by the platform. These policies are not configurable via API -- they are set at the platform level to ensure regulatory compliance.

Applicant StatusRetention PeriodRationale
approved5 yearsStandard KYC retention
rejected5 yearsAML requirement for rejected applicants
flagged7 yearsExtended retention for confirmed screening hits
pending90 daysIncomplete applications
in_progress90 daysStuck applications
review6 monthsApplications awaiting review
withdrawn30 daysUser-cancelled applications

Retention is calculated from the applicant's updated_at timestamp. If an applicant has no explicit retention expiry set, the platform calculates it from the last update date plus the retention period for that status.

The default retention period for any unrecognized status is 5 years.

GDPR Articles Referenced

ArticleScope
5(1)(e)Storage limitation principle
17Right to erasure (right to be forgotten)
17(3)(b)Exception: legal claims
17(3)(e)Exception: legal obligations (AML requirements)

Data Categories

Personal Information

CategoryRetentionNotes
Name, DOB, addressFollows applicant statusAML requirement for approved/rejected
Email, phoneFollows applicant statusContact for reviews
NationalityFollows applicant statusRisk assessment

Documents

CategoryRetentionNotes
Document imagesFollows applicant statusEvidence of verification
Extracted dataFollows applicant statusVerification record
Document metadataFollows applicant statusAudit trail

Biometrics

CategoryRetentionNotes
Selfie images30 daysDelete after verification
Face embeddings30 daysNot needed long-term
Liveness data7 daysImmediate verification only

Verification Results

CategoryRetentionNotes
Verification statusFollows applicant statusCompliance record
Check resultsFollows applicant statusDecision basis
Risk scoresFollows applicant statusRisk assessment record

Screening Data

CategoryRetentionNotes
Screening resultsFollows applicant statusAML compliance
Hit recordsFollows applicant statusInvestigation evidence
Resolution notesFollows applicant statusDecision documentation

Retention Expiry Detection

The retention service provides two query functions for identifying applicants based on their retention status:

  • Expired applicants -- Records that have exceeded their retention period and are eligible for deletion (excluding those under legal hold)
  • Expiring soon -- Records approaching their retention expiry within a configurable warning window (default: 30 days)
note

These functions are implemented in the retention service but are not yet wired to scheduled background tasks. Automated retention cleanup is planned for a future release. Currently, data deletion is performed via the GDPR delete endpoint on a per-applicant basis.

How Auto-Deletion Will Work

+----------------------------------------------------------+
| RETENTION POLICY CHECK |
| Runs on a scheduled interval |
+----------------------------+-----------------------------+
|
v
+----------------------------------------------------------+
| IDENTIFY EXPIRED RECORDS |
| Records past retention period with no legal hold |
+----------------------------+-----------------------------+
|
v
+----------------------------------------------------------+
| NOTIFY BEFORE DELETION |
| Alert compliance team of upcoming deletions |
+----------------------------+-----------------------------+
|
v
+----------------------------------------------------------+
| EXECUTE DELETION |
| Permanently remove data, create audit log |
+----------------------------------------------------------+

GDPR Deletion (Right to Erasure)

TrustGate provides a GDPR Article 17 deletion endpoint that permanently and irreversibly deletes an applicant and all associated data.

Delete an Applicant

DELETE /api/v1/applicants/{applicant_id}/gdpr-delete?confirmation=CONFIRM_DELETE&reason=data_subject_request
curl -X DELETE "https://api.bytrustgate.com/api/v1/applicants/{applicant_id}/gdpr-delete?confirmation=CONFIRM_DELETE&reason=data_subject_request" \
-H "Authorization: Bearer YOUR_API_KEY"

Query parameters:

ParameterRequiredDescription
confirmationYesMust be exactly CONFIRM_DELETE
reasonYesReason for deletion (e.g., data_subject_request, retention_cleanup)

Required permission: delete:applicants

Response

{
"status": "deleted",
"applicant_id": "550e8400-e29b-41d4-a716-446655440000",
"deleted_at": "2026-02-04T14:30:00.000000",
"deleted_data": [
"documents (3)",
"screening_checks (2)",
"cases (1)",
"applicant_record"
]
}

Deletion Safeguards

The GDPR delete endpoint enforces multiple safeguards before proceeding:

  1. Confirmation string -- The confirmation query parameter must be exactly CONFIRM_DELETE. Any other value returns 400 Bad Request.

  2. Legal hold check -- If the applicant is under legal hold, deletion is blocked with 409 Conflict. The legal hold must be removed first.

  3. AML retention check -- Flagged and rejected applicants cannot be deleted until their AML retention period has elapsed:

    • Flagged: 5 years minimum (checked against retention_expires_at or updated_at)
    • Rejected: 5 years minimum (same check)
  4. Tenant isolation -- The applicant must belong to the authenticated user's tenant.

Cascading Deletion

When an applicant is deleted, the following associated records are permanently removed:

Data TypeHow Deleted
DocumentsExplicitly deleted (including storage references)
Screening checksExplicitly deleted (cascade deletes hits)
CasesExplicitly deleted
Applicant recordDeleted last
Audit logCreated before deletion to preserve the record of the action

Error Responses

Status CodeCondition
400Missing or incorrect confirmation string
404Applicant not found (or not in your tenant)
409Applicant under legal hold, or AML retention period not yet elapsed

Legal holds prevent any deletion of an applicant's data, including GDPR erasure requests and automated retention cleanup. Use legal holds for pending litigation, regulatory investigations, or law enforcement requests.

POST /api/v1/applicants/{applicant_id}/legal-hold
curl -X POST "https://api.bytrustgate.com/api/v1/applicants/{applicant_id}/legal-hold" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"reason": "litigation_hold"
}'

Request body:

FieldTypeRequiredDescription
reasonstringYesReason for the legal hold (1-500 characters)

Required permission: admin:applicants

Response:

{
"status": "legal_hold_set",
"legal_hold": true,
"legal_hold_reason": "litigation_hold",
"legal_hold_set_at": "2026-02-04T14:30:00.000000",
"applicant_id": "550e8400-e29b-41d4-a716-446655440000"
}

Returns 400 if the applicant is already under legal hold.

DELETE /api/v1/applicants/{applicant_id}/legal-hold
curl -X DELETE "https://api.bytrustgate.com/api/v1/applicants/{applicant_id}/legal-hold" \
-H "Authorization: Bearer YOUR_API_KEY"

Required permission: admin:applicants

Response:

{
"status": "legal_hold_removed",
"legal_hold": false,
"legal_hold_reason": null,
"legal_hold_set_at": null,
"applicant_id": "550e8400-e29b-41d4-a716-446655440000"
}

Returns 400 if the applicant is not under legal hold.

When an applicant is under legal hold:

  • GDPR deletion requests return 409 Conflict
  • The applicant is excluded from expired-record queries (future automated cleanup)
  • Manual deletion is blocked

Audit Trail

All legal hold operations are recorded in the audit log:

  • Hold applied: Records who set the hold, the reason, and when
  • Hold removed: Records who removed the hold, the previous reason, and when

Best Practices

  1. Respond to GDPR erasure requests promptly -- Article 17 requires action "without undue delay" (within one month). Use the GDPR delete endpoint after verifying the request is legitimate and no AML exception applies.

  2. Apply legal holds proactively -- When you receive notice of litigation or an investigation, immediately apply legal holds to all relevant applicants before any automated or manual deletion can occur.

  3. Document your retention rationale -- Use meaningful reason strings in deletion and legal hold requests. These are preserved in the audit log for compliance reviews.

  4. Monitor AML retention boundaries -- Flagged and rejected applicants have mandatory 5-7 year retention periods. The platform enforces this, but your compliance team should be aware of when records become eligible for deletion.

  5. Keep audit logs separate -- Audit logs of deletion actions are retained independently of the deleted applicant data, ensuring you can demonstrate compliance even after records are purged.


Next Steps