Tools API reference

Stateless helpers that need only a read key: the DNS authentication check, the MX lookup, spintax, the subject line lint and email pattern guesses. 5 operations.

For AI agents: the docs index is at /llms.txt, and every page is also served as markdown at its URL plus .md.

#Operations

Authenticate as described in Authentication. Every operation below is generated from the OpenAPI document.

Method and pathScopeWhat it does
GET /v1/tools/dns-authreadCheck SPF, DKIM and DMARC for a domain
GET /v1/tools/mxreadLook up where a domain receives mail
POST /v1/tools/spintaxreadValidate and expand spintax
POST /v1/tools/subject-lintreadLint an email subject line
GET /v1/tools/email-patternreadGuess email address patterns for a person

#GET /v1/tools/dns-auth

Looks up the domain's SPF, DKIM (the selectors you name, or a list of common ones) and DMARC records and returns parsed records, a verdict for each, and fix text. SPF is checked against the 10 DNS lookup limit and DMARC for a policy tag. With providers (comma separated: google, microsoft, zoho, sendgrid, mailgun, amazon_ses, postmark) it also returns the records to publish for those sending services. Free; nothing is sent.

Scope: read. A read key and a write key both work. Success: HTTP 200.

Query parameters

FieldTypeRequiredDescription
domainstringyesA domain such as example.com. 3 to 253 characters
selectorsstringnoComma separated DKIM selectors to look up. Default: a list of common selectors. 0 to 500 characters
providersstringnoComma separated sending services to generate SPF, DMARC and DKIM guidance for. 0 to 500 characters

Response

FieldTypeRequiredDescription
domainstringyesNo further constraints.
overall"pass" or "warn" or "fail" or "missing" or "unknown"yesNo further constraints.
spfobjectyesNo further constraints.
dkimobjectyesNo further constraints.
dmarcobjectyesNo further constraints.
recommended_recordsobject or nullyesPresent only when providers was given.
Response example, HTTP 200
{
  "domain": "example.com",
  "overall": "pass",
  "spf": {
    "example_key": {}
  },
  "dkim": {
    "example_key": {}
  },
  "dmarc": {
    "example_key": {}
  },
  "recommended_records": {
    "example_key": {}
  }
}

Errors

invalid_input, unauthorized, rate_limited, internal_error. Every error uses the single format.

Rate limits

Counted per key: 200 requests per 10 seconds. Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Over the limit the answer is 429 rate_limited with Retry-After. See Rate limits.

Examples

cURL
curl "https://api.coldagentai.com/v1/tools/dns-auth?domain=example.com" \
  -H "Authorization: Bearer $COLDAGENTAI_API_KEY"
JavaScript (fetch)
const res = await fetch(`https://api.coldagentai.com/v1/tools/dns-auth?domain=example.com`, {
  headers: { Authorization: `Bearer ${process.env.COLDAGENTAI_API_KEY}` },
});
if (!res.ok) throw new Error(JSON.stringify(await res.json()));
const data = await res.json();

#GET /v1/tools/mx

Returns the MX records sorted by priority, the mail provider behind the preferred one and a verdict. A resolver error is lookup_failed, never "no mail server". Free.

Scope: read. A read key and a write key both work. Success: HTTP 200.

Query parameters

FieldTypeRequiredDescription
domainstringyesA domain such as example.com. 3 to 253 characters

Response

FieldTypeRequiredDescription
domainstringyesNo further constraints.
recordsarray of objectyesNo further constraints.
records[].exchangestringyesNo further constraints.
records[].priorityintegeryesNo further constraints.
records[].providerstring or nullyesNo further constraints.
providerstring or nullyesNo further constraints.
verdict"ok" or "no_mx" or "null_mx" or "implicit_mx" or "lookup_failed"yesNo further constraints.
messagestringyesNo further constraints.
Response example, HTTP 200
{
  "domain": "example.com",
  "records": [
    {
      "exchange": "abc123",
      "priority": 1,
      "provider": "abc123"
    }
  ],
  "provider": "abc123",
  "verdict": "ok",
  "message": "abc123"
}

Errors

invalid_input, unauthorized, rate_limited, internal_error. Every error uses the single format.

Rate limits

Counted per key: 200 requests per 10 seconds. Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Over the limit the answer is 429 rate_limited with Retry-After. See Rate limits.

Examples

cURL
curl "https://api.coldagentai.com/v1/tools/mx?domain=example.com" \
  -H "Authorization: Bearer $COLDAGENTAI_API_KEY"
JavaScript (fetch)
const res = await fetch(`https://api.coldagentai.com/v1/tools/mx?domain=example.com`, {
  headers: { Authorization: `Bearer ${process.env.COLDAGENTAI_API_KEY}` },
});
if (!res.ok) throw new Error(JSON.stringify(await res.json()));
const data = await res.json();

#POST /v1/tools/spintax

Checks braces, nesting depth and length of text such as "Hi {there|friend}" and counts the variants it can produce. With a seed it also returns one expansion; the same seed always gives the same text. Up to 20000 characters. Free.

Scope: read. A read key and a write key both work. Success: HTTP 200.

Request body

Send JSON with Content-Type: application/json. The body is required.

FieldTypeRequiredDescription
textstringyes0 to 21000 characters.
seedstring or integerno0 to 200 characters.
Request example
{
  "text": "abc123"
}

Response

