API reference
SSL certificate
POST /ssl connects to a host on port 443 and returns its certificate: trust, names covered, expiry, issuer, key, protocol, cipher, chain and HSTS.
https://api.qelka.com/v1/sslRead the TLS certificate a host serves on port 443: whether the chain is trusted and why not, whether it covers the name, when it expires, who issued it, the key, the protocol and cipher agreed, the chain the server sent and its HSTS header. Each check costs 1 credit when a certificate was read; hosts that do not answer, errors and test keys are never billed.
Request
Send a host name, or any URL whose host should be checked. Only the host is used: the scheme, path, query and port are dropped, and port 443 is always checked.
hoststringRequiredexample.com, www.example.com) or a URL, 1 to 2,048 characters. IP addresses are refused.freshbooleanDefault falsetrue skips the 1-hour result cache and checks the host again.Only public hosts are checked. An IP address, localhost, a name under a reserved suffix such as .local or .internal, or a host that resolves only to private or reserved addresses is a 422 unprocessable_input. A name that does not exist in DNS is a 422 unprocessable_input too, with a message that says so. The TLS connection has a 6-second limit, so every snippet sets a 30-second client timeout.
curl https://api.qelka.com/v1/ssl \
--max-time 30 \
-H "Authorization: Bearer $QELKA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"host": "github.com"}'
const response = await fetch('https://api.qelka.com/v1/ssl', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.QELKA_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ host: 'github.com' }),
signal: AbortSignal.timeout(30_000),
})
const result = await response.json()
console.log(result)
import os
import requests
api_key = os.environ["QELKA_API_KEY"]
response = requests.post(
"https://api.qelka.com/v1/ssl",
headers={"Authorization": f"Bearer {api_key}"},
json={"host": "github.com"},
timeout=30,
)
result = response.json()
print(result)
<?php
$ch = curl_init('https://api.qelka.com/v1/ssl');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('QELKA_API_KEY'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode(['host' => 'github.com']),
CURLOPT_TIMEOUT => 30,
]);
$result = json_decode(curl_exec($ch), true);
print_r($result);
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
"os"
"time"
)
func main() {
payload, _ := json.Marshal(map[string]any{"host": "github.com"})
request, _ := http.NewRequest(http.MethodPost, "https://api.qelka.com/v1/ssl", bytes.NewReader(payload))
request.Header.Set("Authorization", "Bearer "+os.Getenv("QELKA_API_KEY"))
request.Header.Set("Content-Type", "application/json")
client := &http.Client{Timeout: 30 * time.Second}
response, err := client.Do(request)
if err != nil {
panic(err)
}
defer response.Body.Close()
var result map[string]any
if err := json.NewDecoder(response.Body).Decode(&result); err != nil {
panic(err)
}
fmt.Println(result)
}
require 'json'
require 'net/http'
uri = URI('https://api.qelka.com/v1/ssl')
request = Net::HTTP::Post.new(uri)
request['Authorization'] = "Bearer #{ENV.fetch('QELKA_API_KEY')}"
request['Content-Type'] = 'application/json'
request.body = JSON.generate({ host: 'github.com' })
response = Net::HTTP.start(uri.host, uri.port, use_ssl: true, read_timeout: 30) do |http|
http.request(request)
end
result = JSON.parse(response.body)
puts result
Response
Every public host that resolves gets a 200. Read status first: valid and invalid mean a certificate was read.
idstringlkp_ followed by 26 characters.objectstringssl.inputstringhost you sent, without surrounding spaces.hoststringportinteger443.ipstring or nullstatusstringvalid, invalid, unreachable or handshake_failed.issuesarray of stringstrustedboolean or nulltrue when the chain the server sent leads to a root of the Mozilla CA store bundled with Node.js. null when no certificate was read.trust_errorstring or nullexpired, not_yet_valid, self_signed, self_signed_in_chain, unknown_issuer, incomplete_chain, revoked, invalid_signature or other.hostname_matchboolean or nulltrue when a subject alternative name, or the common name when there is none, covers the host, wildcards per RFC 6125.protocolstring or nullTLSv1.3.cipherstring or nullalpnstring or nullh2 or http/1.1.certificateobject or nullnull when none was read.certificate.subjectobjectcommon_name, organization and country of the certificate, each a string or null.certificate.issuerobjectcommon_name, organization and country of the authority that signed it.certificate.sansarray of stringscertificate.serial_numberstringcertificate.fingerprint_sha256stringcertificate.valid_fromstringcertificate.valid_tostringcertificate.days_to_expiryintegervalid_to; negative once expired.certificate.key_typestring or nullrsa, ec, ed25519, ed448 or dsa.certificate.key_bitsinteger or nullcertificate.self_signedbooleantrue when the certificate signed itself.chainarray of objectssubject, issuer (common name, or organization when there is none), valid_to and self_signed.hstsobject or null/: present, max_age in seconds, include_subdomains, preload and header as sent. null when no HTTP response was read.http_statusinteger or null/.checked_atstringcredits_usedinteger0.cachedbooleantrue when the answer came from the 1-hour cache.{
"id": "lkp_01M8CGD1XX5EWYG0XXJ98VVGBS",
"object": "ssl",
"input": "github.com",
"host": "github.com",
"port": 443,
"ip": "140.82.114.4",
"status": "valid",
"issues": [],
"trusted": true,
"trust_error": null,
"hostname_match": true,
"protocol": "TLSv1.3",
"cipher": "TLS_AES_128_GCM_SHA256",
"alpn": "h2",
"certificate": {
"subject": {
"common_name": "github.com",
"organization": null,
"country": null
},
"issuer": {
"common_name": "Sectigo Public Server Authentication CA DV E36",
"organization": "Sectigo Limited",
"country": "GB"
},
"sans": ["github.com", "www.github.com"],
"serial_number": "3E1D6026B4B0AEA279DCA2EFBBCED82B",
"fingerprint_sha256": "7D:C4:D8:5C:F1:E3:10:97:12:25:BC:9A:92:57:67:90:43:A2:43:D7:0A:3C:C2:A9:1C:C5:D3:89:89:2C:27:76",
"valid_from": "2026-10-30T00:00:00.000Z",
"valid_to": "2027-01-27T23:59:59.000Z",
"days_to_expiry": 62,
"key_type": "ec",
"key_bits": 256,
"self_signed": false
},
"chain": [
{
"subject": "github.com",
"issuer": "Sectigo Public Server Authentication CA DV E36",
"valid_to": "2027-01-27T23:59:59.000Z",
"self_signed": false
},
{
"subject": "Sectigo Public Server Authentication CA DV E36",
"issuer": "Sectigo Public Server Authentication Root E46",
"valid_to": "2036-03-21T23:59:59.000Z",
"self_signed": false
},
{
"subject": "Sectigo Public Server Authentication Root E46",
"issuer": "USERTrust ECC Certification Authority",
"valid_to": "2038-01-18T23:59:59.000Z",
"self_signed": false
},
{
"subject": "USERTrust ECC Certification Authority",
"issuer": "USERTrust ECC Certification Authority",
"valid_to": "2038-01-18T23:59:59.000Z",
"self_signed": true
}
],
"hsts": {
"present": true,
"max_age": 31536000,
"include_subdomains": true,
"preload": true,
"header": "max-age=31536000; includeSubdomains; preload"
},
"http_status": 200,
"checked_at": "2026-11-26T18:03:08.092Z",
"credits_used": 1,
"cached": false
}
Act on the status
status |
What it means | What to do | Billed |
|---|---|---|---|
valid |
The chain is trusted, the certificate covers the host and is within its validity dates. | Read issues for warnings such as expires_soon. |
Yes, cached 1 hour |
invalid |
A TLS session was set up but at least one of those checks failed. | Read trust_error and issues, then fix the server configuration. |
Yes, cached 1 hour |
unreachable |
No TCP connection on port 443 within the timeout, or the connection was reset. | Check that the site serves HTTPS, or try again later. | No |
handshake_failed |
The host answered on port 443 but no TLS session could be set up, for example a server that only speaks plain HTTP on 443 or supports no common cipher. | Check the TLS configuration of the server. | No |
Issues
| Issue | Kind | Meaning |
|---|---|---|
expired |
Error | valid_to is in the past. |
not_yet_valid |
Error | valid_from is in the future. |
hostname_mismatch |
Error | No name of the certificate covers the host. |
self_signed |
Error | The site certificate signed itself. |
untrusted_root |
Error | The chain leads to a root that is not in the store, or to a self-signed certificate in the chain. |
incomplete_chain |
Error | The server did not send the intermediate certificates needed to reach a root. |
revoked |
Error | Reported only when the TLS library says so; OCSP and CRL are not queried. |
invalid_signature |
Error | A signature in the chain does not verify. |
untrusted |
Error | Any other trust failure. |
expires_soon |
Warning | 30 days or fewer left before valid_to. |
weak_key |
Warning | RSA or DSA key below 2048 bits, or EC key below 256 bits. |
legacy_protocol |
Warning | SSLv3, TLS 1.0 or TLS 1.1 was agreed. |
no_hsts |
Warning | The HTTPS response sends no Strict-Transport-Security header, or one with max-age 0. |
How the host is checked
- The host is resolved over DNS. Hosts whose addresses are all private or reserved are refused; otherwise the first public IPv4 address is used, else the first public IPv6 address.
- A Node.js server opens a TLS connection to port 443 of that address with the host as SNI and ALPN
h2, http/1.1, within 6 seconds, and reads the chain as sent. - The chain is verified against the Mozilla CA root store bundled with Node.js, and the names are matched against the host.
- One HTTPS
GET /reads the Strict-Transport-Security header; its body is not read.
Revocation is not checked. A host served from several addresses, such as a CDN, can present another certificate on another address.
Batch and bulk
Send up to 100 hosts in one batch with "type": "ssl", or a CSV column of hosts as a bulk job: the output adds the status, address, trust, issuer, validity dates, days to expiry, protocol, HSTS and issues of each host. The MCP tool is check_ssl.