Create Sub-Account (Supports API Key)
POST
/api/v1/create-account/sub-account
Creates a new sub-account with specified details (name, prefix, volume, plans, etc.).
🔑 Authentication
- Client Portal Context: Automatically authenticated via standard JWT Bearer token.
- External Integration Context: Supports authentication via API Key header:
X-API-Key: <your_api_key>.
🔄 Automatic Main Account Association
- The parent
mainAccountIdis optional and should normally be omitted. - The backend will automatically resolve the correct parent
mainAccountIdfrom the authenticated session context (API Key or JWT owner).
📋 Body Parameter Guide & Sourcing Dropdowns
To populate the body parameters, make queries to the following endpoints:
monthlyVolumeId: Fetch valid volume IDs fromGET /shared/dropdown/monthly-volumes(orGET /create-account/volume)industryTypeId: Fetch valid industry type IDs fromGET /shared/dropdown/industry-types(orGET /create-account/industry)serviceUsagePlanIds: Fetch valid usage plan IDs fromGET /shared/dropdown/service-usage-plans(orGET /create-account/service-usage-plans)marketAreaIds: Fetch valid market area IDs fromGET /shared/dropdown/market-areas(orGET /create-account/market-area)interestServiceIds/defaultShipmentServiceIds: Fetch valid shipment service IDs fromGET /shared/dropdown/shipment-services(orGET /create-account/shipment-services)
Request
Responses
200 OK
Sub-account created and initialized successfully
401 Unauthorized
Unauthorized - Invalid or missing credentials
409 Conflict
Conflict - Duplicate sub-account prefix or invalid input configuration