> 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

# GetActiveCertificate

# Package: siteManagement

# Namespace: SslCertificateService

# Method link: https://dev.wix.com/docs/api-reference/account-level/enterprise/site-management/ssl-certificate-v1/get-active-certificate.md

## Permission Scopes:
Manage Site SSL & Publish State: SCOPE.ENTERPRISE.MANAGE-SITE-PROXY

## Introduction

Retrieves the certificate a domain currently serves.

The call fails when the domain has no installed certificate.

---

## REST API

### Schema

```
 Method: getActiveCertificate
 Description: Retrieves the certificate a domain currently serves.  The call fails when the domain has no installed certificate.
 URL: https://www.wixapis.com/enterprise-public-proxy/v1/ssl-certificates/active
 Method: GET
 Method parameters:
   query param name: domainName | type: domainName | description: Domain to look up. For example, `www.example.com`.  | validation: format HOSTNAME
   query param name: metaSiteId | type: metaSiteId | description: GUID of the site the domain is connected to.  | validation: format GUID
 Return type: GetActiveCertificateResponse
  - name: certificate | type: SslCertificate | description: Certificate the domain currently serves.  
     - name: id | type: string | description: Certificate GUID. Derived from the certificate's common name.  | validation: maxLength 253
     - name: metaSiteId | type: string | description: GUID of the site the certificate is installed for.  | validation: format GUID
     - name: commonName | type: string | description: Common name in the certificate's subject.  | validation: maxLength 253
     - name: dnsNames | type: array<string> | description: Domains the certificate covers, as listed in its subject alternative names.  | validation: maxItems 100, maxLength 253
     - name: issuer | type: string | description: Certificate authority that issued the certificate.  | validation: maxLength 512
     - name: notBefore | type: string | description: Date and time the certificate becomes valid.  | validation: format date-time
     - name: notAfter | type: string | description: Date and time the certificate expires.  | validation: format date-time
     - name: serialNumber | type: string | description: Certificate serial number, hex-encoded.  | validation: maxLength 128


```

### Examples

### Retrieve the certificate a domain serves
Looks up the certificate currently served for the www name of a site's domain.

```curl
curl -X GET \
'https://www.wixapis.com/enterprise-public-proxy/v1/ssl-certificates/active?metaSiteId=e53fb2f8-c5c5-4595-ab5d-47a1e8cbe3fd&domainName=www.example.com' \
-H 'Authorization: <AUTH>' \
-H 'wix-account-id: <ACCOUNT_ID>'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.enterpriseSiteManagement.sslCertificates.getActiveCertificate(options)
 Description: Retrieves the certificate a domain currently serves.  The call fails when the domain has no installed certificate.
 Method parameters:
   param name: options | type: GetActiveCertificateOptions  none  
        - name: metaSiteId | type: string | description: GUID of the site the domain is connected to.  | validation: format GUID
        - name: domainName | type: string | description: Domain to look up. For example, `www.example.com`.  | validation: format HOSTNAME
 Return type: PROMISE<GetActiveCertificateResponse>
  - name: certificate | type: SslCertificate | description: Certificate the domain currently serves.  
     - name: _id | type: string | description: Certificate GUID. Derived from the certificate's common name.  | validation: maxLength 253
     - name: metaSiteId | type: string | description: GUID of the site the certificate is installed for.  | validation: format GUID
     - name: commonName | type: string | description: Common name in the certificate's subject.  | validation: maxLength 253
     - name: dnsNames | type: array<string> | description: Domains the certificate covers, as listed in its subject alternative names.  | validation: maxItems 100, maxLength 253
     - name: issuer | type: string | description: Certificate authority that issued the certificate.  | validation: maxLength 512
     - name: notBefore | type: Date | description: Date and time the certificate becomes valid.  
     - name: notAfter | type: Date | description: Date and time the certificate expires.  
     - name: serialNumber | type: string | description: Certificate serial number, hex-encoded.  | validation: maxLength 128


```

### Examples

### Retrieve the certificate a domain serves
Looks up the certificate currently served for the www name of a site's domain.

```javascript
import { sslCertificates } from "@wix/enterprise-site-management";

async function getActiveCertificate() {
  const response = await sslCertificates.getActiveCertificate({
    metaSiteId: "e53fb2f8-c5c5-4595-ab5d-47a1e8cbe3fd",
    domainName: "www.example.com",
  });
}

/* Promise resolves to:
 * {
 *   "certificate": {
 *     "_id": "example.com",
 *     "metaSiteId": "e53fb2f8-c5c5-4595-ab5d-47a1e8cbe3fd",
 *     "commonName": "example.com",
 *     "dnsNames": ["example.com", "www.example.com"],
 *     "issuer": "C=US, O=Example CA, CN=Example CA Intermediate R3",
 *     "notBefore": "2026-09-15T08:06:46.000Z",
 *     "notAfter": "2026-12-14T08:06:45.000Z",
 *     "serialNumber": "05ba7647c217dc50ae0ecd3d3fa880d0351f"
 *   }
 * }
 */

```

### getActiveCertificate (self-hosted)
Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { sslCertificates } from '@wix/enterprise-site-management';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { sslCertificates },
  // Include the auth strategy and host as relevant
});


async function getActiveCertificate(options) {
  const response = await myWixClient.sslCertificates.getActiveCertificate(options);
};
```

---