Skip to main content

Generate a Customer Onboarding Link

POST/v1/onboarding/invitations

Generate a one-time onboarding link for a given customer and Business Portfolio. The plaintext URL is returned exactly once in this response (only a hash is stored) — send it to the customer right away.

Authentication

Send Authorization: Bearer <API_KEY> in the request headers, with scope onboarding:write. Which resources an API Key can reach is determined by its current authorization scope.

Request​

Base URL: https://api.bluehola.com

Request body​

A request body is required.

Request body fields​

FieldTypeRequiredDescription
tenantIdstringNoAn internal ownership field; omit it when the customer calls this
portfolioIdstringNoBlueHola internal ID (bm_...); a customer Key may use only its own customer’s Portfolio. Use exactly one of this and customerEntityId
customerEntityIdstringNoCustomer entity ID, cust_.... Use exactly one of this and portfolioId. When starting for a customer, no Business Portfolio is needed in advance: after the customer authorizes through the link, the Portfolio is found or created from the WABA owner; portfolioName is then empty in the response and on the landing page
expiresInSecondsnumberNo300 to 86400, defaults to 1800
modestringNosplbv, alipay or standard; defaults to splbv

Content-Type: application/json Example:

{
"customerEntityId": "cust_x",
"expiresInSeconds": 1800
}

Schema:

{
"type": "object",
"properties": {
"tenantId": {
"type": "string",
"description": "string · optional — an internal ownership field; omit it when the customer calls this"
},
"portfolioId": {
"type": "string",
"description": "BlueHola internal ID (bm_...); customer Keys may use only their own customer’s Portfolio. Use exactly one of this and customerEntityId"
},
"customerEntityId": {
"type": "string",
"description": "string · optional — customer entity ID, cust_.... Use exactly one of this and portfolioId. When starting for a customer, no Business Portfolio is needed in advance: after the customer authorizes through the link, the Portfolio is found or created from the WABA owner; portfolioName is then empty in the response and on the landing page"
},
"expiresInSeconds": {
"type": "integer",
"minimum": 300,
"maximum": 86400,
"default": 1800,
"description": "number · optional — 300 to 86400, defaults to 1800"
},
"mode": {
"type": "string",
"description": "splbv | alipay | standard; default splbv"
}
},
"required": [],
"example": {
"customerEntityId": "cust_x",
"expiresInSeconds": 1800
}
}

Response​

StatusDescription
201Created
4xxClient error

For the common error envelope and how to handle it, see Error Codes.

Notes​

Pass exactly one of customerEntityId or portfolioId; passing both or neither returns 400. customerEntityId is recommended: no Portfolio needs to exist beforehand. After the customer authorizes through the link, the Business Portfolio is found from the WABA's owner_business_info and reused or created, and portfolioName is empty in the creation response and on the landing page. The token itself is a base64url encoding of 32 random bytes (43 characters); only its SHA-256 hash is stored, and the plaintext appears exactly once, in this creation response — a lost token can only be regenerated. This is the same security model used for API Keys. The creator field is for audit purposes only and does not affect the customer-side flow.

mode chooses the verification flow: splbv (default), alipay, or standard. Alipay verification needs the company registration code, legal representative’s name and the representative’s own face verification, so use a customer self-service invitation. The server supplies the matching features for this invitation; pass them through unchanged. An omitted alipay_business_verification feature can silently skip that step. For Alipay, keep the default 30-minute link lifetime unless the customer needs a different window.

Customer Keys support this endpoint with onboarding:write. They may use only their own customer entity or their own Portfolios; anything else returns 403, and an ownership target outside the current BU returns 404. Omit tenantId. You can still create a Portfolio with only name and pass its returned id as portfolioId instead. The HTTP 201 response supplies url, expiresAt and status: pending; the hosted page submits the Meta result automatically. See Customer Onboarding.