Amba

Friends

Project-wide friendship statistics and admin-side friendship deletion.

Friendship state is user-driven from /client/friends/*; this admin surface is read-only plus a moderation delete.

Source: apps/api/src/routes/admin/friends.ts.

Endpoints

MethodPathDescription
GET/admin/projects/:projectId/friends/statsAggregate counts by friendship status.
GET/admin/projects/:projectId/friendsPaginated list of friendships with user detail; optional ?status= filter.
DELETE/admin/projects/:projectId/friends/:friendshipIdHard-delete a friendship row.

GET /admin/projects/:projectId/friends/stats

Response 200

{
  "data": {
    "total_friendships": 1234,
    "pending_requests": 42,
    "accepted_friendships": 1180,
    "blocked_count": 12
  }
}

Try it:

GET/admin/projects/%7B%7BprojectId%7D%7D/friends/stats
developer auth
curl -X GET 'https://api.amba.dev/admin/projects/%7B%7BprojectId%7D%7D/friends/stats'
Loading auth… Configure auth in the settings drawer (top-right) to run this request.

Curl:

curl -X GET '${BASE_URL}/admin/projects/{projectId}/friends/stats' \
  -H 'Authorization: Bearer ${DEV_TOKEN}'

GET /admin/projects/:projectId/friends

Query

ParamDefaultDescription
limit50
offset0
statuspending, accepted, blocked.

Response 200

{
  "data": [
    {
      "id": "…",
      "requester_id": "…",
      "addressee_id": "…",
      "status": "accepted",
      "created_at": "…",
      "requester": { "id": "…", "display_name": "…", "avatar_url": "…" },
      "addressee": { "id": "…", "display_name": "…", "avatar_url": "…" }
    }
  ],
  "total": 1234,
  "offset": 0,
  "limit": 50
}

Try it:

GET/admin/projects/%7B%7BprojectId%7D%7D/friends
developer auth
curl -X GET 'https://api.amba.dev/admin/projects/%7B%7BprojectId%7D%7D/friends'
Loading auth… Configure auth in the settings drawer (top-right) to run this request.

Curl:

curl -X GET '${BASE_URL}/admin/projects/{projectId}/friends' \
  -H 'Authorization: Bearer ${DEV_TOKEN}'

DELETE /admin/projects/:projectId/friends/:friendshipId

{ "data": { "deleted": true } }

Try it:

DELETE/admin/projects/%7B%7BprojectId%7D%7D/friends/%7B%7BfriendshipId%7D%7D
developer auth
curl -X DELETE 'https://api.amba.dev/admin/projects/%7B%7BprojectId%7D%7D/friends/%7B%7BfriendshipId%7D%7D'
Loading auth… Configure auth in the settings drawer (top-right) to run this request.

Curl:

curl -X DELETE '${BASE_URL}/admin/projects/{projectId}/friends/{friendshipId}' \
  -H 'Authorization: Bearer ${DEV_TOKEN}'

On this page