mcp

Get the most recent currently-valid certificate for a domain

Returns the latest certificate associated with the given domain name, wrapped in {cert: <detail>}.

Validity semantics (task #772): currently-valid certificates (not_after in the future) are always preferred. Precert semantics (task #776): by default (include_precerts=false) a final leaf always beats ANY precertificate — a precert is only returned when the index holds no final cert for the domain at all. Pass include_precerts=true to let precerts compete on equal terms (newest not_before wins, with the final leaf still preferred over its own precert twin on ties). Only when the index holds NO currently-valid certificate for the domain is an expired one returned — and then the response carries an explicit top-level warning field noting that the returned cert's not_after is in the past (the live cert may simply not have been ingested yet). Never render this endpoint's output in alerting UX without honoring that warning.

raw_pem is always null here (by design): raw certificate bytes live in cold storage and are deliberately excluded from domain-shaped tools to keep LLM context small (task #66). To get the PEM body, take cert.sha256 from this response and call get_certificate with include_raw=true.

Self-healing for cold domains (task #113 / GH #266): unlike the v1 REST route, this tool does NOT raise HTTP 404 when no cert is found — it returns {cert: null, backfill_status: ...} so the LLM can decide whether to retry. When backfill_status == 'in_progress', wait retry_after_seconds seconds and call this tool again. Use eta_basis for the stopping rule: 'live' = measured ETA; 'jobs_coarse' = coarse estimate from job-completion rate; 'unknown' = no projection — terminal_at_latest (ISO-8601 UTC) and seconds_until_terminal give the concrete stop point. in_progress_over_budget (no retry_after_seconds) means the projection exceeds the interactive budget — do NOT poll in a loop. Any other status means the result will not change on retry.

get/mcp-api/get_latest_cert/{domain}

Request

  • Base URL: https://api.ctindex.io
  • URL: https://api.ctindex.io/mcp-api/get_latest_cert/{domain}
  • Auth: one of:
    • API key in header X-API-Key
    • HTTP bearer

Path parameters

domainstring required

Query parameters

include_enrichmentboolean

When true, attach RDAP + DNS + ASN/hosting context for the domain under cert.enrichment (task #501).

include_signalsboolean

When true, attach derived attribution signals under cert.enrichment.signals: issuer_diversity_score, wildcard_breadth, third_party_vendors, and weak_crypto_reasons. Implies enrichment computation. Requires a paid plan (Pro or higher); the free tier receives HTTP 403 tier_not_entitled.

include_precertsboolean

When false (default), a final (leaf) certificate is always preferred over ANY precertificate; a precert is returned only when the index holds no final cert for the domain. When true, precerts compete on equal terms (newest issuance wins even if only its precert has been observed).

wait_for_backfillboolean

When false, cold domains return a 'not_indexed' sentinel immediately without triggering a background backfill. Default true preserves the existing self-healing behaviour.

Cookies

ctix_sessionstring nullable

Response

Successful Response

backfill_statusstring nullable
retry_after_secondsinteger nullable
hintstring nullable
progressobject nullable
typical_eta_secondsinteger nullable
eta_secondsinteger nullable
eta_basisstring nullable
index_freshnessobject nullable
warningstring nullable

Changes

No recorded changes to this operation across all 1 revision of this API.