Create Certificate

POST {{gateway}}/certificates

Create Certificate konghq

  • A certificate object represents a public certificate, and can be optionally paired with the corresponding private key. These objects are used by Kong to handle SSL/TLS termination for encrypted requests, or for use as a trusted CA store when validating peer certificate of client/service. Certificates are optionally associated with SNI objects to tie a cert/key pair to one or more hostnames.
  • If intermediate certificates are required in addition to the main certificate, they should be concatenated together into one string according to the following order: main certificate on the top, followed by any intermediates.
  • Certificates can be both tagged and filtered by tags.

Request Body

AttributesMandatoryTypeDescription
certrequiredbodyPEM-encoded public certificate chain of the SSL key pair.
keyrequiredbodyPEM-encoded private key of the SSL key pair.
tagsoptionalbodyAn optional set of strings associated with the Certificate, for grouping and filtering.
snisoptionalbodyAn array of zero or more hostnames to associate with this certificate as SNIs. This is a sugar parameter that will, under the hood, create an SNI object and associate it with this certificate for your convenience. To set this attribute this certificate must have a valid private key associated with it.

Request Body

{"cert"=>"-----BEGIN CERTIFICATE-----...", "key"=>"-----BEGIN RSA PRIVATE KEY-----...", "tags"=>["user-level", "low-priority"]}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring