# TLS Check API

> Inspects the TLS setup of a public host with hoshime's own handshakes: protocol versions and negotiated cipher suites, certificate chain, trust, OCSP stapling, HSTS and a grade from A+ to F.

Category: Developer & Tech. Region: global. 1 endpoint at `https://api.hoshime.com/v1/tlscheck/<endpoint>`, `GET` with query parameters, answering `{data, meta}` (see https://hoshime.com/docs/responses.md). Reference: https://hoshime.com/docs/platforms/tlscheck
## GET /v1/tlscheck/inspect

TLS inspection of a public host: protocol versions accepted (TLS 1.0 to 1.3) with the cipher suite negotiated for each, certificate chain (subject, issuer, SANs, validity, key type and size, signature algorithm), trust, OCSP stapling, HSTS header and a grade from A+ to F.

Scope: `social:read` · Units: 2 · Cached: 60 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `host` | string | yes | Host name, such as example.com. A URL is reduced to its host. (e.g. example.com) |
| `port` | integer | no | TCP port of the TLS service. (default 443) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `alpnProtocol` (string), `certificates` (Certificate[]), `certificates[].isCa` (boolean), `certificates[].issuer` (string), `certificates[].keyBits` (any), `certificates[].keyType` (string), `certificates[].notAfterAt` (string), `certificates[].notBeforeAt` (string), `certificates[].sans` (string[]), `certificates[].serialNumber` (string), `certificates[].sha256Fingerprint` (string), `certificates[].signatureAlgorithm` (string), `certificates[].subject` (string), `grade` (string), `gradeReasons` (string[]), `host` (string), `hsts` (Hsts | null), `hsts.header` (string), `hsts.includeSubDomains` (boolean), `hsts.maxAgeSeconds` (integer (int64)), `hsts.preload` (boolean), `ocspStapled` (boolean), `port` (any), `trustError` (string), `trusted` (boolean), `versions` (Version[]), `versions[].cipherSuite` (string), `versions[].protocol` (string), `versions[].supported` (boolean)

```bash
curl "https://api.hoshime.com/v1/tlscheck/inspect?host=example.com" -H "Authorization: Bearer $HOSHIME_TOKEN"
```
