Seed Firm Owner
Admin-only endpoint for creating a firm and assigning its owner.
Use this to bootstrap the first firm in an invite-only environment, or to create another firm for an existing owner account. A user can own multiple firms.
Configure ADMIN_SEED_KEY in the backend environment before starting the
API. In Swagger, provide that same value in the x-admin-seed-key header
field.
If owner_email already exists, that user becomes the owner of the new firm
and owner_password is ignored. If owner_email does not exist,
owner_password is required so the owner account can be created.
Headers:
x-admin-seed-key(string) — value ofADMIN_SEED_KEY
Required fields:
firm_name(string)firm_slug(string) — lowercase letters/digits with hyphensowner_email(string)
Optional fields:
owner_name(string | null)owner_password(string | null) — required only whenowner_emailis new
Response:
owner(object)id(int)name(string | null)email(string)
firm(object)id(int)name(string)slug(string)owner_user_id(int)
membership(object)id(int)firm_id(int)user_id(int)role(string) —owner
Errors:
- 401: Invalid admin seed key
- 409: Firm slug already exists
- 422: Validation error or missing
owner_passwordfor a new owner - 500:
ADMIN_SEED_KEYis not configured
Headers
x-admin-seed-key
Value of ADMIN_SEED_KEY from the server environment.
Request
This endpoint expects an object.
firm_name
firm_slug
owner_email
owner_name
owner_password
Response
Successful Response
data
status
Errors
422
Unprocessable Entity Error
