KyPanelDocs

API reference

Resellers

Resellers, their limits, privileges and accounts.

Make the account a reseller, or stop

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

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

Parameters

NameIn
idpath

Request body

FieldType
make_resellerboolean

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
  • 409 Conflict: validation
  • 500 Internal Server Error: internal

Reseller privilege catalog

GET/api/v1/acl-keys

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

Responses

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

List privilege lists

GET/api/v1/acl-lists

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

Responses

  • 200 OK
    Body
    FieldType
    itemsarray of StoreACLList
    keysarray of ACLKey
  • 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 a privilege list

POST/api/v1/acl-lists

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

Request body

FieldType
keysarray of string
namestring

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)
  • 404 Not Found: not-found
  • 409 Conflict: validation
  • 500 Internal Server Error: internal

Delete a privilege list

DELETE/api/v1/acl-lists/{lid}

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

Parameters

NameIn
lidpath

Responses

  • 204 Done, no content
  • 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: in-use
  • 500 Internal Server Error: internal

Update a privilege list

PUT/api/v1/acl-lists/{lid}

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

Parameters

NameIn
lidpath

Request body

FieldType
keysarray of string
namestring

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)
  • 404 Not Found: not-found
  • 409 Conflict: validation
  • 500 Internal Server Error: internal

Your reseller overview

GET/api/v1/reseller

Is the signed-in reseller's overview: limits, usage, nameservers and privileges.

Who
root, reseller
API tokens
admin token area: server
Operation
resellerSelf · ky call resellerSelf

Responses

  • 200 OK
    Body
    FieldType
    aclarray of string
    effective_nameserversarray of string
    privilegesarray of ACLKey
    resellerStoreReseller
  • 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-reseller
  • 500 Internal Server Error: internal

Reset your reseller branding

DELETE/api/v1/reseller/branding

Who
root, reseller (ACL: branding)
API tokens
admin token area: server
Operation
deleteBrandingOwn · ky call deleteBrandingOwn

Responses

  • 200 OK
  • 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

Get your reseller branding

GET/api/v1/reseller/branding

Who
root, reseller (ACL: branding)
API tokens
admin token area: server
Operation
getBrandingOwn · ky call getBrandingOwn

Responses

  • 200 OK
    Body
    FieldType
    colorsBrandingColors
    customboolean
    defaults alwaysobject
    FieldType
    colors alwaysBrandingColors
    product_name alwaysstring
    favicon alwaysstring
    favicon_urlstring
    linksarray of BrandingLink
    logo_dark_svgstring
    logo_svgstring
    product_namestring
    public_contactBrandingContact
    scope alwaysstring
    updated_atinteger
  • 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

Save your reseller branding

PUT/api/v1/reseller/branding

Who
root, reseller (ACL: branding)
API tokens
admin token area: server
Operation
putBrandingOwn · ky call putBrandingOwn

Request body

FieldType
colorsBrandingColors
faviconstring
linksarray of BrandingLink
logo_dark_svgstring
logo_svgstring
product_namestring
public_contactBrandingContact

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

List resellers

GET/api/v1/resellers

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

Responses

  • 200 OK
    Body
    FieldType
    itemsarray of StoreReseller
  • 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

Make an account a reseller

POST/api/v1/resellers

Grants reseller status to an existing account ("Make an account a reseller").

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

Request body

FieldType
account_idstring
acl_list_idstring
usernamestring

Responses

  • 201 Created
    Body
    FieldType
    account_status alwaysstring
    acl_list_id alwaysstring
    acl_list_name alwaysstring
    bw_limit_mbinteger
    contact_email alwaysstring
    created_at alwaysinteger
    disk_limit_mbinteger
    id alwaysstring
    main_domain alwaysstring
    max_accountsinteger
    nameservers alwaysarray of string
    oversell_bw alwaysboolean
    oversell_disk alwaysboolean
    owns_itself alwaysboolean
    panel_hostname alwaysstring
    suspend_reasonstring
    suspended_atinteger
    usage alwaysStoreResellerUsage
    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)
  • 409 Conflict: already-reseller, not-ready, validation
  • 500 Internal Server Error: internal

Remove reseller status

DELETE/api/v1/resellers/{id}

Takes reseller status away; the account keeps its hosting, its accounts and packages pass to root.

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

Parameters

NameIn
idpath

