Skip to main content
GET
/
api
/
v2
/
admin
/
team-members
/
{tenantId}
List team members
curl --request GET \
  --url https://faisalshop.mvp-apps.ae/api/v2/admin/team-members/{tenantId} \
  --header 'Authorization: Bearer <token>'
{
  "team_members": {
    "current_page": 123,
    "data": [
      {
        "id": 123,
        "name": "<string>",
        "email": "jsmith@example.com",
        "role": "ADMIN",
        "is_active": 123,
        "last_active_at": "2023-11-07T05:31:56Z"
      }
    ],
    "per_page": 123,
    "total": 123
  }
}

Overview

Retrieve all team members for a specific tenant (organization). This endpoint returns paginated results with member details including their role and activity status.

Authorization

  • User must be authenticated with a valid Bearer token
  • User must be a member of the specified tenant

Security

Users from different tenants will receive empty results (not a 403 error). This ensures tenant isolation while maintaining a consistent API experience.

Response Details

The response includes:
  • User basic information (id, name, email)
  • Role within the tenant (ADMIN or MEMBER)
  • Activity status (is_active)
  • Last activity timestamp

Performance

This endpoint uses an optimized single JOIN query instead of N+1 queries for better performance with large teams.

Example Usage

curl -X GET \
  https://faisalshop.mvp-apps.ae/api/v2/admin/team-members/1 \
  -H 'Authorization: Bearer YOUR_TOKEN'
const response = await axios.get(
  `/api/v2/admin/team-members/${tenantId}`,
  {
    headers: { Authorization: `Bearer ${token}` }
  }
);

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

tenantId
integer
required

Tenant ID

Response

200 - application/json

List of team members

team_members
object