KyPanelDocs

API reference

Accounts

Hosting accounts: create, suspend, terminate, change package, limits, owner, password; single sign-on links.

List accounts

GET/api/v1/accounts

Returns the accounts with filters, sorting and (with ?page=) pagination, plus the list totals.

Who
root, reseller (ACL: list-accts)
API tokens
admin token area: accounts
Operation
listAccounts · ky call listAccounts

Parameters

NameIn
dirquery
over_bandwidthquery
over_quotaquery
ownerquery
packagequery
pagequery
per_pagequery
qquery
sortquery
statusquery

Responses

  • 200 OK
    Body
    FieldType
    countsStoreAccountCounts
    itemsarray of StoreAccount
    pageinteger
    per_pageinteger
    totalinteger
  • 400 Bad Request: validation
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 500 Internal Server Error: internal

Create an account

POST/api/v1/accounts

Who
root, reseller (ACL: create-acct)
API tokens
admin token area: accounts
Operation
createAccount · ky call createAccount

Request body

FieldType
cgiboolean
contact_emailstring
database_nodestring
domainstring
ip_idstring
localestring
mail_nodestring
mail_routingstring
make_resellerboolean
owner_idstring
owns_itselfboolean
package_idstring
passwordstring
shellstring
spam_boxboolean
spam_filterboolean
usernamestring

Responses

  • 202 Accepted (runs in the background)
    Body
    FieldType
    accountStoreAccount
    job_idstring
  • 400 Bad Request: validation
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: reseller-limit
  • 409 Conflict: conflict
  • 500 Internal Server Error: internal

Bandwidth of every account in a month

GET/api/v1/accounts-bandwidth

Returns every account's traffic in ?month=YYYY-MM (default: this month, server time zone).

Who
root, reseller (ACL: show-bandwidth or list-accts)
API tokens
admin token area: server
Operation
bandwidthByMonth · ky call bandwidthByMonth

Parameters

NameIn
monthquery

Responses

  • 200 OK
    Body
    FieldType
    currentboolean
    itemsarray of StoreBandwidthMonthRow
    monthstring
    timezonestring
    total_bytesinteger
  • 400 Bad Request: validation
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 500 Internal Server Error: internal

Check a username or domain before creating an account

GET/api/v1/accounts-check

Who
root, reseller (ACL: create-acct)
API tokens
admin token area: accounts
Operation
checkAccount · ky call checkAccount

Parameters

NameIn
domainquery
usernamequery

Responses

  • 200 OK
    Body

    map of any

  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 500 Internal Server Error: internal

List the possible account owners (root and resellers)

GET/api/v1/accounts-owners

Who
root
API tokens
admin token area: server
Operation
accountOwners · ky call accountOwners

Responses

  • 200 OK
    Body
    FieldType
    itemsarray of StoreAccountOwner
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 500 Internal Server Error: internal

Terminate an account

DELETE/api/v1/accounts/{id}

Who
root, reseller (ACL: kill-acct)
API tokens
admin token area: accounts
Operation
deleteAccount · ky call deleteAccount

Parameters

NameIn
idpath
confirmquery
keep_homequery

Responses

  • 202 Accepted (runs in the background)
    Body
    FieldType
    job_idstring
  • 400 Bad Request: confirmation-required
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 409 Conflict: already-terminating, is-reseller
  • 500 Internal Server Error: internal

Get an account

GET/api/v1/accounts/{id}

Who
root, reseller (ACL: list-accts or create-user-session); customer
API tokens
admin token area: accounts; account token area: account
Operation
getAccount · ky call getAccount

Parameters

NameIn
idpath

Responses

  • 200 OK
    Body
    FieldType
    bw_exceeded alwaysboolean
    bw_limit_mbinteger
    bw_used_month_mb alwaysinteger
    cgi alwaysboolean
    contact_email alwaysstring
    created_at alwaysinteger
    db_count alwaysinteger
    db_prefix alwaysstring
    db_used_bytes alwaysinteger
    default_email_quota_mbinteger
    disk_quota_mbinteger
    disk_used_mb alwaysinteger
    feature_list_id alwaysstring
    home_dir alwaysstring
    id alwaysstring
    inodes_limitinteger
    inodes_used alwaysinteger
    ip_address alwaysstring
    ip_id alwaysstring
    is_reseller alwaysboolean
    locale alwaysstring
    main_domain alwaysstring
    make_reseller alwaysboolean
    max_addoninteger
    max_emailinteger
    max_email_per_hourinteger
    max_email_quota_mbinteger
    max_ftpinteger
    max_parkedinteger
    max_sqlinteger
    max_subinteger
    owner_id alwaysstring
    owner_name alwaysstring
    package_id alwaysstring
    package_name alwaysstring
    php_max_childreninteger
    shell alwaysstring
    status alwaysstring
    suspend_locked alwaysboolean
    suspend_reason alwaysstring
    suspended_atinteger
    suspended_bystring
    theme alwaysstring
    uid alwaysinteger
    username alwaysstring
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 500 Internal Server Error: internal

Include or exclude the account from backups

PUT/api/v1/accounts/{id}/backup-enabled

Who
root
API tokens
admin token area: accounts
Operation
backupAccountToggle · ky call backupAccountToggle

Parameters

NameIn
idpath

Request body

FieldType
enabledboolean

Responses

  • 200 OK
    Body
    FieldType
    enabledboolean
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 500 Internal Server Error: internal

Bandwidth of the account per day

GET/api/v1/accounts/{id}/bandwidth

Returns the account's traffic per day, domain and protocol for the last ?days= (default 31).

Who
root, reseller (ACL: show-bandwidth or list-accts); customer
API tokens
admin token area: accounts; account token area: account
Feature
bandwidth
Operation
accountBandwidth · ky call accountBandwidth

Parameters

NameIn
idpath
daysquery

Responses

  • 200 OK
    Body
    FieldType
    exceededboolean
    from_dayinteger
    itemsarray of StoreBandwidthRow
    limit_mbinteger
    timezonestring
    used_month_mbinteger
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 500 Internal Server Error: internal

Allow or forbid CGI scripts

PUT/api/v1/accounts/{id}/cgi

Who
root, reseller (ACL: edit-account)
API tokens
admin token area: accounts
Operation
setAccountCGI · ky call setAccountCGI

Parameters

NameIn
idpath

Request body

FieldType
cgiboolean

Responses

  • 202 Accepted (runs in the background)
    Body
    FieldType
    job_idstring
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 500 Internal Server Error: internal

Change the account's contact email

PUT/api/v1/accounts/{id}/contact-email

Who
root, reseller (ACL: edit-account)
API tokens
admin token area: accounts
Operation
setContactEmail · ky call setContactEmail

Parameters

NameIn
idpath

Request body

FieldType
contact_emailstring

Responses

  • 200 OK
    Body
    FieldType
    bw_exceeded alwaysboolean
    bw_limit_mbinteger
    bw_used_month_mb alwaysinteger
    cgi alwaysboolean
    contact_email alwaysstring
    created_at alwaysinteger
    db_count alwaysinteger
    db_prefix alwaysstring
    db_used_bytes alwaysinteger
    default_email_quota_mbinteger
    disk_quota_mbinteger
    disk_used_mb alwaysinteger
    feature_list_id alwaysstring
    home_dir alwaysstring
    id alwaysstring
    inodes_limitinteger
    inodes_used alwaysinteger
    ip_address alwaysstring
    ip_id alwaysstring
    is_reseller alwaysboolean
    locale alwaysstring
    main_domain alwaysstring
    make_reseller alwaysboolean
    max_addoninteger
    max_emailinteger
    max_email_per_hourinteger
    max_email_quota_mbinteger
    max_ftpinteger
    max_parkedinteger
    max_sqlinteger
    max_subinteger
    owner_id alwaysstring
    owner_name alwaysstring
    package_id alwaysstring
    package_name alwaysstring
    php_max_childreninteger
    shell alwaysstring
    status alwaysstring
    suspend_locked alwaysboolean
    suspend_reason alwaysstring
    suspended_atinteger
    suspended_bystring
    theme alwaysstring
    uid alwaysinteger
    username alwaysstring
  • 400 Bad Request: validation
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 500 Internal Server Error: internal

Change the account's main domain

POST/api/v1/accounts/{id}/domain

Who
root, reseller (ACL: edit-account)
API tokens
admin token area: accounts
Operation
changeDomain · ky call changeDomain

Parameters

NameIn
idpath

Request body

FieldType
domainstring

Responses

  • 202 Accepted (runs in the background)
    Body
    FieldType
    job_idstring
    planHostingDomainPlan
  • 400 Bad Request: validation
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 409 Conflict: account-busy
  • 500 Internal Server Error: internal

Preview a main domain change

POST/api/v1/accounts/{id}/domain-plan

Who
root, reseller (ACL: edit-account)
API tokens
admin token area: accounts
Operation
domainPlan · ky call domainPlan

Parameters

NameIn
idpath

Request body

FieldType
domainstring

