Friends
Friend requests, accept/reject, block/unblock, and friend lists.
The friends system lets users connect with each other through friend requests.
SDK usage
Every friends method returns friendships from the signed-in user's side: user_id is the user, friend_id the other user, and state is pending, accepted or blocked. Each friendship also carries requester_id and addressee_id, so the direction of a pending request stays readable.
Send a friend request
sendRequest posts { "addressee_id": "<the other user's id>" } to POST /v1/client/friends/request and returns the pending friendship.
Accept a request
Decline a request
Block/unblock
Both take the other user's id.
Remove a friend
Get friends list
Get pending requests
getList returns the accepted friendships, then the pending requests in both directions, each newest first, up to 1000 rows:
Pass an incoming request's id to acceptRequest or declineRequest. Over HTTP, GET /v1/client/friends/pending lists the incoming requests alone, each with the requester's id, display_name and avatar_url.
Blocked users don't appear in either list. blockUser returns the blocked friendship, whose id removeBlock takes.
Client API reference
| Method | Path | Description |
|---|---|---|
POST | /v1/client/friends/request | Send friend request (addressee_id) |
POST | /v1/client/friends/:id/accept | Accept request |
POST | /v1/client/friends/:id/reject | Decline request |
POST | /v1/client/friends/block | Block a user (user_id) |
POST | /v1/client/friends/unblock | Unblock a user (user_id) |
POST | /v1/client/friends/:id/block | Block by friendship id |
POST | /v1/client/friends/:id/unblock | Unblock by friendship id |
DELETE | /v1/client/friends/by-user/:userId | Remove a friend |
DELETE | /v1/client/friends/:id | Clear a block by friendship id |
GET | /v1/client/friends | List accepted + pending friendships |
GET | /v1/client/friends/pending | List pending requests |
MCP tools
| Tool | Description |
|---|---|
amba_friendships_get_stats | Get friendship statistics (total, pending, accepted, blocked) |