List console users

Returns the rooftop's console users plus anyone with a pending invite.

GEThttps://api.spyne.ai/user-management/v1/team/get-team-users-details
AuthBearer token (console user)Rate limitNot documentedProcessingSynchronous. Database reads only.

Lists users linked to the rooftop with name, email, phone, status, department, designation, communication preferences and role. If the rooftop has no users of its own, the dealer group's users are returned instead, unless skipEnterpriseFallback=true. Pending invites for the rooftop are added with active: "Invite Sent". Nothing is written.

Before you call it

  • You need teamId and enterpriseId.

  • Authentication: Bearer token of a signed-in console user. The token is checked; the route does not check that the caller belongs to the rooftop.

  • Rate limit: Not documented

  • Processing: Synchronous. Database reads only.


Request

Requiredalways sendOptionalcan be left out
Request checklist
  1. Send Authorization: Bearer YOUR_TOKEN.
  2. Pass teamId and enterpriseId (camelCase).
  3. To see only the rooftop's own users, add skipEnterpriseFallback=true.
ParameterTypeRequiredDescription
Query parameters——Sent in the query string.
teamIdstringRequiredRooftop ID.
enterpriseIdstringRequiredDealer group ID.
skipEnterpriseFallbackbooleanOptionalDefault false. When true, do not fall back to dealer group users.
Headers——Sent as HTTP headers.
AuthorizationstringRequiredBearer YOUR_TOKEN

Sample request

curl -X GET "https://api.spyne.ai/user-management/v1/team/get-team-users-details?teamId=<teamId>&enterpriseId=<enterpriseId>" \
  -H "Authorization: Bearer YOUR_TOKEN"
import requests

res = requests.get(
    "https://api.spyne.ai/user-management/v1/team/get-team-users-details",
    params={"teamId": "<teamId>", "enterpriseId": "<enterpriseId>"},
    headers={"Authorization": "Bearer YOUR_TOKEN"},
)
print(res.status_code, res.json())
const qs = new URLSearchParams({ teamId: "<teamId>", enterpriseId: "<enterpriseId>" });
const res = await fetch(`https://api.spyne.ai/user-management/v1/team/get-team-users-details?${qs}`, {
  headers: { Authorization: "Bearer YOUR_TOKEN" },
});
console.log(res.status, await res.json());

Sample response

{
  "message": "Users fetched successfully",
  "error": false,
  "code": "",
  "details": null,
  "data": [
    {
      "userId": "<userId>",
      "name": "Jane Doe",
      "email": "[email protected]",
      "isdCode": "+1",
      "contactNo": "5550100000",
      "active": "Active",
      "department": null,
      "communicationPreference": { "studioAi": { "email": ["Weekly"] }, "conversationAi": { "email": ["Daily", "Post Call", "Campaign"], "sms": [], "department": [] } },
      "designation": "General Manager",
      "teamRole": "TEAM_ADMIN"
    },
    {
      "userId": "<generatedId>",
      "name": "John Roe",
      "email": "[email protected]",
      "isdCode": "+1",
      "contactNo": "5550100001",
      "active": "Invite Sent",
      "department": null,
      "communicationPreference": {},
      "designation": "BDC Manager",
      "teamRole": "TEAM_STANDARD"
    }
  ]
}
{ "message": "Team ID is required", "error": true, "code": "ERROR_BAD_REQ_400", "details": null, "data": null }
{ "message": "Invalid Token", "error": true, "code": "ERROR_AUTH_401", "details": "", "data": null }
{ "message": "General API error. Please try again later.", "error": true, "code": "ERROR_SERVER_500", "details": { "name": "Error", "message": "..." } }

200 OK. With no users, data is [] and message is No users found for this team.

400 Bad Request (input missing). The response body is the framework's default input-validation error. Its shape is not defined in the code. An empty value instead returns the body in the 400 Bad Request (input missing) tab.

Response fields

ParameterTypeDescription
data[]arrayUsers and pending invites.
data[].userIdstringUser ID. For pending invites, this is a random ID made for each response, not a real user.
data[].name, email, isdCode, contactNostringContact details.
data[].activestringActive, Inactive or Invite Sent.
data[].departmentstring or nullDepartment.
data[].designationstring or nullJob title.
data[].communicationPreferenceobject{studioAi: {email[]}, conversationAi: {email[], sms[], department[]}}. {} when not set.
data[].teamRolestring or nullENTERPRISE_OWNER, TEAM_ADMIN, TEAM_STANDARD or null.

Errors

StatusReasonWhen it happens
400Invalid inputteamId or enterpriseId is missing or empty.
401ERROR_AUTH_401Missing or invalid token.
500ERROR_SERVER_500Database error.

Next

Show the list. Invite new users with Invite console users.


Did this page help you?