Skip to main content

Create Portfolio

POST/v1/business-portfolios

Create a BlueHola onboarding record; a customer Key automatically assigns it to its own customer entity.

Authentication

Send Authorization: Bearer <API_KEY>. A customer Key needs onboarding:write to create a record for its own customer entity.

Request​

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

Request body fields​

FieldTypeRequiredDescription
customerEntityIdstringConditionalCustomer Keys may omit it; when supplied, it must be their own cust_.... Other API Keys must supply an accessible customer entity.
namestringYesBusiness Portfolio name.
metaBmIdstringNoNumeric Meta Business Portfolio ID. Customer Keys must omit this field; authorization binds it later.
curl -X POST "https://api.bluehola.com/v1/business-portfolios" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"name": "Example Company"
}'

Response​

201 Created (excerpt)
{
"id": "bm_01923abc",
"name": "Example Company",
"customerEntityId": "cust_01923abc",
"metaBmId": null
}

Use id as portfolioId when creating an invitation or submitting a Meta authorization result. These routes require an existing local record; neither creates it implicitly.

Ownership and Meta binding​

A customer Key cannot choose another customer (403 TENANT_FORBIDDEN) or prefill metaBmId (400 VALIDATION_FAILED). The record starts with metaBmId: null. After Meta authorization, the backend verifies the WABA grant and binds the owner ID read from Meta. The internal bm_... ID and numeric Meta ID are different fields; creating this record alone does not create or authorize Meta assets.

For other API Keys, customerEntityId is required and must belong to the current authorization scope; metaBmId remains optional. See Customer Onboarding for the complete self-service flow and Error Codes for common errors.