{"api":{"id":"api_b7b64905243c5c9bb7e4d02d","slug":"mta-sts-policy-reader","name":"MTA-STS Policy API","description":"Reads the MTA-STS mail transport policy that each domain publishes: whether one exists, its version, mode (enforce, testing or none), the allowed mail server patterns and the cache lifetime. Many domains per call.","kind":"ready_made","visibility":"public","domain":"mta-sts.gmail.com","source_url":"https://mta-sts.gmail.com/.well-known/mta-sts.txt","category":"developer","record_type":"generic","active_version":"1.0","units_per_1k":500,"health":"unknown","auto_repair":false,"last_checked_at":null,"last_run_at":null,"fields_count":6,"created_at":"2026-12-06T04:45:48.378Z","updated_at":"2026-12-06T04:45:48.378Z","runnable":true,"egress":null,"repairs":[],"repairs_total":0,"how":"Runs on a reader we built and maintain by hand for this site.","fields":[{"name":"domain","type":"string","description":"The domain that was checked, in lower case.","required":true,"coverage":1,"example":"gmail.com"},{"name":"has_policy","type":"boolean","description":"True when the domain publishes a policy file.","required":false,"coverage":1,"example":true},{"name":"version","type":"string","description":"Policy version, normally STSv1.","required":false,"coverage":1,"example":"STSv1"},{"name":"mode","type":"string","description":"enforce, testing or none.","required":false,"coverage":1,"example":"enforce"},{"name":"mx_patterns","type":"array","description":"Mail server host names or wildcard patterns the policy allows.","required":false,"coverage":1,"example":["smtp.google.com","gmail-smtp-in.l.google.com"]},{"name":"max_age_seconds","type":"integer","description":"How long senders may cache the policy, in seconds.","required":false,"coverage":1,"example":86400}],"inputs":[{"name":"domains","type":"array","description":"Domains to check, such as gmail.com. A leading mta-sts. or https:// is ignored.","example":["gmail.com","outlook.com"],"required":true}],"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":true,"properties":{"domain":{"description":"The domain that was checked, in lower case.","type":"string"},"has_policy":{"description":"True when the domain publishes a policy file.","type":"boolean"},"max_age_seconds":{"description":"How long senders may cache the policy, in seconds.","type":"integer"},"mode":{"description":"enforce, testing or none.","type":"string"},"mx_patterns":{"description":"Mail server host names or wildcard patterns the policy allows.","type":"array"},"version":{"description":"Policy version, normally STSv1.","type":"string"}},"required":["domain"],"title":"MTA-STS Policy API","type":"object"},"samples":[{"domain":"gmail.com","has_policy":true,"version":"STSv1","mode":"enforce","mx_patterns":["smtp.google.com","gmail-smtp-in.l.google.com","*.gmail-smtp-in.l.google.com"],"max_age_seconds":86400},{"domain":"outlook.com","has_policy":true,"version":"STSv1","mode":"enforce","mx_patterns":["*.olc.protection.outlook.com"],"max_age_seconds":604800},{"domain":"google.com","has_policy":true,"version":"STSv1","mode":"enforce","mx_patterns":["smtp.google.com","aspmx.l.google.com","*.aspmx.l.google.com"],"max_age_seconds":86400}],"validation":{"checked_at":"2026-12-06T04:45:48.335Z","field_coverage":{"domain":1,"has_policy":1,"max_age_seconds":1,"mode":1,"mx_patterns":1,"version":1},"fresh_read":false,"identity_unique":true,"issues":["Imported from a hand-built source. Field names and types come from its published schema; no live read was made for this check."],"level":"preview","pages_checked":0,"passed":true,"records_checked":3},"links":{"run":"https://pullrow.dev/v1/apis/api_b7b64905243c5c9bb7e4d02d/run","openapi":"https://pullrow.dev/v1/apis/api_b7b64905243c5c9bb7e4d02d/openapi.json","contract":"https://pullrow.dev/v1/apis/api_b7b64905243c5c9bb7e4d02d/contract.json","page":"https://pullrow.dev/catalog/mta-sts-policy-reader"},"runs_30d":0,"success_rate_30d":null,"price_per_1k_usd":0.5,"featured":false,"reliability":{"window_days":30,"runs":0,"completed":0,"succeeded":0,"failed":0,"success_rate":null,"last_run_at":null},"demo":{"available":false,"max_records":0,"reason":"Every run of this API costs us money, so it has no free live demo. The sample records on its page show what it returns.","code":"demo_not_available"},"meta":{"limitations":["One record per domain; a domain with no policy file (or whose policy host does not answer) returns has_policy false and empty policy fields.","Only the policy file is read. The matching _mta-sts DNS record, TLS-RPT record and certificate validity are not checked.","Reads the file as the domain serves it right now; policies can change at any time. Up to 500 domains per run, one request every quarter second.","Public policy files on each domain's own policy host; no key or licence applies."]},"plain":{"summary":null,"source":"rules","fields":[{"name":"domain","label":"Domain","description":"The domain that was checked, in lower case.","group":"Basics","shown":true,"written":false},{"name":"has_policy","label":"Has policy","description":"Yes when the domain publishes a policy file.","group":"Basics","shown":true,"written":false},{"name":"version","label":"Policy version, normally STSv1","description":"","group":"Basics","shown":true,"written":false},{"name":"mode","label":"Mode","description":"enforce, testing or none.","group":"Basics","shown":true,"written":false},{"name":"mx_patterns","label":"Mx patterns","description":"Mail server host names or wildcard patterns the policy allows.","group":"Basics","shown":true,"written":false},{"name":"max_age_seconds","label":"Maximum age (seconds)","description":"How long senders may cache the policy, in seconds.","group":"Basics","shown":true,"written":false}],"inputs":[{"name":"domains","label":"Domains","help":"Domains to check, such as gmail.com. A leading mta-sts. or https:// is ignored.","example":"gmail.com, outlook.com","written":false}]}},"incidents":[]}