Responses

  • 200 OK
    Body
    FieldType
    blockers alwaysarray of string
    from alwaysstring
    ok alwaysboolean
    renames alwaysarray of StoreDomainRename
    steps alwaysarray of string
    to alwaysstring
  • 400 Bad Request: validation
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 500 Internal Server Error: internal

Change the account's IP address

PUT/api/v1/accounts/{id}/ip

Who
root, reseller (ACL: edit-account)
API tokens
admin token area: accounts
Operation
setAccountIP · ky call setAccountIP

Parameters

NameIn
idpath

Request body

FieldType
ip_idstring

Responses

  • 202 Accepted (runs in the background)
    Body
    FieldType
    accountStoreAccount
    job_idstring
  • 400 Bad Request: validation
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: package-privileges
  • 404 Not Found: not-found
  • 409 Conflict: account-busy, validation
  • 500 Internal Server Error: internal

Override the account's limits

PUT/api/v1/accounts/{id}/limits

Overrides the account's limits (the package stays; the account becomes "customized").

Who
root, reseller (ACL: edit-account)
API tokens
admin token area: accounts
Operation
setAccountLimits · ky call setAccountLimits

Parameters

NameIn
idpath

Request body

FieldType
bw_limit_mbinteger
disk_quota_mbinteger
max_addoninteger
max_emailinteger
max_email_per_hourinteger
max_email_quota_mbinteger
max_ftpinteger
max_parkedinteger
max_sqlinteger
max_subinteger
php_max_childreninteger

Responses

  • 202 Accepted (runs in the background)
    Body
    FieldType
    accountStoreAccount
    job_idstring
    warningsarray of map of any
  • 400 Bad Request: validation
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: package-privileges, reseller-limit
  • 404 Not Found: not-found
  • 409 Conflict: account-busy
  • 500 Internal Server Error: internal

Change the account's language

PUT/api/v1/accounts/{id}/locale

Who
root, reseller (ACL: edit-account)
API tokens
admin token area: accounts
Operation
setAccountLocale · ky call setAccountLocale

Parameters

NameIn
idpath

Request body

FieldType
localestring

Responses

  • 204 Done, no content
  • 400 Bad Request: validation
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 500 Internal Server Error: internal

Open the customer panel as the account

POST/api/v1/accounts/{id}/login-as

Generates a single-use link (60 s) for the admin to open the customer's panel.

Who
root, reseller (ACL: create-user-session)
API tokens
API tokens can't use this endpoint
Operation
loginAs · ky call loginAs

Parameters

NameIn
idpath

Responses

  • 200 OK
    Body
    FieldType
    urlstring
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 500 Internal Server Error: internal

Change the account's owner

PUT/api/v1/accounts/{id}/owner

Who
root
API tokens
admin token area: accounts
Operation
setAccountOwner · ky call setAccountOwner

Parameters

NameIn
idpath

Request body

FieldType
owner_idstring

Responses

  • 200 OK
    Body
    FieldType
    bw_exceeded alwaysboolean
    bw_limit_mbinteger
    bw_used_month_mb alwaysinteger
    cgi alwaysboolean
    contact_email alwaysstring
    created_at alwaysinteger
    db_count alwaysinteger
    db_prefix alwaysstring
    db_used_bytes alwaysinteger
    default_email_quota_mbinteger
    disk_quota_mbinteger
    disk_used_mb alwaysinteger
    feature_list_id alwaysstring
    home_dir alwaysstring
    id alwaysstring
    inodes_limitinteger
    inodes_used alwaysinteger
    ip_address alwaysstring
    ip_id alwaysstring
    is_reseller alwaysboolean
    locale alwaysstring
    main_domain alwaysstring
    make_reseller alwaysboolean
    max_addoninteger
    max_emailinteger
    max_email_per_hourinteger
    max_email_quota_mbinteger
    max_ftpinteger
    max_parkedinteger
    max_sqlinteger
    max_subinteger
    owner_id alwaysstring
    owner_name alwaysstring
    package_id alwaysstring
    package_name alwaysstring
    php_max_childreninteger
    shell alwaysstring
    status alwaysstring
    suspend_locked alwaysboolean
    suspend_reason alwaysstring
    suspended_atinteger
    suspended_bystring
    theme alwaysstring
    uid alwaysinteger
    username alwaysstring
  • 400 Bad Request: validation
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 500 Internal Server Error: internal

Move the account to another package

PUT/api/v1/accounts/{id}/package

