Skip to content
Myra Online Help Updated · 21 Aug 2026

Adding an SSL/TLS certificate to a domain

Note

If the optional attributes are not set, the system adds a default value.

Note

The body does not contain the attributes id, created, and modified. The values of these attributes are set by the system after the certificate is created.

Note

The attributes for cert and key in the API response are always empty for security reasons.

Sends a POST request to the endpoint /domain/{domainId}/certificates.

Description

The Add-SSL-Certificate request allows the user to add one or more SSL/TLS certificates for a domain to the organisation.

Requirements

Values of the request: Domain ID {domainId}

Objects: SslCertVO, SslIntermediateVOlIntermediateVO

Request

To add SSL/TLS certificates, the Domain-ID {domainId} needs to be added to the path of the HTTP request.

For a detailed specification of which information is required to add an SSL/TLS certificate, the object SslCertVO and SslIntermediateVO with the following attributes need to be defined in the body:

SslCertVO

Attributes Description Values
cert The attribute cert contains the certificate.
key The encrypted private key.
subdomains An array of all subdomains included in the certificate.
intermediates One or more objects SslIntermediateVO.

SslIntermediateVO

Attributes Description Values
cert The attribute cert contains the certificate.
issuer The name of the certificate issuer.

The following attributes are optional:

SslCertVO

Attributes Description Values
subject The subject of the certificate.
algorithm The algorithm used for encryption of the certificate.
validFrom The date as ISO 8601 when the certificate starts to be valid.
validTo The date as ISO 8601 until the certificate is valid.
fingerprint The fingerprint of the certificate.
serialNumber The serial number of the certificate.
subjectAlternatives An array of all subdomains for which the certificate is valid.
certToRefresh The ID of the certificate, to update an existing certificate. This value must be set if you want to replace an old version of the certificate with a newer one.
certRefreshForced Every time a certificate is renewed by another, non-matching certificate, the process is aborted with an error. If certRefreshForced is set, such errors are ignored and the certificate is renewed anyway. Use the attribute only if you are sure that you can ignore an error when renewing a certificate.
  • true
  • false
wildcard The validity of the certificate for multiple subdomains of a domain. The certificate must have a *.domain.tld subject for true to be returned.
  • true
  • false
extendedValidation True if the browser treats the certificate as Extended Validation. Myra uses the OIDs of Google Chrome™ to determine the Extended Validation level.
  • true
  • false
ipList An array of all IPs.
sniAllowed Defines if the Server Name Indication is allowed.
  • true
  • false
password The password to decrypt an encrypted certificate. An encrypted certificate should be in PKCS12 format. In this case, the attribute cert contains a base64-encoded value of the binary encrypted certificate (because binary content cannot be placed in a JSON field). The password field is ignored if the content of the attribute cert is not in PKCS12 format.
managed Defines whether the certificate is managed by Myra. If the certificate is managed by Myra, it cannot be edited via the API and can only be read. The value of the attribute cannot be set when creating or updating a certificate via the API.
  • true
  • false
sslConfigurationName The configuration name from SSLConfiguration table.
comment An individual comment for the entry. string

SslIntermediateVO

Attributes Description Values
subject The subject of the intermediate certificate.
algorithm The algorithm used for encryption of the intermediate certificate.
validFrom The date as ISO 8601 when the intermediate certificate starts to be valid.
validTo The date as ISO 8601 until the intermediate certificate is valid.
fingerprint The fingerprint of the intermediate certificate.
serialNumber The serial number of the intermediate certificate.
comment An individual comment for the entry. string

Refresh a certificate

To renew an existing certificate while keeping the current IP addresses, use the Add-SSL-Certificate request. As the value for the attribute certToRefresh, specify only the ID of the certificate you want to renew.

The system responds by returning the objects SslCertVO and SslIntermediateVO with the information about the new entry.

Example

Example request body:

{
  "objectType": "string",
  "subject": "string",
  "algorithm": "string",
  "validFrom": "string",
  "validTo": "string",
  "cert": "string",
  "fingerprint": "string",
  "serialNumber": "string",
  "comment": "string",
  "subjectAlternatives": [
    "string"
  ],
  "intermediates": [
    {
      "objectType": "string",
      "subject": "string",
      "algorithm": "string",
      "validFrom": "string",
      "validTo": "string",
      "cert": "string",
      "fingerprint": "string",
      "serialNumber": "string",
      "comment": "string",
      "issuer": "string"
    }
  ],
  "key": "string",
  "wildcard": true,
  "extendedValidation": true,
  "ipList": "string",
  "subdomains": "string",
  "certToRefresh": 0,
  "certRefreshForced": true,
  "sniAllowed": true,
  "password": "string",
  "managed": true,
  "multidomain": true,
  "sslConfigurationName": "string",
  "requestId": 0
}

Responses

The following responses are available:

STATUS CODE DESCRIPTION
201 The request has succeeded and a new object has been created.
400 The request was unsuccessful. The request was invalid or information is missing.
401 The request has not succeeded because the user authentication was incorrect.
403 The request has not succeeded because the user does not have the right permissions.