Consent Verification API
APIs for verifying customer consents through various methods including email resend, magic links, and token verification.
Base URL: https://sandbox.finhub.cloud/api/v2.1/consent/verification
Available Operations
Resend Verification
POST /resend
Send Magic Link
POST /send-magic-link
Verify Token
GET /verify/{token}
Resend Verification
Resends the consent verification email to the customer.
Request
Bearer token for authentication
Consent identifier to verify
Delivery channel: EMAIL, SMS (default: EMAIL)
Code Examples
curl -X POST "https://sandbox.finhub.cloud/api/v2.1/consent/verification/resend" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "X-Tenant-ID: YOUR_TENANT_ID" \
-H "Content-Type: application/json" \
-d '{
"customerId": "cust_12345",
"consentId": "cons_67890",
"channel": "EMAIL"
}'
{
"success": true,
"data": {
"customerId": "cust_12345",
"consentId": "cons_67890",
"channel": "EMAIL",
"sentAt": "2024-01-15T10:30:00Z",
"expiresAt": "2024-01-15T11:30:00Z"
}
}
Send Magic Link
Sends a magic link for one-click consent verification.
Request
Consent identifier to verify
URL to redirect after verification (must be whitelisted)
Link expiration time in minutes (default: 60, max: 1440)
Code Examples
curl -X POST "https://sandbox.finhub.cloud/api/v2.1/consent/verification/send-magic-link" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "X-Tenant-ID: YOUR_TENANT_ID" \
-H "Content-Type: application/json" \
-d '{
"customerId": "cust_12345",
"consentId": "cons_67890",
"redirectUrl": "https://your-app.com/consent-confirmed",
"expiresInMinutes": 60
}'
{
"success": true,
"data": {
"customerId": "cust_12345",
"consentId": "cons_67890",
"sentTo": "j***@example.com",
"sentAt": "2024-01-15T10:30:00Z",
"expiresAt": "2024-01-15T11:30:00Z"
}
}
Verify Token
Verifies a consent using the token from the verification email or magic link.
Request
Verification token from email or magic link
Code Examples
curl -X GET "https://sandbox.finhub.cloud/api/v2.1/consent/verification/verify/eyJhbGciOiJIUzI1NiIs..." \
-H "X-Tenant-ID: YOUR_TENANT_ID"
{
"success": true,
"data": {
"verified": true,
"customerId": "cust_12345",
"consentId": "cons_67890",
"consentType": "TERMS",
"verifiedAt": "2024-01-15T10:35:00Z",
"redirectUrl": "https://your-app.com/consent-confirmed"
}
}
Verification Flow
Request Verification
Call /resend or /send-magic-link to send verification to customer
Customer Clicks Link
Customer receives email and clicks the verification link
Token Validation
System validates the token via /verify/{token}
Consent Confirmed
Consent status updated to ACCEPTED and customer redirected
Delivery Channels
| Channel | Description |
|---|
EMAIL | Verification sent via email |
SMS | Verification sent via SMS (if enabled) |
Response Codes
| Code | Description |
|---|
200 | Operation successful |
400 | Invalid request data or token |
401 | Not Authorized |
403 | Not Allowed |
404 | Consent or customer not found |
410 | Token expired |
429 | Rate limit exceeded |
500 | Internal server error |