API
The TLSA Record Generator offers a free JSON REST API to generate and check TLSA records
programmatically. No authentication or API key is required. Rate limits apply.
All endpoints accept both GET (query string) and POST (JSON body).
Base URL
Response format
Every response is JSON with a top-level status field.
On error, an errors array is included:
field is the name of the invalid parameter, or null for non-field errors.
POST /v1/generate
Generate a TLSA DNS record. If no certificate is supplied, we connect to the server and fetch it automatically.
Parameters
| Parameter | Required | Description |
|---|---|---|
hostname | Yes | Fully qualified hostname, e.g. smtp.example.com |
port | Yes | Port number (1–65535), e.g. 25 |
transport | No | tcp (default) or udp |
usage | Yes | 0 = PKIX-TA, 1 = PKIX-EE, 2 = DANE-TA, 3 = DANE-EE |
selector | Yes | 0 = full certificate, 1 = subject public key (SPKI) |
mtype | Yes | 0 = no hash, 1 = SHA2-256, 2 = SHA2-512 |
mode | No | direct (default) or starttls. Only used when no certificate is supplied. |
certificate | No | PEM certificate. If omitted, the server fetches it live using hostname, port and mode. |
Example — auto-fetch certificate
Example — POST with a certificate
Response
GET /v1/check
Look up the published TLSA record(s) for a hostname/port, connect to every resolved address independently, and report whether each server's certificate matches. Also reports DNSSEC validation status.
Parameters
| Parameter | Required | Description |
|---|---|---|
hostname | Yes | Fully qualified hostname, e.g. smtp.example.com |
port | Yes | Port number (1–65535) |
transport | No | tcp (default) or udp |
mode | No | direct (default) or starttls |
Example
Response
HTTP status codes
| Code | Meaning |
|---|---|
200 | Success |
400 | Invalid parameters, or hostname resolves to a private/internal address |
404 | Endpoint not found |
405 | Method not allowed |
413 | Request body too large |
429 | Rate limit exceeded — 5 per minute, 60 per hour per IP |
502 | Could not reach the target server |
Fair use
The API is free and requires no key. Requests are rate-limited to 5 per minute and 60 per hour per IP address.