Responses

  • 200 OK
    Body
    FieldType
    accounts_movedinteger
  • 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

Get a reseller

GET/api/v1/resellers/{id}

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

Parameters

NameIn
idpath

Responses

  • 200 OK
    Body
    FieldType
    account_status alwaysstring
    acl_list_id alwaysstring
    acl_list_name alwaysstring
    bw_limit_mbinteger
    contact_email alwaysstring
    created_at alwaysinteger
    disk_limit_mbinteger
    id alwaysstring
    main_domain alwaysstring
    max_accountsinteger
    nameservers alwaysarray of string
    oversell_bw alwaysboolean
    oversell_disk alwaysboolean
    owns_itself alwaysboolean
    panel_hostname alwaysstring
    suspend_reasonstring
    suspended_atinteger
    usage alwaysStoreResellerUsage
    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

Update a reseller's limits and privileges

PUT/api/v1/resellers/{id}

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

Parameters

NameIn
idpath

Request body

FieldType
acl_list_idstring
bw_limit_mbinteger
disk_limit_mbinteger
max_accountsinteger
nameserversarray of string
oversell_bwboolean
oversell_diskboolean
owns_itselfboolean
panel_hostnamestring

Responses

  • 200 OK
    Body
    FieldType
    account_status alwaysstring
    acl_list_id alwaysstring
    acl_list_name alwaysstring
    bw_limit_mbinteger
    contact_email alwaysstring
    created_at alwaysinteger
    disk_limit_mbinteger
    id alwaysstring
    main_domain alwaysstring
    max_accountsinteger
    nameservers alwaysarray of string
    oversell_bw alwaysboolean
    oversell_disk alwaysboolean
    owns_itself alwaysboolean
    panel_hostname alwaysstring
    suspend_reasonstring
    suspended_atinteger
    usage alwaysStoreResellerUsage
    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
  • 409 Conflict: validation
  • 500 Internal Server Error: internal

List a reseller's accounts

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

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

Parameters

NameIn
idpath

Responses

  • 200 OK
    Body
    FieldType
    itemsarray of StoreAccount
  • 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

Reset a reseller's branding

DELETE/api/v1/resellers/{id}/branding

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

Parameters

NameIn
idpath

Responses

  • 200 OK
  • 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

Get a reseller's branding

GET/api/v1/resellers/{id}/branding

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

Parameters

NameIn
idpath

Responses

  • 200 OK
    Body
    FieldType
    colorsBrandingColors
    customboolean
    defaults alwaysobject
    FieldType
    colors alwaysBrandingColors
    product_name alwaysstring
    favicon alwaysstring
    favicon_urlstring
    linksarray of BrandingLink
    logo_dark_svgstring
    logo_svgstring
    product_namestring
    public_contactBrandingContact
    scope alwaysstring
    updated_atinteger
  • 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

Save a reseller's branding

PUT/api/v1/resellers/{id}/branding

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

Parameters

NameIn
idpath

Request body

FieldType
colorsBrandingColors
faviconstring
linksarray of BrandingLink
logo_dark_svgstring
logo_svgstring
product_namestring
public_contactBrandingContact

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

See Ky Admin as a reseller

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

Makes root's session show Ky Admin as the reseller sees it, until /auth/act-as/exit.

Who
root
API tokens
API tokens can't use this endpoint
Operation
actAsReseller · ky call actAsReseller

Parameters

NameIn
idpath

Responses

  • 200 OK
    Body
    FieldType
    redirectstring
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: session-only
  • 404 Not Found: not-found
  • 500 Internal Server Error: internal

Suspend a reseller and its accounts

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

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

Parameters

NameIn
idpath

Request body

FieldType
reasonstring

Responses

  • 200 OK
    Body
    FieldType
    accounts_suspendedinteger
  • 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: already-suspended
  • 500 Internal Server Error: internal

Terminate a reseller and its accounts

POST/api/v1/resellers/{id}/terminate

Removes the reseller's accounts, its packages and the reseller's own account.

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

Parameters

NameIn
idpath
confirmquery
keep_homequery

Responses

  • 202 Accepted (runs in the background)
    Body
    FieldType
    job_idsarray of string
  • 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
  • 500 Internal Server Error: internal

Unsuspend a reseller and its accounts

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

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

Parameters

NameIn
idpath

Responses

  • 200 OK
    Body
    FieldType
    accounts_unsuspendedinteger
  • 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