Overview
Includes validation of certificate data format, length verification, and security level assessment with recommendations for optimal DANE configuration.
Endpoint
One host, one path per API. The block below shows this call in four languages; every one of them is the same HTTP request. Making requests covers the timeouts, retries and parameter rules that apply to all of them. The SDKs wrap the same call in a typed client.
curl -X POST https://api.apiverve.com/v1/danevalidator \
-H "x-api-key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"record": "_443._tcp.example.com. 86400 IN TLSA 3 1 1 0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"
}'const res = await fetch('https://api.apiverve.com/v1/danevalidator', {
method: 'POST',
headers: {
'x-api-key': 'your_api_key_here',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"record": "_443._tcp.example.com. 86400 IN TLSA 3 1 1 0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"
}),
});
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const { data } = await res.json();
console.log(data);import requests
res = requests.post(
"https://api.apiverve.com/v1/danevalidator",
headers={"x-api-key": "your_api_key_here"},
json={
"record": "_443._tcp.example.com. 86400 IN TLSA 3 1 1 0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"
},
timeout=15,
)
res.raise_for_status()
print(res.json()["data"])package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"record": "_443._tcp.example.com. 86400 IN TLSA 3 1 1 0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"
}`)
req, _ := http.NewRequest("POST", "https://api.apiverve.com/v1/danevalidator", body)
req.Header.Set("Content-Type", "application/json")
req.Header.Set("x-api-key", "your_api_key_here")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(string(out))
}Replace your_api_key_here with the key from your dashboard. When the inputs arrive as a list rather than one at a time, batch requests run up to 200 of them through this same API in a single call.
Authentication
Send your key in the x-api-key header. That is the only auth step — there is no token exchange and no per-endpoint scope to configure. Authentication covers creating, rotating and revoking keys.
A 401 means the key is missing, invalid or expired. A 403 means the key is valid but not permitted here — blocked by a key restriction or an IP allow-list. Running out of credits is a 429.
Parameters
Sent as JSON in the request body. Premium parameters are accepted on every plan but only take effect on plans that include them.
| Parameter | Type | Description |
|---|---|---|
recordRequired | string | The DANE/TLSA record string to validate |
Response
Every API returns the same three top-level keys, so one response handler covers your whole integration: status, error and data. Only data changes shape. Response format covers the envelope, the other output formats and how premium fields are withheld.
{
"status": "ok",
"error": null,
"data": {
"raw_record": "_443._tcp.example.com. 86400 IN TLSA 3 1 1 0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
"parsed": {
"name": "_443._tcp.example.com.",
"port": 443,
"protocol": "tcp",
"hostname": "example.com",
"ttl": 86400,
"class": "IN",
"usage": 3,
"selector": 1,
"matching": 1,
"certificate_data": "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
"certificate_data_length": 64
},
"interpretation": {
"usage": {
"name": "DANE-EE",
"description": "Domain-issued certificate",
"full_description": "Certificate must exactly match the provided association data (most common)"
},
"selector": {
"name": "SPKI",
"description": "SubjectPublicKeyInfo",
"full_description": "Match against the Subject Public Key Info (recommended)"
},
"matching": {
"name": "SHA-256",
"description": "SHA-256 hash",
"full_description": "SHA-256 hash of the selected content (recommended)"
},
"security_level": "Recommended",
"recommendation": "This is the recommended DANE configuration (DANE-EE + SPKI + SHA-256)"
},
"validation": {
"is_valid": true,
"certificate_data_format": "Valid hexadecimal",
"certificate_data_length_valid": true
}
}
}Response fields
Paths are relative to data. Premium fields are absent rather than zeroed on plans that do not include them, so check for presence instead of comparing to 0.
| Field | Type | Example | Description |
|---|---|---|---|
raw_record | string | "_443._tcp.example.com. 86400 IN TLSA 3 1 1 0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF" | Original DANE/TLSA record string input |
parsed | object | {...} | |
name | string | "_443._tcp.example.com." | Fully qualified domain name from TLSA record |
port | number | 443 | Port number specified in TLSA record |
protocol | string | "tcp" | Protocol type (tcp or udp) from record |
hostname | string | "example.com" | Extracted hostname without service prefix |
ttl | number | 86400 | Time to live value in seconds |
class | string | "IN" | DNS class designation (typically IN) |
usage | number | 3 | TLSA usage field value (0-3) |
selector | number | 1 | TLSA selector field value (0-1) |
matching | number | 1 | TLSA matching type field value (0-3) |
certificate_data | string | "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF" | Hexadecimal certificate association data |
certificate_data_length | number | 64 | Length of certificate data in characters |
interpretationPremium | object | {...} | Detailed interpretation and security analysis of DANE record |
usagePremium | object | {...} | |
namePremium | string | "DANE-EE" | Human-readable TLSA usage type name |
descriptionPremium | string | "Domain-issued certificate" | Short description of usage type meaning |
full_descriptionPremium | string | "Certificate must exactly match the provided association data (most common)" | Comprehensive explanation of usage field |
selectorPremium | object | {...} | |
namePremium | string | "SPKI" | Human-readable selector type designation |
descriptionPremium | string | "SubjectPublicKeyInfo" | Short description of selector meaning |
full_descriptionPremium | string | "Match against the Subject Public Key Info (recommended)" | Detailed explanation of selector type |
matchingPremium | object | {...} | |
namePremium | string | "SHA-256" | Human-readable matching algorithm name |
descriptionPremium | string | "SHA-256 hash" | Short description of matching algorithm |
full_descriptionPremium | string | "SHA-256 hash of the selected content (recommended)" | Detailed explanation of matching algorithm |
security_levelPremium | string | "Recommended" | Security assessment of configuration level |
recommendationPremium | string | "This is the recommended DANE configuration (DANE-EE + SPKI + SHA-256)" | Expert security recommendation for configuration |
validation | object | {...} | |
is_valid | boolean | true | Overall validation result for DANE record |
certificate_data_format | string | "Valid hexadecimal" | Certificate data hexadecimal format validation result |
certificate_data_length_valid | boolean | true | Validation status of certificate data length |
Errors
Read the HTTP status first, then error for the specific reason. The body names the parameter that has to change. Error handling covers the full status list and which of them are worth retrying.
| Status | Meaning | What to do |
|---|---|---|
400 | Input was rejected | Read error; it names the parameter. |
401 | Key missing or invalid | Check the header name and the key value. |
403 | Key valid, but not permitted | A key restriction or IP allow-list; see key scoping. |
429 | Rate limited, or out of credits | Read error to tell them apart; see rate limits. |
Use cases
- DANE Configuration
- Validate DANE/TLSA record configuration to ensure proper certificate association and DNS security implementation
- Authentication Audit
- Audit DNS-based authentication of named entities (DANE) for email servers and web services security compliance
- Security Scanning
- Build DNS security scanning tools that validate TLSA records for certificate pinning and trust anchor verification
- Certificate Pinning
- Verify certificate pinning implementation using TLSA records to protect against man-in-the-middle attacks and CA compromise
Other ways to use DANE Record Validator
Set up DANE Record Validator on APIVerve, or reach the same source a different way. Your APIVerve account and credits work on all of them — one key, one balance.
Related
More in Security: