List blocked users
Chat
List blocked users
List the users the caller has blocked, newest-first, enriched with name + avatar so a client can render the block list and unblock from it.
GET
List blocked users
Overview
Returns the users the authenticated caller has directed-blocked (callerUserId → blockedUserId), newest block first. Each entry is enriched with the blocked user’s display info (firstName, lastName, avatarUrl) using the same user-profile lookup the conversation inbox uses, so the block list renders without a per-row follow-up call.
Use each entry’s userId to unblock via DELETE /api/v1/chat/blocks/:userId.
The list is directed: it only contains blocks the caller created. Blocks that other users created against the caller are not returned.
Authentication
Bearer <accessToken> required. requireOnboarded middleware applied.
Path parameters
None.Query parameters
None. The endpoint returns the caller’s full block list (no pagination).Request body
None.Response — 200 OK
| Field | Type | Notes |
|---|---|---|
blockedUsers | array | The blocked users, newest block first. Empty array [] when the caller has blocked no one. |
blockedUsers[].userId | string | 24-char hex ObjectId of the blocked user. Pass this to DELETE /api/v1/chat/blocks/:userId to unblock. |
blockedUsers[].firstName | string | null | Blocked user’s first name. null if unset or the user record is gone. |
blockedUsers[].lastName | string | null | Blocked user’s last name. null if unset or the user record is gone. |
blockedUsers[].avatarUrl | string | null | Blocked user’s avatar URL. null if unset or the user record is gone. |
blockedUsers[].blockedAt | string | ISO-8601 timestamp the block was created. |
Example response (two blocks)
Example response (no blocks)
Example response (blocked user record removed)
If a blocked user’s account is gone, the row is still returned (so the caller can still unblock) withnull profile fields:
Error responses
| Status | Code | Meaning |
|---|---|---|
| 401 | UNAUTHENTICATED | Missing, malformed, or expired access token. |
| 403 | ONBOARDING_INCOMPLETE | Caller has not finished onboarding. |
See also
- Block user — create a block.
- Unblock user — remove a block via
userIdfrom this list.