SSL Certificate API: Sample Flows

This article presents a possible use case and corresponding sample flow that you can support. It provides a useful starting point as you plan your implementation.

Install your own certificate on a site's domains

An enterprise issues certificates for all of its web properties from its own certificate authority and wants the sites it runs on Wix to serve those certificates too. The certificate covers both the apex domain and its www name.

To install the certificate and confirm the domains serve it:

  1. Call Query Sites to find the site and retrieve its ID.
  2. Issue a certificate from your certificate authority for both example.com and www.example.com, using a 2048-bit RSA key.
  3. Concatenate the private key, the site certificate, and the intermediate certificates into 1 PEM bundle, in that order.
  4. Call Add Certificate with metaSiteId set to the ID from step 1, both domains in domainNames, and the bundle in certificatePem. The response returns the installed certificate, including its serialNumber and notAfter date.
  5. Call Get Active Certificate for each domain and compare serialNumber with the value from the previous step to confirm the domain serves the new certificate.
  6. Store notAfter and repeat the flow with a fresh certificate before that date.

Last updated: 23 September 2026

Did this help?