Skip to main content

Create a certificate

Log in to add to favourites
POST/api/management/certificates/

Parameters

NameParameter typeTypeDescription
private(required)bodystringThis property contains the private key of the certificate in PEM format. The PEM format is a base64 encoded ASCII string enclosed between "-----BEGIN PRIVATE KEY-----" and "-----END PRIVATE KEY-----" markers.
public(required)bodystringThis property contains the public certificate in PEM format. The public certificate includes the public key and additional information about the entity it represents (such as the domain name, the issuing Certificate Authority, and validity dates). The PEM format here is also a base64 encoded ASCII string enclosed between "-----BEGIN CERTIFICATE-----" and "-----END CERTIFICATE-----" markers.
chainbodystring[...]This property contains an array of intermediate certificates (if any) in PEM format. Intermediate certificates form the chain of trust between the end-entity certificate (the public certificate) and the root certificate from a trusted Certificate Authority (CA)

Responses

HTTP status codeReasonModel
200Success
401UnauthorizedError
403ForbiddenError
404Project not foundError
409Resource already existsError
422Validation errorError
500Internal server errorError

Examples

JSON
POST

{
	"private": "-----BEGIN PRIVATE KEY-----...-----END PRIVATE KEY-----",
	"public": "-----BEGIN CERTIFICATE-----\nMIIF/TCCA+WgAwIBAgIULjEg//d4Ivi/g7Jk22R9CvuEm+IwDQYJKoZIhvcNAQEL\nBQAwgY0xCzAJBgNVBAYTAlVLMRMwEQYDVQQIDApTaHJvcHNoaXJlMQ8wDQYDVQQH\nDAZMdWRsb3cxFzAVBgNVBAoMDkZpY3RpdGlvdXMgTHRkMRswGQYDVQQDDBJ3d3cu\nZmljdGl0aW91cy5jb20xIjAgBgkqhkiG9w0BCQEWE2luZm9AZmljdGl0aW91cy5j\nb20wHhcNMjMxMjE4MTE0MjA1WhcNMzMxMjE1MTE0MjA1WjCBjTELMAkGA1UEBhMC\nVUsxEzARBgNVBAgMClNocm9wc2hpcmUxDzANBgNVBAcMBkx1ZGxvdzEXMBUGA1UE\nCgwORmljdGl0aW91cyBMdGQxGzAZBgNVBAMMEnd3dy5maWN0aXRpb3VzLmNvbTEi\nMCAGCSqGSIb3DQEJARYTaW5mb0BmaWN0aXRpb3VzLmNvbTCCAiIwDQYJKoZI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2\nDyMXHRjLbHfUP8vTIf3BPgz+IdKi2R2pRInwvvK0FOkpAwbkc5x2gEWq3GZjTNIw\nZjRtYm5HB7fG2/FODNyAOWpuHNJvyuDCx2rZKt5HXik9buh3kZuBJWerMaHnB28F\nBTh3HD2AQ05hyaGBhqkBwI9+0q5Ch/8SGds4cZpBRQ3VnHMeXyAz0Eo5rpbduXJ7\nYxZ0E01860espo54jNGwgzn0jcGiYbP3rTLha6klso1Q2Mo/6m7ERm95hoyjFF9b\nxohQimMYGoxlr/wX2V9H9kQbNa+wWXAHMb7e5XTribEEnSAGDJeV+mTqyuD26yJN\nuBnSw+tGSa5k8PIXJgYOv6X+2R+9H2NJrYIgynpEKf9i9WBLNG7xzFTaSSW/KhDD\nImi/700EUDINcYR+R6DrKizXGVG0O+WbbsZvrS4Fu8DrGv5UOOoh8co4QDMIS8cV\nF8af+xqATk09j610P+51baHqC023EJzp0LKJ/dvDFkuasq4FZLXHsHGJj4NmMUoi\nuw==\n-----END CERTIFICATE-----",
	"chain": []
}

Still need help?

If you still need help after reading this article, don't hesitate to reach out to the Contensis community on Slack or raise a support ticket to get help from our team.
New support request