Submit a certificate check result
const url = 'https://app.hostrepute.com/api/v1/certificate-agent/tasks/01a178db-e1fb-708c-b49d-4d2e638817d7/result';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"status":"pending","host":"intranet.example.com","port":443,"protocol":"https","sni":"intranet.example.com","checked_ip":"192.0.2.40","resolved_ips":["192.0.2.40"],"issuer":"Northwind Internal CA","subject":"CN=intranet.example.com","common_name":"intranet.example.com","sans":["intranet.example.com","wiki.example.com"],"serial_number":"4F1A9C2E7B3D5A60","fingerprint_sha256":"3B7E1C5A9D2F4E6B8A0C1D3E5F7A9B2C4D6E8F0A1B3C5D7E9F1A2B4C6D8E0F2A","signature_algorithm":"sha256WithRSAEncryption","valid_from":"2026-08-01T00:00:00Z","expires_at":"2026-12-10T23:59:59Z","days_remaining":45,"chain_valid":true,"hostname_valid":true,"caa_valid":true,"algorithm_secure":true,"revocation_status":"good","events":[],"diagnostics":null,"error_message":null,"checked_at":"2026-10-26T15:37:18Z"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://app.hostrepute.com/api/v1/certificate-agent/tasks/01a178db-e1fb-708c-b49d-4d2e638817d7/result \ --header 'Content-Type: application/json' \ --data '{ "status": "pending", "host": "intranet.example.com", "port": 443, "protocol": "https", "sni": "intranet.example.com", "checked_ip": "192.0.2.40", "resolved_ips": [ "192.0.2.40" ], "issuer": "Northwind Internal CA", "subject": "CN=intranet.example.com", "common_name": "intranet.example.com", "sans": [ "intranet.example.com", "wiki.example.com" ], "serial_number": "4F1A9C2E7B3D5A60", "fingerprint_sha256": "3B7E1C5A9D2F4E6B8A0C1D3E5F7A9B2C4D6E8F0A1B3C5D7E9F1A2B4C6D8E0F2A", "signature_algorithm": "sha256WithRSAEncryption", "valid_from": "2026-08-01T00:00:00Z", "expires_at": "2026-12-10T23:59:59Z", "days_remaining": 45, "chain_valid": true, "hostname_valid": true, "caa_valid": true, "algorithm_secure": true, "revocation_status": "good", "events": [], "diagnostics": null, "error_message": null, "checked_at": "2026-10-26T15:37:18Z" }'Send the result of a certificate check the agent ran. HostRepute grades the certificate, records the check, updates the certificate’s status and sends any alerts. host, port and protocol, when sent, must match the certificate being checked.
Authenticate with the agent’s token, Authorization: Bearer hrca_…, not a team API token.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The uuid of the check, from GET /api/v1/certificate-agent/tasks.
Example
01a178db-e1fb-708c-b49d-4d2e638817d7Request Bodyrequired
Section titled “Request Bodyrequired”object
The certificate’s health as the agent saw it.
Example
healthyThe host name that was checked.
Example
intranet.example.comThe port that was checked, from 1 to 65535.
Example
443The protocol that was used.
Example
httpsThe Server Name Indication that was sent.
Example
intranet.example.comThe IP address the agent connected to.
Example
192.0.2.40Every IP address the host name resolved to, up to 25.
Example
[ "192.0.2.40"]The certificate’s issuer.
Example
Northwind Internal CAThe certificate’s subject.
Example
CN=intranet.example.comThe certificate’s common name.
Example
intranet.example.comThe certificate’s subject alternative names, up to 100.
Example
[ "intranet.example.com", "wiki.example.com"]The certificate’s serial number.
Example
4F1A9C2E7B3D5A60The SHA-256 fingerprint of the certificate.
Example
3B7E1C5A9D2F4E6B8A0C1D3E5F7A9B2C4D6E8F0A1B3C5D7E9F1A2B4C6D8E0F2AThe certificate’s signature algorithm.
Example
sha256WithRSAEncryptionWhen the certificate became valid (ISO 8601).
Example
2026-08-01T00:00:00ZWhen the certificate expires (ISO 8601).
Example
2026-12-10T23:59:59ZDays until the certificate expires.
Example
45Whether the certificate chain is trusted.
Example
trueWhether the certificate covers the host name.
Example
trueWhether the domain’s CAA records allow the issuer.
Example
trueWhether the signature and key meet modern strength thresholds.
Example
trueThe certificate’s revocation status: good, revoked or unknown.
Example
goodCertificate events the agent noticed, up to 20, from certificate_expiring, certificate_expired, certificate_recovered, hostname_mismatch, chain_invalid, certificate_revoked, connection_failed, fingerprint_changed, caa_missing_or_changed, algorithm_weak and load_balancer_drift. HostRepute also works out events itself by comparing with the last check.
Example
[]Extra details for troubleshooting, up to 50 entries. They’re stored with the check.
object
Example
nullWhat went wrong, when the check failed. Up to 2,000 characters.
Example
nullWhen the agent ran the check (ISO 8601).
Example
2026-10-26T15:37:18ZResponses
Section titled “Responses”object
object
Example
{ "data": { "uuid": "01a178db-e206-73cc-829e-4bf5f55fad0c", "status": "healthy", "certificate_grade": "A", "certificate_score": 100, "events": [], "checked_at": "2026-10-26T15:37:18.000000Z" }}Missing or invalid agent token
object
Example
{ "message": "Invalid certificate agent token."}The check isn’t assigned to this agent
object
Example
{ "message": "No query results for model [App\\Models\\CertificateMonitor] 01a178db-e1fb-708c-b49d-4d2e638817d7"}The result doesn’t match the check
object
object
Example
{ "message": "The result host must match the assigned certificate monitor.", "errors": { "host": [ "The result host must match the assigned certificate monitor." ] }}
