Skip to main content
POST /api/v2/moderation/check Runs the content-moderation engine against the supplied text without blocking. Returns structured findings (category, severity, suggestion) so an agent can validate input before submitting it to a campaign-create or other blocking surface. Mirrors the engine that powers brief screening on POST /campaigns.

Request

curl -X POST https://api.interchange.io/api/v2/moderation/check \
  -H "Authorization: Bearer $SCOPE3_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Reach outdoor enthusiasts in the Pacific Northwest with premium CTV inventory.",
    "direction": "input"
  }'

Parameters

FieldTypeRequiredNotes
textstringYesText to evaluate (1–10,000 chars). Exceeding 10,000 chars returns a 400 VALIDATION_ERROR
directionenumNoinput runs brief/jailbreak/policy patterns; output runs LLM-output (refusal/identity/PII) patterns. Default input
surfacestringNoSurface label for metric attribution (1–100 chars). Default moderation.check

Response

{
  "passed": false,
  "wouldBlock": true,
  "findings": [
    {
      "category": "jailbreak_attempt",
      "severity": "high",
      "suggestion": "Remove instructions that ask the system to ignore prior rules, then resubmit."
    }
  ]
}
FieldTypeNotes
passedbooleanTrue when no moderation patterns matched
wouldBlockbooleanTrue when at least one finding would trigger a 422 on a blocking surface
findings[]arrayAll matching findings; empty when passed is true. Both blocking and non-blocking findings are reported
findings[].categorystringModeration category (e.g. jailbreak_attempt, pii_leak)
findings[].severityenumlow, medium, high, critical. high and above blocks at default thresholds
findings[].suggestionstringRemediation guidance for the agent to self-correct

Errors

  • 400 VALIDATION_ERROR — empty text, or direction/surface out of range.
  • 401 UNAUTHORIZED — missing or invalid API key.
See Errors for the full error contract.

Activity tasks

All activity operations

List activity

Configuration audit feed

Errors

Shared error contract