Skip to main content
POST /api/v2/moderation/check Runs the content-moderation engine against the supplied text without blocking, returning structured findings so a buyer agent can validate input before submitting it to a blocking surface. Mirrors the engine behind POST /campaigns brief screening — wouldBlock: true predicts a 422 on the real call.

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": "Premium video for outdoor-gear buyers in the US and Canada.",
    "direction": "input",
    "surface": "campaign.brief"
  }'

Parameters

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

Response

{
  "passed": true,
  "wouldBlock": false,
  "findings": []
}
A blocking example:
{
  "passed": false,
  "wouldBlock": true,
  "findings": [
    {
      "category": "jailbreak_attempt",
      "severity": "high",
      "suggestion": "Remove instructions that try to override system behavior, then resubmit."
    }
  ]
}
passed is true only when no patterns matched. wouldBlock is true when at least one finding would trigger a 422 on a blocking surface. findings reports both blocking and non-blocking matches, so medium-severity signals are visible even when wouldBlock is false. Each finding carries a category, a severity (low, medium, high, critical), and a suggestion.

Errors

  • 400 VALIDATION_ERROR — empty text, text over 10,000 chars, or an unknown direction.
See Errors for the full error contract.

Moderation tasks

All moderation operations

Moderation overview

What it is and when to use it