Blocks
Block and unblock users
The Blocks API lets you block users to prevent them from interacting with you.
Effects of Blocking
When you block a user:
- Any existing friendship is removed
- They cannot send you friend requests
- They cannot create DMs with you
- They cannot see your presence status
List Blocked Users
Get all users you've blocked.
GET /v1/blocks
Authorization: Bearer {token}
Response:
[
{
"user_id": "12345",
"display_name": "BlockedUser",
"blocked_at": 1703520000
}
]
Block User
Block a user.
POST /v1/blocks
Authorization: Bearer {token}
{
"user_id": "12345"
}
Response (201 Created):
{
"message": "User blocked"
}
Error Codes:
| Code | Description |
|---|---|
SOCIAL_CANNOT_BLOCK_SELF |
Can't block yourself |
SOCIAL_ALREADY_BLOCKED |
User already blocked |
Unblock User
Remove a block.
DELETE /v1/blocks/{userID}
Authorization: Bearer {token}
Response: 204 No Content
Error Codes:
| Code | Description |
|---|---|
SOCIAL_BLOCK_NOT_FOUND |
No block exists for this user |