API reference
SSL/TLS
Certificates, keys, CSRs and AutoSSL.
Run AutoSSL for the account
POST/api/v1/accounts/{id}/autossl
Parameters
| Name | In |
|---|---|
id | path |
Responses
- 202 Accepted (runs in the background)
Body
Field Type 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
Parameters
| Name | In |
|---|---|
id | path |
Responses
- 200 OK
Body
Field Type 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
Parameters
| Name | In |
|---|---|
id | path |
Responses
- 200 OK
Body
Field Type 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
Parameters
| Name | In |
|---|---|
id | path |
Request body
| Field | Type |
|---|---|
ca_bundle | string |
cert_id | string |
certificate | string |
domain_id | string |
friendly_name | string |
private_key | string |
Responses
- 201 Created
Body
Field Type 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}
Parameters
| Name | In |
|---|---|
id | path |
cid | path |
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}
Parameters
| Name | In |
|---|---|
id | path |
cid | path |
Responses
- 200 OK
Body
Field Type 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
Parameters
| Name | In |
|---|---|
id | path |
Request body
| Field | Type |
|---|---|
ca_bundle | string |
cert_id | string |
certificate | string |
domain_id | string |
friendly_name | string |
private_key | string |
Responses
- 200 OK
Body
Field Type chain_certsalwaysinteger covers_domainboolean domainsalwaysarray of string issueralwaysstring key_matchalwaysboolean key_storedalwaysboolean not_afteralwaysinteger not_beforealwaysinteger validationalwaysstring warningsalwaysarray 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
Parameters
| Name | In |
|---|---|
id | path |
Responses
- 200 OK
Body
Field Type 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
Parameters
| Name | In |
|---|---|
id | path |
Request body
| Field | Type |
|---|---|
domains | array of string |
friendly_name | string |
key_id | string |
key_type | string |
subject | HostingCSRSubject |
Responses
- 201 Created
Body
Field Type 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}
Parameters
| Name | In |
|---|---|
id | path |
cid | path |
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
Parameters
| Name | In |
|---|---|
id | path |
Request body
| Field | Type |
|---|---|
ca_bundle | string |
cert_id | string |
certificate | string |
domain_id | string |
friendly_name | string |
private_key | string |
Responses
- 202 Accepted (runs in the background)
Body
Field Type 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}
Parameters
| Name | In |
|---|---|
id | path |
did | path |
Responses
- 202 Accepted (runs in the background)
Body
Field Type 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
Parameters
| Name | In |
|---|---|
id | path |
Responses
- 200 OK
Body
Field Type 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
Parameters
| Name | In |
|---|---|
id | path |
Request body
| Field | Type |
|---|---|
friendly_name | string |
pem | string |
type | string |
Responses
- 201 Created
Body
Field Type 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}
Parameters
| Name | In |
|---|---|
id | path |
kid | path |
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}
Parameters
| Name | In |
|---|---|
id | path |
kid | path |
Responses
- 200 OK
Body
Field Type 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
Responses
- 200 OK
Body
Field Type 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
Request body
| Field | Type |
|---|---|
account_id | string |
hostname | boolean |
Responses
- 202 Accepted (runs in the background)
Body
Field Type 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
Parameters
| Name | In |
|---|---|
limit | query |
status | query |
Responses
- 200 OK
Body
Field Type 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
Parameters
| Name | In |
|---|---|
jid | path |
Responses
- 200 OK
Body
Field Type 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
Request body
| Field | Type |
|---|---|
key_type | string |
profile | string |
Responses
- 200 OK
Body
Field Type 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
Responses
- 200 OK
Body
Field Type 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
Responses
- 202 Accepted (runs in the background)
Body
Field Type 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.
Request body
| Field | Type |
|---|---|
ca_bundle | string |
cert_id | string |
certificate | string |
domain | string |
domain_id | string |
friendly_name | string |
private_key | string |
Responses
- 202 Accepted (runs in the background)
Body
Field Type 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