Skip to main content
POST

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Compliance link generation parameters. Exactly one of userId or userType must be provided.

Compliance link generation parameters. Exactly one of userId or userType must be provided. When userType is supplied without userId, a new user of that type is created and associated with the link.

userId
string
required

Public ID of an existing user (prefixed with usr_). Provide this OR userType, not both.

Example:

"usr_3Kf9dQ2mNpXwZ7bV1aLcs"

userType
enum<string>
required

Type of user to create the compliance link for. Provide this OR userId, not both.

Available options:
INDIVIDUAL,
BUSINESS,
individual,
business
Example:

"INDIVIDUAL"

requestId
string<uuid>

Optional idempotency identifier for the link generation request.

Example:

"f47ac10b-58cc-4372-a567-0e02b2c3d479"

redirectUrl
string<uri>

URL the user is redirected to after completing the compliance flow.

Example:

"https://app.example.com/onboarding/complete"

recipientEmail
string<email>

If provided, the compliance link is emailed to this address.

Example:

"jane.doe@example.com"

templateId
string<uuid>

Optional terms-of-service template ID to brand the compliance flow.

Example:

"a1b2c3d4-e5f6-4789-a012-3456789abcde"

isInitialOnboarding
boolean

Marks this as the initial onboarding link for the client's own entity. Extends link expiry and forces a business user type.

Example:

false

Response

Compliance link generated successfully.

A compliance link.

id
string

Public ID of the compliance link (prefixed with cl_).

Example:

"cl_3Kf9dQ2mNpXwZ7bV1aLcs"

userId
string

Public ID of the user this link belongs to (prefixed with usr_).

Example:

"usr_3Kf9dQ2mNpXwZ7bV1aLcs"

userType
enum<string>
Available options:
INDIVIDUAL,
BUSINESS,
individual,
business
Example:

"INDIVIDUAL"

url
string | null

Hosted compliance link URL. Returned when generating a link; null when retrieving an existing link.

Example:

"https://dashboard.example.com/sandbox/compliance-link?complianceLinkId=cl_3Kf9dQ2mNpXwZ7bV1aLcs&sessionToken=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."

sessionToken
string

Session token authorizing the hosted compliance flow.

Example:

"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."

template
object | null

Branding and legal template applied to the compliance flow. Populated when retrieving a compliance link; null when generating one.