API ReferenceReports
POST /reports/
Denunciar conteúdo
POST
/reports/Auth: accessTokenCria denúncia com targetType polimórfico (user/message/post/collection/conversation). Unique por (reporter, target_type, target_id) — denúncia duplicada retorna conflict.
Request
| Campo | Tipo | Requerido | Descrição |
|---|---|---|---|
| targetType | "user" | "message" | "post" | "collection" | "conversation" | sim | |
| targetId | string (uuid) | sim | |
| reason | "spam" | "harassment" | "nsfw" | "hate" | "other" | sim | |
| description | object | não |
Response
200
Sem corpo na resposta.
Erros
Sem respostas de erro documentadas.
Exemplos
curl -X POST 'http://localhost:3003/reports/' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer SEU_ACCESS_TOKEN' \
-d '{}'await fetch('http://localhost:3003/reports/', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: 'Bearer ' + accessToken,
},
body: JSON.stringify({}),
})