Skip to content
Pre-release. HostCraft is in testing and not yet for sale. These docs describe the current build and may change. Join the waitlist to hear when it launches.

Account API

Source: daemon/proto/hostcraft/v1/account.proto

AccountService manages hosting accounts (the per-customer container for sites, mailboxes, databases and so on). REST: /api/v1/accounts.

Method REST route Permission Streaming
CreateAccount POST /api/v1/accounts AccountCreate unary
ListAccounts GET /api/v1/accounts AccountRead unary
GetAccount GET /api/v1/accounts/{id} AccountRead unary
UpdateAccount PATCH /api/v1/accounts/{id} AccountUpdate unary
SuspendAccount POST /api/v1/accounts/{id}/suspend AccountSuspend unary
UnsuspendAccount POST /api/v1/accounts/{id}/unsuspend AccountSuspend unary
DeleteAccount DELETE /api/v1/accounts/{id} AccountDelete unary
CheckUsername GET /api/v1/accounts/username-check AccountCreate unary
ListSubUserPresets GET /api/v1/accounts/{account_id}/sub-users/presets AccountSubUserList unary
ListSubUsers GET /api/v1/accounts/{account_id}/sub-users AccountSubUserList unary
InviteSubUser POST /api/v1/accounts/{account_id}/sub-users AccountSubUserInvite unary
GetSubUser GET /api/v1/accounts/{account_id}/sub-users/{id} AccountSubUserList unary
UpdateSubUser PATCH /api/v1/accounts/{account_id}/sub-users/{id} AccountSubUserUpdate unary
RemoveSubUser DELETE /api/v1/accounts/{account_id}/sub-users/{id} AccountSubUserRemove unary

/hostcraft.v1.AccountService/CreateAccount

/hostcraft.v1.AccountService/ListAccounts

/hostcraft.v1.AccountService/GetAccount

/hostcraft.v1.AccountService/UpdateAccount

/hostcraft.v1.AccountService/SuspendAccount

/hostcraft.v1.AccountService/UnsuspendAccount

DeleteAccount tears the account down through the account.delete saga. Over REST this needs a freshly re-authenticated session; over gRPC it is available to the local root principal only.

/hostcraft.v1.AccountService/DeleteAccount

/hostcraft.v1.AccountService/CheckUsername

Sub-users: additional logins scoped to one account with a preset or custom permission set.

/hostcraft.v1.AccountService/ListSubUserPresets

/hostcraft.v1.AccountService/ListSubUsers

/hostcraft.v1.AccountService/InviteSubUser

/hostcraft.v1.AccountService/GetSubUser

/hostcraft.v1.AccountService/UpdateSubUser

/hostcraft.v1.AccountService/RemoveSubUser

Field Type Number Description
id string 1 -
username string 2 Linux username, immutable
email string 3 -
display_name string 4 -
reseller_id string 5 empty when owned by the server admin
plan_id string 6 -
status string 7 active | provisioning | suspended | deleted
suspension_reason string 8 -
legacy_php_allowed bool 9 -
created_at google.protobuf.Timestamp 10 -
limits AccountLimits 11 -
node_id string 12 cluster node hosting the account; empty on solo
bandwidth_bytes int64 13 bytes served this calendar month (UTC)

Limits mirrors account.Limits. The REST body carries these keys in Go field-name case, so the proto field names match exactly.

Field Type Number Description
DiskQuotaBytes int64 1 -
BandwidthQuotaBytes int64 2 -
MaxSites int64 3 -
MaxMailboxes int64 4 -
MaxDatabases int64 5 -
MaxSubdomains int64 6 -
MaxAddonDomains int64 7 -
MaxSubUsers int64 8 -
MaxCronJobs int64 9 -
MaxFTPUsers int64 10 -
CPUQuotaPercent int64 11 -
MemoryMaxBytes int64 12 -
TasksMax int64 13 -
MaxParkedDomains int64 14 -

AccountWorkflowResponse is returned by calls that change an account and start a saga.

Field Type Number Description
account Account 1 -
workflow_id string 2 -
Field Type Number Description
username string 1 -
domain string 2 when set, a free username derived from it is suggested
Field Type Number Description
username string 1 -
available bool 2 -
reason string 3 -
suggestion string 4 -
max_length int64 5 -
Field Type Number Description
username string 1 -
email string 2 -
display_name string 3 -
password string 4 -
reseller_id string 5 ignored for reseller principals
plan_id string 6 -
legacy_php_allowed bool 7 -
node_id string 8 cluster panels: place the account on this agent
Field Type Number Description
id string 1 -
keep_backup bool 2 -

Empty is returned by RPCs whose REST route answers with an empty object or 204 No Content.

No fields.

Field Type Number Description
id string 1 -
Field Type Number Description
account_id string 1 -
id string 2 -
Field Type Number Description
account_id string 1 -
email string 2 -
display_name string 3 -
password string 4 -
preset string 5 -
custom_permissions repeated string 6 -
Field Type Number Description
reseller_id string 1 admins only; resellers are pinned to their pool
Field Type Number Description
accounts repeated Account 1 -
Field Type Number Description
account_id string 1 -
Field Type Number Description
presets repeated SubUserPreset 1 -
grantable repeated string 2 -
Field Type Number Description
account_id string 1 -
Field Type Number Description
sub_users repeated SubUser 1 -
Field Type Number Description
account_id string 1 -
id string 2 -
Field Type Number Description
id string 1 -
account_id string 2 -
email string 3 -
display_name string 4 -
preset string 5 -
custom_permissions repeated string 6 -
created_at google.protobuf.Timestamp 7 -
last_seen_at google.protobuf.Timestamp 8 -
disabled bool 9 -
Field Type Number Description
id string 1 -
permissions repeated string 2 -
Field Type Number Description
id string 1 -
reason string 2 -
Field Type Number Description
id string 1 -
Field Type Number Description
id string 1 -
email optional string 2 -
display_name optional string 3 -
legacy_php_allowed optional bool 4 -
plan_id optional string 5 -
Field Type Number Description
account_id string 1 -
id string 2 -
display_name optional string 3 -
preset optional string 4 -
custom_permissions repeated string 5 replaces when non-empty
disabled optional bool 6 -

WorkflowAccepted is the body of every 202 response that only starts a workflow saga. Follow progress with WorkflowService.StreamWorkflow.

Field Type Number Description
workflow_id string 1 -