SSL certificates

Add SSL certificate

Changed on

Add an SSL certificate for content delivery over HTTPS protocol.

Enter all strings of the certificate(s) and the private key into one string parameter. Each certificate and the private key in chain should be separated by the "\n" symbol, as shown in the example.

Additionally, you can add a Let's Encrypt certificate. In this case, certificate and private key will be generated automatically after attaching this certificate to your CDN resource.

post/cdn/sslData

Request

  • Base URL
    https://api.gcore.com
  • URL
    https://api.gcore.com/cdn/sslData
  • Auth
    HTTP apikey

Request body

OR

Example request

{
  "name": "Example 1",
  "sslCertificate": "-----BEGIN CERTIFICATE-----\nMIIBbDCCAROgAwIBAgIUQJOOtM8WkOwi9fIMzL0RQttr/JQwCgYIKoZIzj0EAwIw\nKjETMBEGA1UECgwKRXhhbXBsZSBDQTETMBEGA1UEAwwKRXhhbXBsZSBDQTAeFw0y\nNjAxMDEwMDAwMDBaFw0yNzAxMDEwMDAwMDBaMBYxFDASBgNVBAMMC2V4YW1wbGUu\nY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEFPjFz3rezjBUAKZXDcGcZKwl\npcCQmREWxCDWDh1D1PnWoEGmg/eaTpi0j2XsyLeLZYqwkxwcXobnic3cHo4kRKMr\nMCkwJwYDVR0RBCAwHoILZXhhbXBsZS5jb22CD3d3dy5leGFtcGxlLmNvbTAKBggq\nhkjOPQQDAgNHADBEAiALUtTb/Vd2mJb0Ig36VkIpWej3Ufux/EBCY7BNdDNQ4gIg\nfxZsfN96JxEXETedb1Grr1f/6GYPxUnGkKB4Rjj9aTc=\n-----END CERTIFICATE-----\n-----BEGIN CERTIFICATE-----\nMIIBbTCCARKgAwIBAgIULDeBmErpf2HbicPq8M/WK6fUZxEwCgYIKoZIzj0EAwIw\nKjETMBEGA1UECgwKRXhhbXBsZSBDQTETMBEGA1UEAwwKRXhhbXBsZSBDQTAeFw0y\nNjAxMDEwMDAwMDBaFw0zNjAxMDEwMDAwMDBaMCoxEzARBgNVBAoMCkV4YW1wbGUg\nQ0ExEzARBgNVBAMMCkV4YW1wbGUgQ0EwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNC\nAATdtaj2FA1AUBTNxVPfCeuuJWY6D1SQTtCNT3vbakavfJu+QISYQcc0Tbtudl5s\nv6mQPTiVlKOzi5NSWYn9F8YwoxYwFDASBgNVHRMBAf8ECDAGAQH/AgEAMAoGCCqG\nSM49BAMCA0kAMEYCIQD4GWDCyoYDx48b49W/R6ox5K2Dx37otAqQCSeB96moHAIh\nAKAUFyIRFL4HQ1Y3jEELs8TvC2554gcPQKitr0S0wM1g\n-----END CERTIFICATE-----\n",
  "sslPrivateKey": "-----BEGIN PRIVATE KEY-----\nMIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQguJC0fwVmXvhkj9fY\nCTAWhTxcAv4/tcUV+7Qhbvac5WGhRANCAAQU+MXPet7OMFQAplcNwZxkrCWlwJCZ\nERbEINYOHUPU+dagQaaD95pOmLSPZezIt4tlirCTHBxehueJzdwejiRE\n-----END PRIVATE KEY-----\n",
  "validate_root_ca": true
}

Response

Successful.

idinteger

SSL certificate ID.

deletedboolean

Defines whether the certificate has been deleted.

Possible values:

  • true - Certificate has been deleted.
  • false - Certificate has not been deleted.
cert_issuerstring nullable

Name of the certification center issued the SSL certificate.

cert_subject_cnstring nullable

Domain name that the SSL certificate secures.

cert_subject_altstring nullable

Alternative domain names that the SSL certificate secures.

validity_not_beforestring date-time nullable

Date when certificate become valid (ISO 8601/RFC 3339 format, UTC.)

validity_not_afterstring date-time nullable

Date when certificate become untrusted (ISO 8601/RFC 3339 format, UTC.)

sslCertificateChainstring nullable

Parameter is deprecated.

hasRelatedResourcesboolean

Defines whether the SSL certificate is used by a CDN resource or an alias.

Possible values:

  • true - Certificate is used by a CDN resource or an alias.
  • false - Certificate is not used by a CDN resource or an alias.
namestring

SSL certificate name.

automatedboolean

How the SSL certificate was issued.

Possible values:

  • true - Certificate was issued automatically.
  • false - Certificate was added by a user.

Example response

{
  "id": 42,
  "cert_issuer": "Example CA",
  "cert_subject_cn": "example.com",
  "cert_subject_alt": "DNS:example.com,DNS:www.example.com",
  "validity_not_before": "2026-01-01T00:00:00Z",
  "validity_not_after": "2027-01-01T00:00:00Z",
  "hasRelatedResources": true,
  "name": "Example 1"
}

Changes

    • breaking

      removed subschema #2: Let's Encrypt Certificate from the request body anyOf list

    • info

      added to the request body anyOf list

    • info

      added the media type application/json for the response with the status