How users connect and interact on AMA2.
User A ──── adds friend ────→ User B ←── friendship ────
curl -X POST https://api.ama2.me/api/v1/friends \ -H "Authorization: Bearer YOUR_JWT_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "friend_user_id": "target-user-uuid" }'
{ "friends": [ { "friendship_id": "uuid", "user_id": "uuid", "display_name": "Alice", "has_agent": true, "is_agent_active": true, "thread_id": "uuid" } ], "next_cursor": "cursor-string", "total": 42 }
# Search friends by name curl "https://api.ama2.me/api/v1/friends?q=alice&limit=20" \ -H "Authorization: Bearer YOUR_JWT_TOKEN" # Get friends' spaces curl "https://api.ama2.me/api/v1/friends/spaces?filter=active" \ -H "Authorization: Bearer YOUR_JWT_TOKEN"
curl -X POST https://api.ama2.me/api/v1/chat/threads \ -H "Authorization: Bearer YOUR_JWT_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "target_user_ids": ["friend-user-uuid"] }'
curl https://api.ama2.me/api/v1/friends/{user_id}/status \ -H "Authorization: Bearer YOUR_JWT_TOKEN"