Skip to main content
POST
/
moderate
cURL
curl --request POST \
  --url https://api.moderationapi.com/v1/moderate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "content": {
    "type": "<string>",
    "text": "<string>"
  },
  "channel": "<string>",
  "contentId": "<string>",
  "metaType": "profile",
  "authorId": "<string>",
  "conversationId": "<string>",
  "metadata": {},
  "doNotStore": true
}'
{
  "content": {
    "id": "<string>",
    "masked": true,
    "modified": "<string>"
  },
  "author": {
    "id": "<string>",
    "external_id": "<string>",
    "block": {
      "until": 123,
      "reason": "<string>"
    },
    "status": "enabled",
    "trust_level": {
      "level": 123,
      "manual": true
    }
  },
  "evaluation": {
    "flagged": true,
    "flag_probability": 123,
    "severity_score": 123,
    "unicode_spoofed": true
  },
  "recommendation": {
    "action": "review",
    "reason_codes": [
      "severity_reject"
    ]
  },
  "policies": [
    {
      "id": "<string>",
      "type": "<string>",
      "probability": 0.5,
      "flagged": true,
      "flagged_fields": [
        "<string>"
      ],
      "labels": [
        {
          "id": "<string>",
          "probability": 0.5,
          "flagged": true
        }
      ]
    }
  ],
  "insights": [
    {
      "id": "<string>",
      "type": "<string>",
      "probability": 0.5,
      "value": "positive"
    }
  ],
  "meta": {
    "status": "success",
    "timestamp": 123,
    "channel_key": "<string>",
    "usage": 123,
    "processing_time": "<string>"
  },
  "errors": [
    {
      "id": "<string>",
      "message": "<string>"
    }
  ]
}
Video moderation needs to be enabled for accounts to use this endpoint. Please contact your support@moderationapi.com to talk about enabling this feature.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
content
object
required

The content sent for moderation Text

  • Option 1
  • Option 2
  • Option 3
  • Option 4
  • Option 5
channel
string

Provide a channel ID or key. Will use the project's default channel if not provided.

contentId
string

The unique ID of the content in your database.

Maximum length: 100
metaType
enum<string>

The meta type of content being moderated

Available options:
profile,
message,
post,
comment,
event,
product,
review,
other
authorId
string

The author of the content.

conversationId
string

For example the ID of a chat room or a post

metadata
object

Any metadata you want to store with the content

doNotStore
boolean

Do not store the content. The content won't enter the review queue

Response

Successful response

content
object
required

Potentially modified content.

author
object | null
required

The author of the content if your account has authors enabled. Requires you to send authorId when submitting content.

evaluation
object
required

The evaluation of the content after running the channel policies.

recommendation
object
required

The recommendation for the content based on the evaluation.

policies
object[]
required

Results of all policies in the channel. Sorted by highest probability.

  • Option 1
  • Option 2
insights
object[]
required

Results of all insights enabled in the channel.

  • Option 1
  • Option 2
meta
object
required

Metadata about the moderation request

errors
object[]

Policies that had errors