---
title: "POST /certificate-discovery"
method: POST
path: "/certificate-discovery"
tags: ["v2"]
---

# POST /certificate-discovery

`POST /certificate-discovery`

## Request body

- CertificateDiscovery — CertificateDiscovery is a command that discovery certificates
  - `debug` boolean — Debug mode
  - `expiration-event-in` string[] — How many days before the expiration of the certificate would you like to be notified.
  - `hosts` string, required — A comma separated list of IPs, CIDR ranges, or DNS names to discovery
  - `json` boolean — Set output format to JSON
  - `port-ranges` string — A comma separated list of port ranges Examples: "80,443" or "80,443,8080-8090" or "443"
  - `protection-key` string — The name of the key that protects the certificate value
  - `target-location` string, required — The folder where the results will be saved
  - `token` string — Authentication token (see `/auth` and `/configure`)
  - `uid-token` string — The universal identity token, Required only for universal_identity authentication

## Response `200`

CertificateDiscoveryResponse wraps response body.

- CertificateDiscoveryOutput
  - `results` ScanResults — ScanResults contains detailed results from a certificate scan
    - `CountExisting` integer
    - `CountFailed` integer
    - `CountHosts` integer
    - `CountNew` integer
    - `CountSubdomains` integer
    - `Error` string
    - `FailedTargets` TargetError[]
      - `error` string
      - `host` string
      - `port` integer
    - `ItemNames` string[]

## Other responses

- `default` — errorResponse wraps any error to return it as a JSON object with one "error" field.

---

[API](https://skmtc.net/akeyless/apis/akeyless-api.md) · [All operations](https://skmtc.net/akeyless/apis/akeyless-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/akeyless/akeyless-api/versions/0ceb25634501/schema)
