> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: Sample Flows

## Article: Sample Flows

## Article Link: https://dev.wix.com/docs/api-reference/account-level/enterprise/site-management/ssl-certificate-v1/sample-flows.md

## Article Content:

# 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](https://dev.wix.com/docs/rest/account-level/sites/sites/query-sites.md) to find the site and retrieve its ID.
1. Issue a certificate from your certificate authority for both `example.com` and `www.example.com`, using a 2048-bit RSA key.
1. Concatenate the private key, the site certificate, and the intermediate certificates into 1 PEM bundle, in that order.
1. Call [Add Certificate](https://dev.wix.com/docs/api-reference/account-level/enterprise/site-management/ssl-certificate-v1/add-certificate.md) 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.
1. Call [Get Active Certificate](https://dev.wix.com/docs/api-reference/account-level/enterprise/site-management/ssl-certificate-v1/get-active-certificate.md) for each domain and compare `serialNumber` with the value from the previous step to confirm the domain serves the new certificate.
1. Store `notAfter` and repeat the flow with a fresh certificate before that date.