Skip to main content

Certificate Chain API

developer
GET/v1/domain/cert-chain

Retrieves the actual certificate chain sent by the server during a TLS handshake and reports verification and completeness findings. Local trust-store additions are distinguished from certificates actually transmitted by the server.

What It Does

Captures the server-sent certificate chain through a native TLS connection and parses each X.509 certificate. Reports trust verification, chain truncation and missing-link findings. A locally trusted root need not be sent by the server; server-sent provenance is retained instead of reconstructing the chain from CT logs.

Why It's Useful

Expired or misconfigured certificates cause outages and browser warnings. This endpoint lets you monitor certificate expiration, verify deployments, and audit certificate security — all from a single API call. The daysRemaining field enables proactive alerting before certificates expire.

Use Cases

System Administrator

SSL Troubleshooting

Users report certificate warnings. Check if intermediate certificates are properly installed.

Diagnose certificate chain issues causing browser warnings.

DevOps Engineer

Certificate Deployment Verification

After deploying new certificates, verify the complete chain is properly configured.

Catch certificate deployment issues before they affect users.

Security Auditor

Security Assessment

Audit certificate chain configuration as part of infrastructure security review.

Document certificate chain security for compliance reporting.

DevOps Engineer

Certificate Expiration Monitoring

Monitor certificate expiration across your domains using the daysRemaining field to trigger alerts before certificates expire.

Prevent outages caused by expired certificates with proactive monitoring.

Parameters

NameLocationTypeRequiredDescription
domainquerystringRequiredThe domain to validate certificate chain forExample: example.com
portquerynumberOptionalPort to connect to (default: 443)Example: 443

Response Fields

Result fields below are inside the JSON data object. Any row named meta describes the sibling response metadata object. See response and error handling for status codes and error responses. Optional observations may be absent or null; inspect warnings and partial-failure fields before treating a missing result as a negative finding.

FieldTypeDescription
domainstringThe queried domain
portnumberThe port used for connection
chainarrayCertificates actually sent by the server, ordered from leaf toward issuer; the trusted root may be omitted.
chain[].positionnumberZero-indexed position in the chain
chain[].typestringCertificate type: leaf, intermediate, or root
chain[].subjectstringCertificate subject (common name)
chain[].issuerstringCertificate issuer
chain[].validFromstring | nullCertificate validity start date (ISO 8601), or null if unavailable
chain[].validTostring | nullCertificate validity end date (ISO 8601), or null if unavailable
chain[].daysRemainingnumber | nullDays until certificate expires, or null if validity date is unavailable
chain[].serialNumberstring | nullCertificate serial number, or null if unavailable
chain[].signatureAlgorithmstringSignature algorithm (e.g., SHA256withRSA)
chain[].keyTypestring | nullKey type: RSA, ECDSA, or null if unknown
chain[].certificateTypestringCertificate validation level: DV, OV, EV, or null
chain[].sanarraySubject Alternative Names (domains covered)
chain[].isCAbooleanWhether this is a CA certificate
chain[].isSelfSignedbooleanWhether the certificate is self-signed
isCompletebooleanTrue when the server chain was captured without truncation and independent trust verification succeeded.
hasValidRootbooleanWhether chain leads to a trusted root CA
chainLengthnumberNumber of certificates in the chain
issuesarrayChain validation issues: expired, expiring_soon (adaptive window: min(30d, 25% of lifetime, 7d) — scales for short-lived 47/100/200-day certs), not_yet_valid, self_signed_leaf, weak_signature, domain_name_mismatch, chain_partial, chain_incomplete
parsed_chain_sourcestring | nulltls-handshake for the actually captured server-sent chain.
parsed_chain_stopped_reasonstring | nullNative capture/analysis stop reason when applicable, otherwise null.
timestampstringISO 8601 timestamp of when the analysis was performed
server_sent_chainbooleanWhether the actual server-sent chain was captured.
chain_truncatedbooleanWhether chain capture was truncated.

Code Examples

Replace YOUR_API_KEY with your API key. This endpoint requires the developer plan or higher; see plans and usage limits.

cURL
curl --request GET 'https://api.edgedns.dev/v1/domain/cert-chain?domain=example.com' \
  --header "Authorization: Bearer YOUR_API_KEY"
JavaScript
const response = await fetch(
  "https://api.edgedns.dev/v1/domain/cert-chain?domain=example.com",
  {
    "method": "GET",
    "headers": {
      "Authorization": "Bearer YOUR_API_KEY"
    }
  }
);

if (!response.ok) {
  throw new Error(`EdgeDNS returned HTTP ${response.status}`);
}
const data = await response.json();
console.log(data);
Python
import requests

response = requests.request(
    'GET',
    "https://api.edgedns.dev/v1/domain/cert-chain?domain=example.com",
    headers={'Authorization': 'Bearer YOUR_API_KEY'},
    timeout=60,
)
response.raise_for_status()
data = response.json()
print(data)

Read the full Certificate Chain guide

Learn the concepts, choose a practical workflow, and interpret the observations from Certificate Chain before acting on them. Run supported checks via MCP or through REST.

Read the guide →

Related Endpoints

External References

Learn more about the standards and protocols behind this endpoint.

Try This Endpoint

Test the Certificate Chain endpoint live in the playground.

Certificate Chain API Reference | EdgeDNS