KyPanelDocs

API reference

Domains

Main, addon, subdomain and alias domains; document roots, PHP version and settings, redirects, error pages.

List domains

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

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

Parameters

NameIn
idpath

Responses

  • 200 OK
    Body
    FieldType
    home_dirstring
    itemsarray of DomainView
    limitsobject
    FieldType
    addonLimitView
    aliasLimitView
    subLimitView
  • 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

Add a domain (addon, subdomain or alias)

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

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

Parameters

NameIn
idpath

Request body

FieldType
docrootstring
labelstring
namestring
parent_idstring
typestring

Responses

  • 202 Accepted (runs in the background)
    Body
    FieldType
    domainStoreDomainRow
    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-not-active, limit-reached, validation
  • 500 Internal Server Error: internal

Remove a domain

DELETE/api/v1/accounts/{id}/domains/{did}

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

Parameters

NameIn
idpath
didpath
confirmquery
remove_filesquery

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-removing, has-subdomains, main-domain, still-provisioning
  • 500 Internal Server Error: internal

Get a domain

GET/api/v1/accounts/{id}/domains/{did}

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

Parameters

NameIn
idpath
didpath

Responses

  • 200 OK
    Body
    FieldType
    docrootstring
    force_httpsboolean
    idstring
    namestring
    parent_idstring
    parent_namestring
    php_ini_count alwaysinteger
    php_versionstring
    redirect_count alwaysinteger
    redirect_tostring
    sslDomainSSLView
    statusstring
    subdomains alwaysinteger
    typestring
  • 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 a domain from AutoSSL

PUT/api/v1/accounts/{id}/domains/{did}/autossl

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

Parameters

NameIn
idpath
didpath

Request body

FieldType
excludedboolean

Responses

  • 200 OK
    Body
    FieldType
    excludedboolean
  • 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 a domain's document root

PUT/api/v1/accounts/{id}/domains/{did}/docroot

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

Parameters

NameIn
idpath
didpath

Request body

FieldType
docrootstring

Responses

  • 202 Accepted (runs in the background)
    Body
    FieldType
    docrootstring
    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: alias, already-removing
  • 500 Internal Server Error: internal

Turn HTTPS redirection on or off

PUT/api/v1/accounts/{id}/domains/{did}/force-https

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

Parameters

NameIn
idpath
didpath

Request body

FieldType
enabledboolean

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

Change a domain's PHP version

PUT/api/v1/accounts/{id}/domains/{did}/php

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

Parameters

NameIn
idpath
didpath

Request body

FieldType
versionstring

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

Get a domain's PHP settings

GET/api/v1/accounts/{id}/domains/{did}/php-ini

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

Parameters

NameIn
idpath
didpath

Responses

  • 200 OK
    Body
    FieldType
    directivesarray of WebDirective
    domainstring
    domain_idstring
    php_versionstring
    valuesmap of string
  • 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: alias
  • 500 Internal Server Error: internal

Save a domain's PHP settings

PUT/api/v1/accounts/{id}/domains/{did}/php-ini

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

Parameters

NameIn
idpath
didpath

Request body

FieldType
valuesmap of string

Responses

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

List custom error pages

GET/api/v1/accounts/{id}/error-pages

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

Parameters

NameIn
idpath

Responses

  • 200 OK
    Body
    FieldType
    codesarray of integer
    itemsarray of StoreErrorPageRow
  • 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 a custom error page

PUT/api/v1/accounts/{id}/error-pages/{did}/{code}

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

Parameters

NameIn
idpath
didpath
codepath

Request body

FieldType
htmlstring

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

List redirects

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

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

Parameters

NameIn
idpath

Responses

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

Add a redirect

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

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

Parameters

NameIn
idpath

Request body

FieldType
codeinteger
domain_idstring
pathstring
target_urlstring
wildcardboolean
www_modestring

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 redirect

DELETE/api/v1/accounts/{id}/redirects/{rid}

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

Parameters

NameIn
idpath
ridpath

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

Update a redirect

PUT/api/v1/accounts/{id}/redirects/{rid}

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

Parameters

NameIn
idpath
ridpath

Request body

FieldType
codeinteger
domain_idstring
pathstring
target_urlstring
wildcardboolean
www_modestring

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

Directory indexes, hotlink protection and IP blocks

GET/api/v1/accounts/{id}/web-options

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

Parameters

NameIn
idpath

Responses

  • 200 OK
    Body
    FieldType
    hotlink alwaysStoreHotlinkSettings
    indexes alwaysarray of StoreIndexSetting
    ip_blocks alwaysarray of StoreIPBlock
  • 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

List the server's domains by type

GET/api/v1/server/domains

List Subdomains (?type=sub) and List Parked Domains (?type=alias), or addon domains.

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

Parameters

NameIn
typequery

Responses

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