guides / Resources
Florian avatar

Florian

AnalysisRequest

An AnalysisRequest object contains all the data related to an analysis request.

AttributeTypeRequiredDescription
textStringtrueThe text message to analyze.
publishedAtDatefalseThe message publication date (on your platform). Default to now.
contextContextfalseSome context information that enable powerful features such as spam detection and analytics computing (this will be reflected on your dashboard).
referenceStringfalseA custom unique identifier for this AnalysisRequest. Auto-generated by default.
languageStringfalseThe message language (ISO 639-1). If set, the analysis will be forced in the specified language. Otherwise, the language will be auto-detected.
  • Text max length is limited to 1000 characters by default, and can be customized for each clients upon request at business@bodyguard.ai.
  • Each message reference is unique by channel. This means that if you set the same reference multiple times on a given channel, updates will be applied instead of creation.

Important notes about the publishedAt field:

  • It CANNOT be updated. If you analyze the same Message (with an existing reference) multiple times, the publishedAt field will NOT be updated even if specified again.

  • It CANNOT be older than 6 month.

Context

This object allows you to benefit from advanced analyzer services.

AttributeTypeRequiredDescription
topLevelReferenceStringfalseAllows you to link this message to the top level message. Example: e.g first/original post.
parentReferenceStringfalseAllows you to link this message to a parent message.
permalinkStringfalseAllows you to link the analyzed message to the original message on the platform. This link will be displayed on our dashboard.
fromAuthorContextfalseAllows you to add any user sender details. This fields is very important for the spam detection and other advanced features.
toAuthorContextfalseAllows you to add any user receiver details.
postPostContextfalseAllows you to add any post details.

Author context

AttributeTypeRequiredDescription
typeAuthorTypetrueAuthor type.
dataAuthorfalseThe author's details. Not applicable for ANONYMOUS type. Contains informations regarding a user involved in the AnalysisRequest (sender or receiver).

Post context

AttributeTypeRequiredDescription
typePostTypetruePost type.
dataPostfalseThe post's details. Not applicable for UNKNOWN type. Contains information regarding the post involved in the AnalysisRequest.