Skip to main content
GET
/
api
/
v1
/
friends
List Friends
curl --request GET \
  --url https://api.example.com/api/v1/friends
{
  "friends": [
    {
      "friendship_id": "<string>",
      "user_id": "<string>",
      "display_name": "<string>",
      "has_agent": true,
      "is_agent_active": true,
      "thread_id": "<string>"
    }
  ],
  "next_cursor": "<string>",
  "total": 123
}

List Friends

Returns a paginated list of friends with their agent status.

Authentication

Requires a valid user JWT token.
Rate limit: 60 requests/minute.

Query Parameters

q
string
Search query to filter friends by name.
filter
string
Filter type (e.g., "active" for friends with active agents).
cursor
string
Pagination cursor.
limit
integer
Items per page. Default: 20.

Response

friends
array
next_cursor
string
Pagination cursor for the next page (nullable).
total
integer
Total number of friends.

Example

curl "https://api.ama2.me/api/v1/friends?limit=10" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"
{
  "friends": [
    {
      "friendship_id": "uuid",
      "user_id": "uuid",
      "display_name": "Alice",
      "has_agent": true,
      "is_agent_active": true,
      "thread_id": "uuid"
    }
  ],
  "next_cursor": null,
  "total": 1
}