SSL

Checagem de certificado

Conecta na porta 443 de um domínio e devolve o que o certificado TLS diz: emissor, validade, SANs, e se está expirado ou autoassinado.

Certificate check

Connects to a domain's port 443 and reports what the TLS certificate says: issuer, validity window, SANs, and whether it's expired or self-signed.

SYNC resposta na mesma chamada answers in the same call

Endpoint

Endpoint

GET /api/v1/ssl/{domain} inspeciona o certificado de um domínio inspects a domain's certificate

A conexão não exige que a cadeia de certificação seja válida. O objetivo é reportar problemas (expirado, autoassinado, hostname que não bate), não recusar-se a olhar um certificado que já está com defeito.

The connection doesn't require a valid certificate chain. The goal is to report problems (expired, self-signed, hostname mismatch), not refuse to look at a certificate that's already broken.

Parâmetros

Parameters

NomeNameOndeInDescriçãoDescription
domain path domínio válido, sem https:// (ex.: exemplo.com.br) a valid domain, without https:// (e.g. example.com)

Exemplo

Example

curl https://api.alicercelabs.com.br/api/v1/ssl/google.com \
          -H "Authorization: Bearer <token>"
{
          "success": true,
          "data": {
            "domain": "google.com",
            "issuer": "CN=WR2,O=Google Trust Services,C=US",
            "subject": "CN=*.google.com",
            "not_before": "2026-08-05T20:42:14Z",
            "not_after": "2026-10-28T20:42:13Z",
            "days_until_expiry": 67,
            "sans": ["*.google.com", "..."],
            "is_expired": false,
            "is_self_signed": false,
            "is_valid": true
          },
          "meta": { "elapsed_ms": 59, "request_id": "..." }
        }

Erros possíveis

Possible errors

StatusMotivoReason
400domínio inválidoinvalid domain
401token ausente ou inválidomissing or invalid token
429limite de taxa excedidorate limit exceeded
503não foi possível conectar em {domain}:443 (host inexistente, porta fechada, timeout)couldn't connect to {domain}:443 (nonexistent host, closed port, timeout)

Usando o SDK

Using the SDK

Um método só: validade, emissor e SANs do certificado TLS.

Just one method: validity, issuer and SANs of the TLS certificate.

SDKs oficiais: Go · Python · JavaScript.

Official SDKs: Go · Python · JavaScript.

Checar um certificado

Check a certificate

import (
	"context"
	"fmt"

	alicercelabs "github.com/alicercelabs/alicercesdk-go"
)

client := alicercelabs.New("alk_...")
ctx := context.Background()

res, err := client.SSL.Check(ctx, "alicercelabs.com.br")
if err != nil {
	panic(err)
}
fmt.Println(res.Issuer, res.DaysUntilExpiry)
if res.IsSelfSigned {
	fmt.Println("atenção: certificado autoassinado")
}
from alicercelabs import AlicerceLabs

client = AlicerceLabs(api_key="alk_...")

res = client.ssl.check("alicercelabs.com.br")
print(res["issuer"], res["days_until_expiry"])
if res["is_self_signed"]:
    print("atenção: certificado autoassinado")
import { AlicerceLabs } from "alicercesdk-javascript";

const client = new AlicerceLabs("alk_...");

const res = await client.ssl.check("alicercelabs.com.br");
console.log(res.issuer, res.days_until_expiry);
if (res.is_self_signed) console.log("atenção: certificado autoassinado");

Limites

Limits

100/dia · 4/hora sem token, por IP chamador; com uma API key (gerada no painel), 1.000/dia · 41/hora. Resultado em cache por 1h, curto de propósito, já que certificados podem ser renovados ou revogados a qualquer momento.

100/day · 4/hour without a token, per calling IP; with an API key (generated in the panel), 1,000/day · 41/hour. Result cached for 1h, short on purpose, since certificates can be renewed or revoked at any time.