Create a B2B user

Creates a new B2B organisation user account and automatically sets up a default tree template.

If password is not provided, an 8-character random password is generated and returned in the response.

Authentication

AuthorizationBearer

Bearer token required for all User API endpoints. Routes are additionally guarded by an active middleware (account must be active).

Request

This endpoint expects an object.
namestringRequired
Organisation display name.
emailstringRequiredformat: "email"
Must be unique across all users.
responsible_namestringRequired
Name of the person responsible for the organisation.
passwordstringOptional>=6 characters

Account password. A random 8-character password is generated and returned in the response if this field is omitted.

languageenumOptional
Preferred locale for the new account.
organization_websitestringOptional

Organisation website. http:// is automatically prepended if no scheme is present.

Response

User creation result. Check status field — HTTP 200 is returned even for business-logic errors.

statusenum
user_idinteger
ID of the newly created user.
passwordstring

The account password (provided or auto-generated).

slugstring
URL slug for the user's public forest page.
forest_urlstringformat: "uri"
Full URL to the user's forest profile.
errorCodeenum or null
errorMessagestring or null

Errors

401
Unauthorized Error
403
Forbidden Error