Create Onboarding Consent
Consent
Create Onboarding Consent
Create a new consent set during user onboarding before a userId exists
POST
Create Onboarding Consent
Overview
Creates a new consent set during user onboarding using theonboardingId from the registration flow. This endpoint is typically called after personal details submission and before address submission during the registration flow.
Use Cases
Mobile App Registration
Collect consent during mobile app onboarding flows
Web Registration
Capture consent on web registration forms
KYC Processes
Record consent during identity verification
Pre-Registration Consent
Collect consent before user account creation
Endpoint
Headers
Request Body
Parameters
Consent Item Structure
Consent Types
Metadata Fields (Optional)
Additional custom fields can be included in
metadata. All fields must be JSON-serializable.Examples
US Policy (All 5 Consents)
Global Policy (4 Consents, No eSignAct)
Response
201 Created
Success Response:Store the
consentSetId: You’ll need this to link the user after account creation completes.400 Bad Request - Missing Required Consents
- US Policy: All 5 types (including
eSignActfor E-Sign Act compliance) - Global Policy: 4 types (excludes
eSignAct)
400 Bad Request - Invalid Consent Type
409 Conflict - Duplicate Onboarding ID
onboardingId has already been used.
Solution: Generate a new unique onboardingId and retry.
498 Invalid Client Key
499 Missing Client Key
x-client-key header.
Validation Rules
Onboarding ID Requirements
Onboarding ID Requirements
- Must be the
onboardingIdfrom registration email verification - Do NOT generate a new ID - use the ID from
POST /v1/auth/register/email/verify - Format: UUID string (e.g.,
100a99cf-f4d3-4fa1-9be9-2e9828b20ebb)
Policy Type Requirements
Policy Type Requirements
US Policy requires all 5 consent types (E-Sign Act compliance):
eSignAct(required for E-Sign Act compliance)termsAndPrivacymarketingNotificationssmsNotificationsemailNotifications
eSignAct):termsAndPrivacymarketingNotificationssmsNotificationsemailNotifications
Consent Status Values
Consent Status Values
Only two status values are valid for creation:
granted: User has provided consentdenied: User has explicitly refused consent
Both
granted and denied are acceptable. However, if required consents are denied, the user’s overall consent status will be incomplete.Metadata Best Practices
Metadata Best Practices
Include these fields for comprehensive audit trails:All values must be JSON-serializable (no functions, circular references, or undefined).
Code Examples
TypeScript
Python
cURL
Next Steps
After creating the consent set:- Store the
consentSetId: You’ll need it to link the user later - Complete user registration: Finalize account creation in your system
- Link user to consent: Call Link User to Consent Set
Related Endpoints
Link User to Consent
Associate userId with consent set after registration
Get User Consent Status
Check user’s consent status
Get Consent Audit Trail
Retrieve complete consent change history
Implementation Guide
Full integration guide with examples