TLS certificate
POST /api/tls-certInspect the TLS certificate of any public host: subject, issuer, validity window, days remaining, SANs, and SHA-256 fingerprint. Send POST /api/tls-cert with the required field host and pay $0.001 per call over x402 or MPP (there is no free tier). It returns a JSON object with host, issuer, validTo, daysRemaining and altNames.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
host | string | yes | Hostname (port 443) Also accepted as hostname, domain, site, server. |
Example request
curl -i -X POST https://agent402.tools/api/tls-cert \
-H "Content-Type: application/json" \
-d '{"host":"example.com"}'Without payment this returns HTTP 402 Payment Required with the exact price for tls-cert; any x402 v2 or MPP client pays it and retries.
Example response
{
"host": "example.com",
"issuer": "DigiCert",
"validTo": "2027-01-01T00:00:00.000Z",
"daysRemaining": 204,
"altNames": [
"example.com"
]
}| Field | Type | Always present | In the example |
|---|---|---|---|
host | string | yes | example.com |
issuer | string | yes | DigiCert |
validTo | string | yes | 2027-01-01T00:00:00.000Z |
daysRemaining | number | yes | 204 |
altNames | array of string | yes | 1 item in the example |
From an MCP client
catalog.call {
"slug": "tls-cert",
"params": {
"host": "example.com"
}
}The hosted connector at https://agent402.tools/mcp needs a payment for tls-cert; the stdio package pays it from a wallet or from an AGENT402_CREDITS_KEY issued earlier. Local install: npx -y agent402-mcp@0.13.32.
Errors and behavior
hostis required. An input the tool rejects returns an HTTP 4xx whose body carrieserror,tool,expected,requiredandexample, so the caller can correct it.- A paid call that ends in any status of 400 or above is not charged over x402, MPP or a prepaid credits key: settlement runs after the tool and only on a successful response. The exception is a Tempo push credential, a transfer the buyer sent before the call: it settles before the tool runs, so if the tool then fails the payment is recorded as a refund owed to the paying wallet.
- Wallet-only: this tool reaches the network or stored state, so it has no proof-of-work tier. A prepaid card-credits key issued earlier (
Authorization: Bearer a402_...) also pays it. - A
GETorHEADto /api/tls-cert returns the same 402 quote, so the price can be read without a body. - An
Idempotency-Keyheader makes a retried paid call replay the first 200 instead of charging again (an answer larger than 1 MB is not replayed).
Paid call (JavaScript agent)
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client();
client.setSpendControls?.({ maxAmountPerPayment: "$0.001" }); // refuse any quote above this tool's price
registerExactEvmScheme(client, { signer: privateKeyToAccount(KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);
const res = await payFetch("https://agent402.tools/api/tls-cert", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"host": "example.com"
}),
});Part of these workflows
TLS certificate is one step in these 8 skill packs, each sold as a single call:
- Security audit - Security audit skill: one call runs the external checks in sequence and returns each step's own result: certificate transparency log, DNS records, SPF, DMARC, HTTP security headers, TLS certificate and tech stack. Per-step findings with no grade or written report.
- Fraud signals - Is this domain trustworthy, or is it a phishing site / typosquat / scam? Pull the reputation signals an analyst checks before clicking anything: domain age, cert issuance history, hosting reputation, DNS topology, tech-stack fingerprint, and page-content red flags. Different from a security audit - this is about whether the domain is what it claims to be.
- Site status snapshot - The 'is this site healthy, addressable, and crawlable - right now?' workflow. DNS resolution → HTTP reachability → security headers → TLS certificate expiry → robots policy. Five tools, one structured status payload an operator (or an uptime bot, or a pre-flight check before an extract/crawl) can act on.
- Technical SEO audit - Can search engines and AI crawlers actually index this page? One pass over reachability, TLS, robots policy, sitemap health, meta/OpenGraph tags, and the on-page link graph.
- Domain intel - Full domain security and SEO intelligence in one call: WHOIS, DNS, TLS cert, HTTP headers, tech stack, robots policy, and certificate transparency.
- SSL audit - SSL audit skill: one parallel call returns the site's SSL details (issuer, expiry, names), its HTTP security headers and the CAA DNS records that say who may issue for it.
- API health check - Is this API endpoint healthy? Liveness check, response headers, and TLS certificate status in one pass.
- Domain age and legitimacy - How old and legit is this domain? WHOIS registration, DNS resolution, and TLS certificate in one pass.
Related tools
Certificate transparency search
Search public Certificate Transparency logs for every cert issued to a domain.
ASN + IP geolocation
Look up the Autonomous System (ASN), prefix, country, registry, and allocation date for an IPv4 address.
HTTP headers + security analysis
Fetch a URL and return every response header plus a security analysis: HSTS, CSP, X-Frame-Options.
Tech stack detection
Detect the technology stack of a public website: CDN, web server, language/runtime, frontend framework (Next.js, Nuxt.
Domain security & deliverability audit (graded)
Hand over a domain and get one graded, model-backed security & email-deliverability audit: SPF, DMARC, DKIM and MX (why.
Domain security audit - PRO (attack surface + stack)
The deeper tier (model-backed): everything in the standard audit plus the attack surface from Certificate Transparency.