Palbase Messaging · API
/messaging/reportsReport a conversation, a person or messages
The reader reports a conversation, someone in it or messages they see in it, saying why. What the messages say is kept with the report, sealed — it outlives them — with what they said before an edit, and the project's backend is told (messaging.report.created) to read it with its secret key. A group a person deleted is reported, for 14 days, by those who were in it: naming no message, its last 30 the reader saw go with the report.
Called by a signed-in user of your app, with their token and the publishable key.
Request body
conversation_idstring (uuid) · requiredThe conversation.message_idsstring (uuid)[] · optionalMessages the reader sees in it (at most 50). Naming none for a group a person deleted, the last 30 messages the reader saw go with the report.notestring · optionalThe reader's own words (at most 1,000 characters).reasonstring · requiredWhy.user_idstring · optionalThe person reported.curl -X POST "https://<your-ref>.palbase.studio/messaging/reports" \
-H "apikey: $PALBASE_PUBLISHABLE_KEY" \
-H "authorization: Bearer $USER_ACCESS_TOKEN" \
-H "content-type: application/json" \
-d '{"conversation_id":"00000000-0000-0000-0000-000000000000","reason":"spam"}'Responses
201The report
400A field out of bounds (`invalid_<field>`, `too_many_messages`)
401No key, a key of no project, a token not valid (the edge's answer), or no person's session (`user_required`)
404No such conversation or message of the reader's
413The request body is too large (`request_too_large`)
429Over the project's request limit; Retry-After says when to try again
503Temporarily unavailable; retrying is safe after Retry-After
defaultAn error: the envelope names it (`error`) and explains it (`error_description`).
Operation Report of messaging's contract.