# Create Portfolio

Canonical: https://docs.bluehola.com/docs/assets-phone-numbers/post-v1-business-portfolios
OpenAPI: https://docs.bluehola.com/openapi.yaml

<div class="endpoint"><span class="endpoint-method endpoint-method--post">POST</span><code class="endpoint-path">/v1/business-portfolios</code></div>

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

:::note[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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `customerEntityId` | string | Conditional | Customer Keys may omit it; when supplied, it must be their own `cust_...`. Other API Keys must supply an accessible customer entity. |
| `name` | string | Yes | Business Portfolio name. |
| `metaBmId` | string | No | Numeric Meta Business Portfolio ID. Customer Keys must omit this field; authorization binds it later. |

```bash
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

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

Use `id` as `portfolioId` when [creating an invitation](../onboarding/post-v1-onboarding-invitations.md) or [submitting a Meta authorization result](../onboarding/post-v1-onboarding-embedded-signup.md). 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](../guides/customer-onboarding.md) for the complete self-service flow and [Error Codes](../guides/error-codes.md) for common errors.
