POST /api/v2/accounts/create-child
Creates a new account under your organization. If your account is still standalone, the call first converts it into an organization and nests the new account underneath. Requires the ADMIN role.
Request
Parameters
| Field | Type | Required | Notes |
|---|---|---|---|
name | string | Yes | Name for the new account (max 255) |
customerRole | enum | Yes | BUYER or SELLER |
parentName | string | No | Name for the organization created during standalone conversion. Defaults to "{company} (Admin)" |
customerDomain | string | No | Registered domain for the account. For SELLER accounts, also seeds the auto-created storefront’s publisher and operator domain. The storefront operator domain can later diverge from the account domain. |
defaultCurrency | string | Seller | Primary storefront settlement currency. Required when paymentCurrencies is non-empty. |
paymentCurrencies | string[] | No | Storefront settlement currencies. Include defaultCurrency; omit or pass [] to use only the primary currency. |
Response
| Field | Type | Notes |
|---|---|---|
user | object | Your user profile scoped to the new account |
customer | object | Context for the newly created account |
customers[] | array | All accounts you can now access |
showTosBox | boolean | Whether to surface the ToS acceptance dialog |
organizationContractMissing | boolean | True when the new account cannot operate because its organization has no active contract |
hasContract | boolean | Whether the account has an active contract |
latestTosVersion | string | Latest embedded sales agent version identifier |
convertedFromStandalone | boolean | True if the request triggered a standalone-to-organization conversion |
Errors
400 VALIDATION_ERROR— missingname/customerRole, or a malformedcustomerDomain.401 UNAUTHORIZED— caller is not anADMIN.
Related
Account tasks
All account operations
Delete account
Remove an empty account
List accounts
See the new account