Developer Docs
Check marketing copy programmatically. Integrate compliance checking into your CMS, workflow or agency tools. Included on Pro, Growth and Sentinel.
Why agencies use the API
Instead of your team manually pasting copy into the dashboard, the API lets you plug compliance checking directly into the tools you already use. Your CMS can check a page the moment it is published. Your project management tool can flag a task when copy fails. Your client portal can show a live compliance score without anyone lifting a finger. If it can make an HTTP request, it can use this API.
Pass your API key in the Authorization header on every request.
Authorization: Bearer rfp_your_api_key_here
Generate keys in Settings. Keys start with rfp_. Keep them secret.
https://redflagaipro.com/api/v1
Check marketing copy for compliance risks. Returns a score, risk level, and all flags with suggested fixes.
Request body
{
"title": "My Sales Page", // optional, string
"content": "Your copy here..." // required, string, min 20 chars
}Example request
curl -X POST https://redflagaipro.com/api/v1/scan \
-H "Authorization: Bearer rfp_your_key" \
-H "Content-Type: application/json" \
-d '{
"title": "Landing Page",
"content": "Earn six figures from home with our guaranteed system..."
}'Response
{
"scan_id": "uuid",
"title": "Landing Page",
"score": 60,
"risk": "medium",
"flag_count": 2,
"flags": [
{
"category": "income_claim",
"severity": "high",
"text_excerpt": "…six figures from home…",
"description": "Contains an income claim...",
"suggestion": "Add a clear earnings disclaimer..."
}
],
"scanned_at": "2026-05-29T11:00:00.000Z"
}Real-Time Gate: a synchronous allow/block decision, meant to be called before content goes live rather than checked after the fact. Purely heuristic scoring, no external API calls, so it stays fast enough to sit in a live path. This is a decision endpoint your own code calls and acts on, not a network proxy — see /real-time-gate for what that means in practice.
Request body
{
"title": "Auto-published blog draft", // optional, string
"content": "The text to evaluate...", // required, string, min 20 chars
"threshold": 50 // optional, 0-100, default 50
}Example request
curl -X POST https://redflagaipro.com/api/v1/enforce \
-H "Authorization: Bearer rfp_your_key" \
-H "Content-Type: application/json" \
-d '{
"title": "Auto-published blog draft",
"content": "Earn six figures from home with our guaranteed system...",
"threshold": 50
}'Response
{
"decision_id": "uuid",
"allowed": false,
"valid_until": "2026-08-24T11:01:00.000Z",
"score": 35,
"threshold": 50,
"risk": "high",
"flag_count": 2,
"flags": [ { "category": "income_claim", "severity": "high", "..." } ],
"verify_url": "https://redflagaipro.com/verify?id=...",
"governing_record": { "id": "uuid", "decision": "...", "owner_name": "..." },
"checked_at": "2026-08-07T11:00:00.000Z"
}A blocked decision (allowed: false) is sealed with an independent timestamp and a public verify link. Allowed decisions are stored but not individually sealed, to avoid flooding the chain with routine checks. governing_record is the current boundary authorization record for the API key making this call, if one exists and has not expired — null if nothing currently governs this key. Named on the decision itself, not left as a separate record you have to go match up by hand.
valid_until is how long this specific answer can be relied on, not how long the key is authorized in general. An ALLOW is a stateless answer to one question asked at one moment. Nothing stops a caller checking once and then dispatching several actions off the back of that single answer, and a falsifier that fires a second later cannot reach back and recall anything already launched under it. Set to 60 seconds from the check, or the governing record's own expiry if that comes sooner, whichever is closer. Treat an ALLOW past this timestamp as stale and check again rather than assuming it still holds. null when the decision is blocked, since a block has nothing to expire.
Sentinel only. Exports one Real-Time Gate decision, plus the full authority state that governed it at that moment, as a bundle signed with Red Flag's Ed25519 key. Hand the file to anyone, a regulator, an insurer, a counterparty, and they can confirm it was signed by Red Flag and has not been altered since, offline, with no account, no API call, and no need to trust our server at the moment they check it. Requires a logged in session, not an API key — call it from your dashboard or a server acting on your behalf.
Response
{
"bundle": {
"version": 1,
"decision_id": "uuid",
"checked_at": "2026-08-10T11:00:00.000Z",
"title": "Auto-published blog draft",
"score": 35,
"threshold": 50,
"allowed": false,
"block_reason": "content_score",
"flag_count": 2,
"flags": [ { "category": "income_claim", "severity": "high" } ],
"governing_record": {
"id": "uuid",
"decision": "...",
"owner_name": "...",
"owner_role": "...",
"authority_mode": "human_decides",
"expires_at": "2026-12-01T00:00:00.000Z",
"permission_fingerprint": "pf-a1b2c3d4",
"fingerprint_intact_at_export": true
},
"exported_at": "2026-08-10T11:05:00.000Z",
"exported_by": "redflagaipro.com"
},
"signature": "base64...",
"algorithm": "ed25519",
"public_key_pem": "-----BEGIN PUBLIC KEY-----...",
"public_key_url": "https://www.redflagaipro.com/api/verify/signing-key"
}Verify offline with the standalone script at /verify-decision-bundle.js, no dependencies beyond Node's built in crypto module: node verify-decision-bundle.js bundle.json. Save the public key alongside your bundles rather than re-fetching it each time — the whole point is not having to trust the server again at the moment you check.
List your recent checks. Supports pagination.
Query parameters
limit integer Max results to return (default 20, max 100) offset integer Number of results to skip (default 0)
Example request
curl https://redflagaipro.com/api/v1/scans?limit=10 \ -H "Authorization: Bearer rfp_your_key"
Response
{
"scans": [
{
"id": "uuid",
"title": "Landing Page",
"score": 60,
"status": "complete",
"created_at": "2026-05-29T11:00:00.000Z"
}
],
"total": 42,
"limit": 10,
"offset": 0
}Set a webhook URL in Settings and we POST check results there every time a check completes, whether from the dashboard, URL check, VSL check, or API. Use with n8n, Make, Zapier, or your own backend.
Payload
{
"event": "scan.completed",
"scan_id": "uuid",
"title": "Landing Page",
"score": 60,
"flag_count": 2,
"flags": [
{
"category": "income_claim",
"severity": "high",
"suggestion": "Add a clear earnings disclaimer..."
}
],
"scanned_at": "2026-05-29T11:00:00.000Z"
}n8n setup (free)
Zapier or Make setup
Note: catching an inbound webhook on Zapier's free plan requires a paid Zapier account (the "Webhooks by Zapier" trigger is Premium-only). n8n above is the free route.
Every paid plan (Pro, Growth, Sentinel) checks all 30 categories. The free plan checks 16.
Sentinel plan: unlimited checks via dashboard. API calls are subject to fair use. If you need higher throughput, contact us.
Questions? Email support@redflagaipro.com