Associate one or multiple domains with the certificate provided. See the SSL guide for more information.
This endpoint is available to API users with the system-owner
or brand-admin
roles. The brand-admin
role is restricted to domains mapped to sites associated with their brand.
Only use this endpoint over HTTPS.
You can provide the certificate chain as the cert
but it must be in reverse order (as is typical for nginx). The first certificate must correspond to the provided private key.
From 7.104 you can also specify the intermediates using the parameter intermediates . If intermediates is populated intermediates provided on cert will be ignored.
The private key must begin with -----BEGIN PRIVATE KEY-----
and end with -----END PRIVATE KEY-----
. In 7.95, RSA PRIVATE KEY
is also accepted.
key string
Required. PEM formatted private key.
cert string
Required. PEM formatted certificate.
domains Array
List of additional domains.
intermediates Array
List of intermediates.
Content-Type: application/json
{
" cert " : " -----BEGIN CERTIFICATE----- \n MIIDXTCCAkWgAwIBAgIJAJzF83HrOtgIMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV \n BAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBX \n aWRnaXRzIFB0eSBMdGQwHhcNMTYwNzI3MTQ1NzI4WhcNMTYwODA2MTQ1NzI4WjBF \n MQswCQYDVQQGEwJBVTETMBEGA1UECAwKU29tZS1TdGF0ZTEhMB8GA1UECgwYSW50 \n ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB \n CgKCAQEA5k3MeLJUSK52Oqzz5vdNVZOqkLJNUZueLomO+fMFJXhAGjfFZPkgLD+B \n bNWxHD/AcydOe31tJvD0TAH4gFz+wpVk3DA50KN5crN69YQrUQHvYxOxSBUq+TXB \n 8vvL+3/W1JzvwY6r4jUVpLwQaUsfUWxWner0CG9cbrK3dK6nSAhdIzuh2NMwINbs \n yNEv/QXuH0UYpcBNuzYJPwsNzpIoqQSCu2l43E9n1zNRBK7AjkYH4bpZWiGdYLlO \n eRqTkSpGg7KmeyQt+8q59n0IUOhR+6R/xz1Fsm9ZhPiEeO9a78d7qaNqWqNrnPIs \n MHhFB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ZzEGb \n lk82UOdJR3BRS8BqDKbRAktxTd35jaCdca/f3mkvrZ7a6jYgs7iD/xlaGtS6vTkz \n bZArr0TwEz+uvMU4YTtaMCA= \n -----END PRIVATE KEY----- " ,
" domains " : [ " mydomain.com " , " yourdomain.co.uk " ]
}
Response
DELETE /ssl-certs/:domain
Remove domain association with a certificate.
This endpoint is available to API users with the system-owner
or brand-admin
roles. The brand-admin
role is restricted to domains mapped to sites associated with their brand.
Only use this endpoint over HTTPS.
This endpoint was added in 7.94.
Response
POST /ssl-certs/:domain/domain-validation
Add domain validation key and value for certificate authorities to validate domain ownership.
hash string
Required. Hash key.
content string
Required. Content value.
Content-Type: application/json
{
" hash " : " v77kf9su7gz680vrwv8q0z39vy9prk4z " ,
" content " : " vxnjsk4f19mtx66fitv4mbcrfkplxwx8 " ,
}
Response
Example
Endpoint call
POST / ssl - certs / mydomain . com / domain - validation
{
" hash " : " foo " ,
" content " : " vxnjsk4f19mtx66fitv4mbcrfkplxwx8 " ,
}
Check validation
GET http : //mydomain.com/.well-known/pki-validation/fileauth/foo
vxnjsk4f19mtx66fitv4mbcrfkplxwx8