Skip to main content

Consent Management

TrustGate helps you record and track consent for data processing activities, ensuring compliance with GDPR Articles 6 and 7.

KYC/AML Processing

For mandatory compliance activities, consent is typically NOT the appropriate legal basis:

ActivityLawful BasisWhy Not Consent
Identity verificationLegal obligationRequired by AML law
Sanctions screeningLegal obligationRequired by sanctions law
Document collectionLegal obligationRequired for KYC

Optional Processing

Consent IS appropriate for optional activities:

ActivityRequires Consent
Marketing communicationsYes
Optional biometric featuresYes
Data sharing with third partiesYes (if not required)
Analytics beyond complianceYes
TypeDescriptionRequired
terms_of_serviceAgreement to termsYes
privacy_policyAcknowledgment of privacy policyYes
biometric_verificationFace matching consentJurisdiction-dependent
data_sharingThird-party data sharingIf applicable
marketingMarketing communicationsNo
ongoing_monitoringContinuous screeningJurisdiction-dependent

TrustGate provides a single endpoint for both granting and withdrawing consent. Consent is recorded at the applicant level.

API Endpoint

POST /api/v1/applicants/{applicant_id}/consent
curl -X POST https://api.bytrustgate.com/api/v1/applicants/550e8400-e29b-41d4-a716-446655440000/consent \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"consent": true,
"purpose": "Identity verification and KYC processing"
}'

Use the same endpoint with consent: false:

curl -X POST https://api.bytrustgate.com/api/v1/applicants/550e8400-e29b-41d4-a716-446655440000/consent \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"consent": false,
"purpose": "User requested withdrawal"
}'

Request Body

FieldTypeRequiredDescription
consentbooleanYestrue to grant consent, false to withdraw
purposestringNoPurpose of data processing (max 500 characters)

Response

{
"status": "consent_recorded",
"consent_given": true,
"consent_given_at": "2026-01-20T14:30:00Z",
"applicant_id": "550e8400-e29b-41d4-a716-446655440000"
}
FieldTypeDescription
statusstringAlways "consent_recorded"
consent_givenbooleanCurrent consent state
consent_given_atdatetime or nullWhen consent was last granted (null if withdrawn)
applicant_idUUIDThe applicant's ID

Consent is tracked directly on the Applicant model with the following fields:

FieldTypeDescription
consent_givenbooleanWhether consent is currently active (default: false)
consent_given_atdatetime or nullTimestamp when consent was last granted
consent_ip_addressstring(45) or nullIP address of the client when consent was recorded (supports IPv4 and IPv6)
consent_withdrawn_atdatetime or nullTimestamp when consent was last withdrawn

When consent: true is submitted:

  • consent_given is set to true
  • consent_given_at is set to the current timestamp
  • consent_ip_address is captured from the request
  • consent_withdrawn_at is cleared (set to null)

When consent: false is submitted:

  • consent_given is set to false
  • consent_withdrawn_at is set to the current timestamp
  • consent_given_at is preserved for audit purposes

SDK Workflow Integration

The TrustGate SDK includes consent as the default first step in the verification workflow. When an applicant begins a verification session, they are presented with a consent step before any identity checks begin.

The default SDK workflow step:

{
"name": "consent",
"title": "Data Processing Consent",
"description": "We need your consent to process your personal data for identity verification.",
"required": true
}

When the consent step is completed through the SDK, the applicant's consent_given and consent_given_at fields are automatically updated.

Audit Trail

Every consent action is recorded in the audit log via the audit_consent_recorded() function. This creates an immutable record that references GDPR Articles 6 and 7.

Audit Log Actions

ActionWhen
gdpr.consent_givenConsent is granted
gdpr.consent_withdrawnConsent is withdrawn

Audit Log Data

Each audit entry records:

  • The consent state (true or false)
  • The client IP address at the time of the action
  • The user who performed the action
  • GDPR article references (6 and 7)
  • Resource type (applicant) and the applicant ID

Different jurisdictions have varying requirements for when explicit consent is needed:

JurisdictionKey Requirements
EU (GDPR)Explicit consent for biometrics; must be freely given, specific, informed, and unambiguous
US - Illinois (BIPA)Written consent required before collecting biometric identifiers
US - DefaultPrivacy policy acknowledgment typically sufficient for KYC
UK (UK GDPR)Similar to EU GDPR; explicit consent for special category data
Canada (PIPEDA)Meaningful consent; must understand what they are consenting to

For GDPR compliance, consent must meet four criteria as enforced by the API:

  1. Freely given -- not bundled with other agreements
  2. Specific -- the purpose field should clearly describe what processing will occur
  3. Informed -- the applicant must understand what they are agreeing to
  4. Unambiguous -- recorded via an explicit affirmative action

Next Steps