Webhooks
Guide on how to implement Lasso webhooks for real-time updates
Webhook
{
"actions": [
{
"action_type": "ChangeStatus",
"action_id": "clf10kbhp0012sauvpxlqsb6h", // The Lasso ID of the action
"action_created_at": "2023-03-11T15:02:13.178Z", // ISO date of when the action was taken
"type": "user", // The type of object the action is taken on, "user", "content" or "subcategory"
"status": "hidden", // The status of the object, this can be "allowed", "flagged" or "hidden"
"previous_status": "flagged", // The status of the object before the action was taken, this can be `null` (when there was not previous status), "allowed", "flagged" or "hidden"
"actor_id": "cldk3z9ze0004saiy542wfbck", // (optional) The Lasso ID of the moderator who triggered this action. Either actor_id or rule_id is set.
"rule_id": "clyhppfjy00574ohv9uigmnia", // (optional) The Lasso ID of the rule which triggered this action. Either actor_id or rule_id is set.
// (optional) user is only sent when type === "user"
"user": {
"id": "cldk3z9ze0004saiy542wfbck", // The product's ID of the user
"tags": ["potential-spammer"] // Custom tags attached to the user
},
// (optional) content is only sent when type === "content"
"content": {
"id": "cldk3zadj019wsaiyudwdtxtr", // The product's ID of the content
"created_at": "2023-03-11T15:02:13.178Z", // ISO date of when the content was created
"user_id": "cldk3z9ze0004saiy542wfbck", // The ID of the user who sent the content
"subcategory_id": "cldvl1z2l002xsaykyoje94od", // The ID of the subcategory the content is part of
"category_id": "cldq51mh005fjsaw2y0fx3t5c" // The ID of the category the content is part of
"tags": ["explicit-content"] // Custom tags attached to the content
},
// (optional) subcategory is only sent when type === "subcategory"
"subcategory": {
"id": "cldvl1z2l002xsaykyoje94od" // The product's ID of the subcategory
},
// (optional) when the user is temporarily banned
"temporary_ban": {
"until": "2023-12-18T17:42:38.558Z",
"period": "week",
"duration": 1
},
"policy_id": "inappropriate-content", // (optional) The ID of the policy that was used when taking this action
"policy_name": "Inappropriate Content", // (optional) The name of the policy that was used when taking this action
"policy_information": "This content contains XXX" // (optional) Extra information that was given when the action was taken
}
]
}Response
Invalid actions
Retries
Security (optional, but recommended)
Other languages
Last updated