Create a new account (bundle_id=3) account under the authenticated partner together with its owner user/person, links an account-level plan, sends the owner a set-password welcome email, and (when with_location=1) auto-creates one location-account + store on that plan.
Auth: Partner — authentication under partner/account. The new account's parent is parent_company_id when supplied, otherwise the caller's own partner company (company bundle_id = 1). parent_company_id and plan_id are both validated against the auth partner: parent_company_id must pass an ownership check, and plan_id must exist in company_plans for the resolved partner company.
Rate limit: No rate limit.
Request
- Body (JSON):
| Field | Type | Required | Notes |
|---|---|---|---|
| name | string (max 100) | yes | No angle brackets. Account/company name. |
| website | string (url) | no | |
| billing_id | string (max 100) | no | No angle brackets. |
| client_account_id | string (max 100) | no | Partner-supplied external id. No angle brackets. |
| phone | string (9–15) | no | Business phone. |
| address | string (max 255) | yes | No angle brackets. |
| city_id | integer | yes | Must be an existing city. |
| companyindustry_id | integer | no | Must be an existing industry (active industries only). Optional industry tag; if the owning partner has an industry set it cascades and overrides this on save. |
| postal_code | string (3–12) | yes | No angle brackets. |
| first_name | string (max 100) | yes | Owner first name. |
| last_name | string (max 100) | no | Owner last name. |
| owner_email | email (rfc,dns) | yes | Unique across users. |
| owner_phone | string (9–15) | no | |
| password | string | yes | Min 8, max 100, mixed case + letters + numbers + symbol; no quotes/backslash/whitespace. |
| plan_id | integer | yes | Must exist in plans AND be assigned to the resolving partner via company_plans. |
| parent_company_id | integer | no | Must be a bundle_id 1/2/3 company belonging to the auth partner tree; defaults to the caller's partner company. |
| with_location | in:0,1 | no | When 1, auto-creates a default location + store on the chosen plan. |
Response — { data. } envelope.
status(string) —success.message(string) —Account has been created successfully!.accountId.label(string) — created account name.accountId.value(integer) — created account company id.
Errors: 422 on validation failure.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
