POST /api/v2/accounts/create-child
Creates a new child customer account. If the current customer is standalone, this first converts it into a parent and creates the parent/child hierarchy. Requires ADMIN role.
Request
curl
Parameters
| Field | Type | Required | Notes |
|---|---|---|---|
name | string | Yes | Name for the new child account (1–255 chars) |
customerRole | enum | Yes | BUYER or SELLER |
parentName | string | No | Name for the parent created during standalone conversion (1–255). Defaults to "{company} (Admin)" |
customerDomain | string | No | Registered organization domain (max 255, valid hostname). For SELLER, also seeds the auto-created storefront’s publisher and operator domain |
Response
Returns the full user context scoped to the new child customer.| Field | Type | Notes |
|---|---|---|
user | object | User profile data |
customer | object | Customer context for the newly created child |
customers | array | All accessible customer accounts |
showTosBox | boolean | Whether to show the ToS acceptance dialog |
organizationContractMissing | boolean | true when the inherited organization has no active contract; block usage until an org admin accepts ToS |
hasContract | boolean | Whether the customer has an active contract |
latestTosVersion | string | Latest embedded sales agent version identifier |
convertedFromStandalone | boolean | true if the request triggered a standalone-to-parent conversion |
Errors
400 VALIDATION_ERROR— missing required field orcustomerDomainfails the hostname pattern.401 UNAUTHORIZED— missing or invalid bearer token.403 FORBIDDEN— caller is not anADMINon the current customer.
Related
Account tasks
All account operations
Delete child account
Remove a child customer
Update customer domain
Set the org domain