FieldTypeRequiredDescription
validbooleanyesNo further constraints.
variantsinteger or nullyesNo further constraints.
errorsarray of objectyesNo further constraints.
errors[].positionintegeryesNo further constraints.
errors[].messagestringyesNo further constraints.
expandedstring or nullyesNo further constraints.
Response example, HTTP 200
{
  "valid": true,
  "variants": 1,
  "errors": [
    {
      "position": 1,
      "message": "abc123"
    }
  ],
  "expanded": "abc123"
}

Errors

invalid_input, unauthorized, payload_too_large, rate_limited, internal_error. Every error uses the single format.

Rate limits

Counted per key: 200 requests per 10 seconds. Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Over the limit the answer is 429 rate_limited with Retry-After. See Rate limits.

Examples

cURL
curl -X POST "https://api.coldagentai.com/v1/tools/spintax" \
  -H "Authorization: Bearer $COLDAGENTAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "text": "abc123"
}'
JavaScript (fetch)
const res = await fetch(`https://api.coldagentai.com/v1/tools/spintax`, {
  method: 'POST',
  body: JSON.stringify({
    "text": "abc123"
  }),
  headers: { Authorization: `Bearer ${process.env.COLDAGENTAI_API_KEY}`, 'Content-Type': 'application/json' },
});
if (!res.ok) throw new Error(JSON.stringify(await res.json()));
const data = await res.json();

#POST /v1/tools/subject-lint

Reports length, shouting, spam-trigger words and fake reply prefixes, with the reason each matters. It never rewrites the subject and promises nothing about placement. Free.

Scope: read. A read key and a write key both work. Success: HTTP 200.

Request body

Send JSON with Content-Type: application/json. The body is required.

FieldTypeRequiredDescription
subjectstringyes0 to 500 characters.
Request example
{
  "subject": "Quick question about your onboarding"
}

Response

FieldTypeRequiredDescription
subjectstringyesNo further constraints.
lengthintegeryesNo further constraints.
okbooleanyesNo further constraints.
findingsarray of objectyesNo further constraints.
findings[].codestringyesNo further constraints.
findings[].severity"error" or "warning" or "info"yesNo further constraints.
findings[].messagestringyesNo further constraints.
findings[].matchesarray of stringnoNo further constraints.
Response example, HTTP 200
{
  "subject": "Quick question about your onboarding",
  "length": 1,
  "ok": true,
  "findings": [
    {
      "code": "abc123",
      "severity": "error",
      "message": "abc123",
      "matches": [
        "abc123"
      ]
    }
  ]
}

Errors

invalid_input, unauthorized, payload_too_large, rate_limited, internal_error. Every error uses the single format.

Rate limits

Counted per key: 200 requests per 10 seconds. Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Over the limit the answer is 429 rate_limited with Retry-After. See Rate limits.

Examples

cURL
curl -X POST "https://api.coldagentai.com/v1/tools/subject-lint" \
  -H "Authorization: Bearer $COLDAGENTAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "subject": "Quick question about your onboarding"
}'
JavaScript (fetch)
const res = await fetch(`https://api.coldagentai.com/v1/tools/subject-lint`, {
  method: 'POST',
  body: JSON.stringify({
    "subject": "Quick question about your onboarding"
  }),
  headers: { Authorization: `Bearer ${process.env.COLDAGENTAI_API_KEY}`, 'Content-Type': 'application/json' },
});
if (!res.ok) throw new Error(JSON.stringify(await res.json()));
const data = await res.json();

#GET /v1/tools/email-pattern

Builds up to 13 candidate addresses (first.last, flast, and so on) from a name and a company domain. They are guesses, never probed against any mail server: verify each with POST /v1/email-verification before sending. Free, limited to 3 uses per account per UTC day; the next day the count resets.

Scope: read. A read key and a write key both work. Success: HTTP 200.

Query parameters

FieldTypeRequiredDescription
first_namestringyes1 to 100 characters
last_namestringyes1 to 100 characters
domainstringyesA domain such as example.com. 3 to 253 characters

Response

FieldTypeRequiredDescription
domainstringyesNo further constraints.
candidatesarray of objectyesNo further constraints.
candidates[].addressstringyesNo further constraints.
candidates[].patternstringyesNo further constraints.
must_verify_before_usetrueyesNo further constraints.
noticestringyesNo further constraints.
usageobjectyesNo further constraints.
usage.usedintegeryesNo further constraints.
usage.capintegeryesNo further constraints.
usage.remainingintegeryesNo further constraints.
usage.resets_atstringyesNo further constraints.
Response example, HTTP 200
{
  "domain": "example.com",
  "candidates": [
    {
      "address": "abc123",
      "pattern": "abc123"
    }
  ],
  "must_verify_before_use": true,
  "notice": "abc123",
  "usage": {
    "used": 1,
    "cap": 1,
    "remaining": 1,
    "resets_at": "abc123"
  }
}

Errors

invalid_input, unauthorized, rate_limited, internal_error. Every error uses the single format.

Rate limits

Counted per key: 200 requests per 10 seconds. Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Over the limit the answer is 429 rate_limited with Retry-After. See Rate limits.

Examples

cURL
curl "https://api.coldagentai.com/v1/tools/email-pattern?first_name=Maya&last_name=Chen&domain=example.com" \
  -H "Authorization: Bearer $COLDAGENTAI_API_KEY"
JavaScript (fetch)
const res = await fetch(`https://api.coldagentai.com/v1/tools/email-pattern?first_name=Maya&last_name=Chen&domain=example.com`, {
  headers: { Authorization: `Bearer ${process.env.COLDAGENTAI_API_KEY}` },
});
if (!res.ok) throw new Error(JSON.stringify(await res.json()));
const data = await res.json();
Tools