KyPanelDocs

API reference

SSL/TLS

Certificates, keys, CSRs and AutoSSL.

Run AutoSSL for the account

POST/api/v1/accounts/{id}/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
runAutoSSL · ky call runAutoSSL

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

SSL status of every domain

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

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

Parameters

NameIn
idpath

Responses

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

GET/api/v1/accounts/{id}/ssl/certs

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

Parameters

NameIn
idpath

Responses

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

Upload a certificate

POST/api/v1/accounts/{id}/ssl/certs

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

Parameters

NameIn
idpath

Request body

FieldType
ca_bundlestring
cert_idstring
certificatestring
domain_idstring
friendly_namestring
private_keystring

Responses

  • 201 Created
    Body
    FieldType
    certStoreSSLCert
    previewCertPreview
  • 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: not-ready
  • 500 Internal Server Error: internal

Delete a certificate

DELETE/api/v1/accounts/{id}/ssl/certs/{cid}

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

Parameters

NameIn
idpath
cidpath

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

Get a certificate

GET/api/v1/accounts/{id}/ssl/certs/{cid}

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

Parameters

NameIn
idpath
cidpath

Responses

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

Check a certificate, key and CA bundle

POST/api/v1/accounts/{id}/ssl/check

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

Parameters

NameIn
idpath

Request body

FieldType
ca_bundlestring
cert_idstring
certificatestring
domain_idstring
friendly_namestring
private_keystring

Responses

  • 200 OK
    Body
    FieldType
    chain_certs alwaysinteger
    covers_domainboolean
    domains alwaysarray of string
    issuer alwaysstring
    key_match alwaysboolean
    key_stored alwaysboolean
    not_after alwaysinteger
    not_before alwaysinteger
    validation alwaysstring
    warnings alwaysarray 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)
  • 500 Internal Server Error: internal

List certificate signing requests

GET/api/v1/accounts/{id}/ssl/csrs

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

Parameters

NameIn
idpath

Responses

  • 200 OK
    Body
    FieldType
    itemsarray of StoreSSLCSR
  • 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 certificate signing request

POST/api/v1/accounts/{id}/ssl/csrs

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

Parameters

NameIn
idpath

Request body

FieldType
domainsarray of string
friendly_namestring
key_idstring
key_typestring
subjectHostingCSRSubject

Responses

  • 201 Created
    Body
    FieldType
    csrStoreSSLCSR
  • 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: not-ready
  • 500 Internal Server Error: internal

Delete a certificate signing request

DELETE/api/v1/accounts/{id}/ssl/csrs/{cid}

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

Parameters

NameIn
idpath
cidpath

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

Install a certificate on a domain

POST/api/v1/accounts/{id}/ssl/install

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

Parameters

NameIn
idpath

Request body

FieldType
ca_bundlestring
cert_idstring
certificatestring
domain_idstring
friendly_namestring
private_keystring

Responses

  • 202 Accepted (runs in the background)
    Body
    FieldType
    cert_idstring
    job_idstring
    warningsarray 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: not-ready
  • 500 Internal Server Error: internal

Uninstall a domain's certificate

DELETE/api/v1/accounts/{id}/ssl/installs/{did}

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

Parameters

NameIn
idpath
didpath

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

List private keys

GET/api/v1/accounts/{id}/ssl/keys

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

Parameters

NameIn
idpath

Responses

  • 200 OK
    Body
    FieldType
    itemsarray of StoreSSLKey
    typesarray 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)
  • 500 Internal Server Error: internal

Generate or upload a private key

POST/api/v1/accounts/{id}/ssl/keys

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

Parameters

NameIn
idpath

Request body

FieldType
friendly_namestring
pemstring
typestring

Responses

  • 201 Created
    Body
    FieldType
    keyStoreSSLKey
  • 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: not-ready
  • 500 Internal Server Error: internal

Delete a private key

DELETE/api/v1/accounts/{id}/ssl/keys/{kid}

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

Parameters

NameIn
idpath
kidpath

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

Get a private key

GET/api/v1/accounts/{id}/ssl/keys/{kid}

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

Parameters

NameIn
idpath
kidpath

Responses

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

AutoSSL settings and status

GET/api/v1/server/ssl/autossl

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

Responses

  • 200 OK
    Body
    FieldType
    accountsarray of StoreAutoSSLAccount
    interval_hoursinteger
    key_typesarray of string
    profilesarray of map of any
    providerstring
    queuearray of StoreJobRun
    settingsHostingSSLSettings
  • 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

Run AutoSSL for every account

POST/api/v1/server/ssl/autossl/run

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

Request body

FieldType
account_idstring
hostnameboolean

Responses

  • 202 Accepted (runs in the background)
    Body
    FieldType
    job_idsarray of string
    queuedinteger
  • 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 AutoSSL runs

GET/api/v1/server/ssl/autossl/runs

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

Parameters

NameIn
limitquery
statusquery

Responses

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

AutoSSL run log

GET/api/v1/server/ssl/autossl/runs/{jid}/log

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

Parameters

NameIn
jidpath

Responses

  • 200 OK
    Body
    FieldType
    jobStoreJob
    linesarray of StoreJobLog
  • 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 AutoSSL settings

PUT/api/v1/server/ssl/autossl/settings

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

Request body

FieldType
key_typestring
profilestring

Responses

  • 200 OK
    Body
    FieldType
    key_typestring
    profilestring
  • 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 every installed certificate

GET/api/v1/server/ssl/certificates

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

Responses

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

Request a certificate for the server's hostname

POST/api/v1/server/ssl/hostname

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

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

Install a certificate on any domain

POST/api/v1/server/ssl/install

Installs a pasted certificate (with its key) on any site, by domain name.

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

Request body

FieldType
ca_bundlestring
cert_idstring
certificatestring
domainstring
domain_idstring
friendly_namestring
private_keystring

Responses

  • 202 Accepted (runs in the background)
    Body
    FieldType
    account_idstring
    cert_idstring
    job_idstring
    warningsarray 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)
  • 500 Internal Server Error: internal