Moves the account to a package: every limit, the PHP-FPM children and the shell follow it. Going under the current usage needs "force" (nothing is deleted; the account just can't create more).

Who
root, reseller (ACL: upgrade-acct)
API tokens
admin token area: accounts
Operation
setAccountPackage · ky call setAccountPackage

Parameters

NameIn
idpath

Request body

FieldType
forceboolean
package_idstring

Responses

  • 202 Accepted (runs in the background)
    Body
    FieldType
    accountStoreAccount
    job_idstring
    warningsarray of map of any
  • 400 Bad Request: validation
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: reseller-limit
  • 404 Not Found: not-found
  • 409 Conflict: account-busy
  • 500 Internal Server Error: internal

Check whether the account fits a package

GET/api/v1/accounts/{id}/package-check

Who
root, reseller (ACL: upgrade-acct)
API tokens
admin token area: accounts
Operation
packageCheck · ky call packageCheck

Parameters

NameIn
idpath
package_idquery

Responses

  • 200 OK
    Body
    FieldType
    packageStorePackage
    usageStoreAccountUsage
    warningsarray of map of any
  • 400 Bad Request: validation
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 500 Internal Server Error: internal

Change the account's password

POST/api/v1/accounts/{id}/password

Who
root, reseller (ACL: passwd); customer
API tokens
admin token area: accounts; account tokens: not allowed
Operation
acctPassword · ky call acctPassword

Parameters

NameIn
idpath

Request body

FieldType
current_passwordstring
new_passwordstring

Responses

  • 204 Done, no content
  • 400 Bad Request: rejected, validation
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 429 Too Many Requests: too-many-attempts
  • 500 Internal Server Error: internal

Get the account's preferences

GET/api/v1/accounts/{id}/preferences

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: account
Operation
acctPreferences · ky call acctPreferences

Parameters

NameIn
idpath

Responses

  • 200 OK
    Body
    FieldType
    localesarray of map of string
    preferencesAcctPrefs
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 500 Internal Server Error: internal

Save the account's preferences

PUT/api/v1/accounts/{id}/preferences

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: account
Operation
acctSavePreferences · ky call acctSavePreferences

Parameters

NameIn
idpath

Request body

FieldType
contact_emailstring
contact_email2string
localestring
notificationsmap of boolean

Responses

  • 200 OK
    Body
    FieldType
    localesarray of map of string
    preferencesAcctPrefs
  • 400 Bad Request: validation
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 500 Internal Server Error: internal

Change the account's disk quota

PUT/api/v1/accounts/{id}/quota

Who
root, reseller (ACL: quota or edit-account)
API tokens
admin token area: accounts
Operation
setAccountQuota · ky call setAccountQuota

Parameters

NameIn
idpath

Request body

FieldType
disk_quota_mbinteger

Responses

  • 202 Accepted (runs in the background)
    Body
    FieldType
    accountStoreAccount
    job_idstring
    warningsarray of string
  • 400 Bad Request: validation
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: reseller-limit
  • 404 Not Found: not-found
  • 409 Conflict: account-busy
  • 500 Internal Server Error: internal

Change the account's username

POST/api/v1/accounts/{id}/rename

Who
root, reseller (ACL: edit-account)
API tokens
admin token area: accounts
Operation
renameAccount · ky call renameAccount

Parameters

NameIn
idpath

Request body

FieldType
usernamestring

Responses

  • 202 Accepted (runs in the background)
    Body
    FieldType
    job_idstring
  • 400 Bad Request: validation
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 409 Conflict: account-busy, not-active, validation
  • 500 Internal Server Error: internal

Preview a username change

POST/api/v1/accounts/{id}/rename-plan

Who
root, reseller (ACL: edit-account)
API tokens
admin token area: accounts
Operation
renamePlan · ky call renamePlan

Parameters

NameIn
idpath

Request body

FieldType
usernamestring

Responses

  • 200 OK
    Body
    FieldType
    blockers alwaysarray of string
    changes alwaysarray of StoreNameChange
    checks alwaysarray of HostingPlanCheck
    from alwaysstring
    ok alwaysboolean
    steps alwaysarray of string
    to alwaysstring
  • 400 Bad Request: rejected
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 500 Internal Server Error: internal

Repair the account's configuration

POST/api/v1/accounts/{id}/repair

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: account
Operation
repairAccount · ky call repairAccount

Parameters

NameIn
idpath

Responses

  • 202 Accepted (runs in the background)
    Body
    FieldType
    job_idstring
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 500 Internal Server Error: internal

CPU, memory, I/O and process usage of the account

GET/api/v1/accounts/{id}/resource-usage

The account's limits and its CPU/memory/I/O/process samples with faults (limits hit).

Who
root, reseller (ACL: list-accts); customer
API tokens
admin token area: accounts; account token area: resource-usage
Feature
resource_usage
Operation
accountResourceUsage · ky call accountResourceUsage

Parameters

NameIn
idpath
rangequery

Responses

  • 200 OK
    Body
    FieldType
    bucketstring
    faultsobject
    FieldType
    cpuinteger
    epinteger
    iointeger
    meminteger
    nprocinteger
    limitsStoreIsolation
    rangestring
    samplesarray of StoreUsageSample
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 500 Internal Server Error: internal

Change the account's shell access

PUT/api/v1/accounts/{id}/shell

Who
root, reseller (ACL: edit-account)
API tokens
admin token area: accounts
Operation
setAccountShell · ky call setAccountShell

Parameters

NameIn
idpath

Request body

FieldType
shellstring

Responses

  • 202 Accepted (runs in the background)
    Body
    FieldType
    accountStoreAccount
    job_idstring
  • 400 Bad Request: validation
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: package-privileges
  • 404 Not Found: not-found
  • 409 Conflict: account-busy
  • 500 Internal Server Error: internal

Create a single sign-on link for the account

POST/api/v1/accounts/{id}/sso

Issues a single-use sign-in link (60 s) for billing systems and other integrations: the customer opens it and lands in their panel (or a reseller in Ky Admin) without a password.

Who
root, reseller (ACL: create-user-session)
API tokens
admin token area: accounts
Operation
accountSSO · ky call accountSSO

Parameters

NameIn
idpath

Request body

FieldType
gotostring
panelstring

Responses

  • 200 OK
    Body
    FieldType
    expires_ininteger
    urlstring
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 409 Conflict: not-reseller, suspended
  • 422 Unprocessable Entity: invalid-goto, invalid-panel
  • 500 Internal Server Error: internal

Suspend an account

POST/api/v1/accounts/{id}/suspend

Who
root, reseller (ACL: suspend-acct)
API tokens
admin token area: accounts
Operation
suspendAccount · ky call suspendAccount

Parameters

NameIn
idpath

Request body

FieldType
lockedboolean
reasonstring

Responses

  • 202 Accepted (runs in the background)
    Body
    FieldType
    accountStoreAccount
    job_idstring
  • 400 Bad Request: validation
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: suspension-locked
  • 404 Not Found: not-found
  • 409 Conflict: account-busy
  • 500 Internal Server Error: internal

Unsuspend an account

POST/api/v1/accounts/{id}/unsuspend

Who
root, reseller (ACL: suspend-acct)
API tokens
admin token area: accounts
Operation
unsuspendAccount · ky call unsuspendAccount

Parameters

NameIn
idpath

Responses

  • 202 Accepted (runs in the background)
    Body
    FieldType
    accountStoreAccount
    job_idstring
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: suspension-locked
  • 404 Not Found: not-found
  • 409 Conflict: not-suspended
  • 500 Internal Server Error: internal

Usage against the account's limits

GET/api/v1/accounts/{id}/usage

Returns usage against limits for every limited resource (customer Home stats bar).

Who
root, reseller (ACL: list-accts); customer
API tokens
admin token area: accounts; account token area: usage
Operation
accountUsage · ky call accountUsage

Parameters

NameIn
idpath

Responses

  • 200 OK
    Body
    FieldType
    db_used_bytesinteger
    default_email_quota_mbinteger
    itemsarray of UsageItem
    max_email_per_hourinteger
    max_email_quota_mbinteger
    warn_pctinteger
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 500 Internal Server Error: internal

Terminate several accounts

POST/api/v1/accounts/bulk-terminate

Who
root, reseller (ACL: kill-acct)
API tokens
admin token area: accounts
Operation
bulkTerminate · ky call bulkTerminate

Request body

FieldType
confirmstring
idsarray of string
keep_dnsboolean
keep_homeboolean

Responses

  • 202 Accepted (runs in the background)
    Body
    FieldType
    itemsarray of Result
  • 400 Bad Request: confirmation-required, validation
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 500 Internal Server Error: internal

Export the account list as CSV

GET/api/v1/accounts/export.csv

Streams the filtered list as CSV (every match, no pagination).

Who
root, reseller (ACL: list-accts)
API tokens
admin token area: accounts
Operation
exportAccounts · ky call exportAccounts

Parameters

NameIn
dirquery
over_bandwidthquery
over_quotaquery
ownerquery
packagequery
pagequery
per_pagequery
qquery
sortquery
statusquery

Responses

  • 200 OK
  • 400 Bad Request: validation
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 500 Internal Server Error: internal