This endpoint should be called when a user on your product reports another user or piece of content.
Default rate limit: 100 requests per minute.
Responses
-
OK. Also returned when a report with the same
idwas sent before; the existing report is returned and no duplicate is created. -
Returned when the request is invalid, e.g. the policy is not found, or both a user_id and a content_id were provided
-
The API token is missing or invalid
-
Returned when the reported content is not found
-
The rate limit has been exceeded, check the X-RateLimit headers for limits
POST
/user-reports
curl \
--request POST 'https://api.lassomoderation.com/api/v1/user-reports' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"report": {
"id": "ticket-4711",
"reported_by": {
"id": "device-8f3a2c",
"name": "PixelPirate",
"email": "reporter@example.com",
"country_code": "NL",
"ip_address": "203.0.113.42",
"metadata": {
"app_version": "4.2.1"
}
},
"reported_by_type": "normal",
"user_id": "some_user_id",
"content_id": "some_content_id",
"policy_id": "other",
"extra_info": "Some explanation from the user why it is reported"
}
}'
Request example
{
"report": {
"id": "ticket-4711",
"reported_by": {
"id": "device-8f3a2c",
"name": "PixelPirate",
"email": "reporter@example.com",
"country_code": "NL",
"ip_address": "203.0.113.42",
"metadata": {
"app_version": "4.2.1"
}
},
"reported_by_type": "normal",
"user_id": "some_user_id",
"content_id": "some_content_id",
"policy_id": "other",
"extra_info": "Some explanation from the user why it is reported"
}
}
Response examples (200)
{
"success": true,
"data": {
"report": {
"id": "clf10k9xw0008sauvq2xkpd3n",
"external_id": "ticket-4711"
}
}
}
Response examples (400)
{
"success": false,
"error": "Policy not found"
}
Response examples (401)
{
"success": false,
"error": "Invalid API key"
}
Response examples (404)
{
"success": false,
"error": "Reported Content not found"
}
Response examples (429)
{
"error": "Too many requests, check headers for limits"
}