Create a New Certificate
To upload new SSL certificate which you have previously generated, send a POST request to /v2/certificates.
When uploading a user-generated certificate, the private_key, leaf_certificate, and optionally the certificate_chain attributes should be provided. The type must be set to custom.
When using Let's Encrypt to create a certificate, the dns_names attribute must be provided, and the type must be set to lets_encrypt.
Request body
Example request
{
"name": "web-cert-01",
"type": "lets_encrypt",
"dns_names": [
"www.example.com",
"example.com"
]
}Response
The response will be a JSON object with a key called certificate. The value of this will be an object that contains the standard attributes associated with a certificate. When using Let's Encrypt, the initial value of the certificate's state attribute will be pending. When the certificate has been successfully issued by Let's Encrypt, this will transition to verified and be ready for use.
Example response
{
"certificate": {
"id": "892071a0-bb95-49bc-8021-3afd67a210bf",
"name": "web-cert-01",
"not_after": "2017-02-22T00:23:00Z",
"sha1_fingerprint": "dfcc9f57d86bf58e321c2c6c31c7a971be244ac7",
"created_at": "2017-02-08T16:02:37Z",
"dns_names": [
"www.example.com",
"example.com"
],
"state": "verified",
"type": "lets_encrypt"
}
}