Inspect SPF Record
GET/zones/{zone_id}/email/auth/spf/inspect
Inspects a specific SPF TXT record and returns a parsed tree structure in the spflimit-worker format.
The record ID must be provided via the id query parameter.
Returns a recursive tree showing:
- Parsed components with their qualifiers and types
- Nested includes recursively resolved within components
- Per-component and total lookup counts
- Detailed error information with context
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
Example:
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Example:
Inspect SPF Record
curl https://api.cloudflare.com/client/v4/zones/$ZONE_ID/email/auth/spf/inspect \
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN"{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"success": true,
"result": {
"components": [
{}
],
"domain": "example.com",
"record": "v=spf1 ip4:203.0.113.1 include:spf.example.com -all",
"total_lookups": 2,
"errors": [
{
"code": "max_lookups",
"domain": "example.com",
"message": "RFC 7208 10-lookup limit exceeded",
"details": "invalid"
}
]
}
}Returns Examples
{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"success": true,
"result": {
"components": [
{}
],
"domain": "example.com",
"record": "v=spf1 ip4:203.0.113.1 include:spf.example.com -all",
"total_lookups": 2,
"errors": [
{
"code": "max_lookups",
"domain": "example.com",
"message": "RFC 7208 10-lookup limit exceeded",
"details": "invalid"
}
]
}
}