Analyze a text message
Analyzes a text message/comment and returns its moderation classification, severity, target, detected language, and a recommended moderation action.
Before diving in, we recommend reading the text taxonomy to understand the classifications, severities, and moderation signals returned by this endpoint.
Authorizations
API key authentication. Provide your key in the Authorization
header with the ApiKey scheme:
Body
The text content to analyze.
10000"I love this product!"
Publication date of the message. Defaults to the current date and time if omitted. This value must be stable across retries or resubmissions of the same message — changing it will cause the message to be duplicated in Bodyguard's records. Dates before 2020-01-01 are not supported.
Your own stable identifier for this piece of content (e.g. a comment ID from your database). Bodyguard echoes it back in webhooks and stored results, making it easy to correlate analysis with your own records. If omitted, a random reference is automatically generated.
256A public URL pointing to the content, if available.
Hint about the content language as an ISO 639-1 code (e.g. en, fr). If omitted, language is auto-detected.
2"en"
Metadata about the post the analyzed content belongs to. Optional, but strongly recommended: it powers context-aware moderation based on the post topic, which can't work without it. This information also appears on the Dashboard analytics through post-level data.
Metadata about the author of the content. Optional, but strongly recommended: some features only work with it — for example, spam management is tracked per author. This information also appears on the Dashboard analytics through author-level data.
Response
Analysis completed.
Moderation result for a piece of text.