Create a new consent set during user onboarding before a userId exists
Documentation Index
Fetch the complete documentation index at: https://docs.baanx.com/llms.txt
Use this file to discover all available pages before exploring further.
onboardingId from the registration flow. This endpoint is typically called after personal details submission and before address submission during the registration flow.
| Header | Required | Description |
|---|---|---|
x-client-key | ✅ | Your public API key |
x-secret-key | ✅ | Your secret API key (keep secure) |
Content-Type | ✅ | Must be application/json |
x-us-env | ❌ | Set to true for US region routing |
| Parameter | Type | Required | Description |
|---|---|---|---|
onboardingId | string | ✅ | Unique temporary identifier for this onboarding session |
tenantId | string | ✅ | Your tenant identifier (provided by Baanx) |
policyType | string | ✅ | Policy type: global or US |
consents | array | ✅ | Array of consent items to record (min 1 item) |
metadata | object | ❌ | Additional metadata about the consent capture session |
| Field | Type | Required | Description |
|---|---|---|---|
consentType | string | ✅ | Type of consent (see Consent Types) |
consentStatus | string | ✅ | Status: granted or denied |
metadata | object | ❌ | Additional context for this specific consent |
| Type | Description | Required In |
|---|---|---|
eSignAct | Electronic signature agreement (E-Sign Act compliance) | US policy only |
termsAndPrivacy | Terms of service and privacy policy | All policies |
marketingNotifications | Marketing communications opt-in | All policies |
smsNotifications | SMS/text message notifications | All policies |
emailNotifications | Email notifications | All policies |
| Field | Type | Description |
|---|---|---|
ipAddress | string | User’s IP address at time of consent |
userAgent | string | Browser/device user agent string |
timestamp | string | ISO 8601 timestamp when consent was captured |
clientId | string | Client application identifier |
version | string | API or app version |
metadata. All fields must be JSON-serializable.| Field | Type | Description |
|---|---|---|
consentSetId | string (UUID) | Generated unique identifier for this consent set |
onboardingId | string | Your provided onboarding identifier |
tenantId | string | Your tenant identifier |
createdAt | string (ISO 8601) | Timestamp when consent set was created |
_links | object | HATEOAS links for related resources |
consentSetId: You’ll need this to link the user after account creation completes.eSignAct for E-Sign Act compliance)eSignAct)onboardingId has already been used.
Solution: Generate a new unique onboardingId and retry.
x-client-key header.
Onboarding ID Requirements
onboardingId from registration email verificationPOST /v1/auth/register/email/verify100a99cf-f4d3-4fa1-9be9-2e9828b20ebb)Policy Type Requirements
eSignAct (required for E-Sign Act compliance)termsAndPrivacymarketingNotificationssmsNotificationsemailNotificationseSignAct):termsAndPrivacymarketingNotificationssmsNotificationsemailNotificationsConsent Status Values
granted: User has provided consentdenied: User has explicitly refused consentgranted and denied are acceptable. However, if required consents are denied, the user’s overall consent status will be incomplete.Metadata Best Practices
consentSetId: You’ll need it to link the user later