Palbase Messaging · API
PUT
/messaging/blocks/{user_id}Block a person
The reader blocks a person: their direct messages never reach the reader (they are not told), and they open no conversation with them and add them to no group.
Called by a signed-in user of your app, with their token and the publishable key.
Path
user_idstring · requiredThe person.curl
curl -X PUT "https://<your-ref>.palbase.studio/messaging/blocks/<user_id>" \
-H "apikey: $PALBASE_PUBLISHABLE_KEY" \
-H "authorization: Bearer $USER_ACCESS_TOKEN"Responses
200The block
400Not another person's id (`invalid_user_id`)
401No key, a key of no project, a token not valid (the edge's answer), or no person's session (`user_required`)
409The person's account was deleted (`user_deleted`)
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 Block of messaging's contract.