List console users
Returns the rooftop's console users plus anyone with a pending invite.
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
teamIdandenterpriseId. -
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
- Send
Authorization: Bearer YOUR_TOKEN. - Pass
teamIdandenterpriseId(camelCase). - To see only the rooftop's own users, add
skipEnterpriseFallback=true.
| Parameter | Type | Required | Description |
|---|---|---|---|
| Query parameters | — | — | Sent in the query string. |
teamId | string | Required | Rooftop ID. |
enterpriseId | string | Required | Dealer group ID. |
skipEnterpriseFallback | boolean | Optional | Default false. When true, do not fall back to dealer group users. |
| Headers | — | — | Sent as HTTP headers. |
Authorization | string | Required | Bearer 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
| Parameter | Type | Description |
|---|---|---|
data[] | array | Users and pending invites. |
data[].userId | string | User ID. For pending invites, this is a random ID made for each response, not a real user. |
data[].name, email, isdCode, contactNo | string | Contact details. |
data[].active | string | Active, Inactive or Invite Sent. |
data[].department | string or null | Department. |
data[].designation | string or null | Job title. |
data[].communicationPreference | object | {studioAi: {email[]}, conversationAi: {email[], sms[], department[]}}. {} when not set. |
data[].teamRole | string or null | ENTERPRISE_OWNER, TEAM_ADMIN, TEAM_STANDARD or null. |
Errors
| Status | Reason | When it happens |
|---|---|---|
400 | Invalid input | teamId or enterpriseId is missing or empty. |
401 | ERROR_AUTH_401 | Missing or invalid token. |
500 | ERROR_SERVER_500 | Database error. |
Next
Show the list. Invite new users with Invite console users.
- Called before: none in this task.
- Called after: Invite console users.
Updated about 1 hour ago
