Difference between revisions of "Team List"

From docs
Jump to: navigation, search
(Get Team)
(Successful Response (200))
 
Line 37: Line 37:
 
==== Request Body ====
 
==== Request Body ====
 
None.
 
None.
 +
 +
=== cURL Example for Android ===
 +
 +
<pre> curl --location 'https://apimobile.callproof.com/api/team?search=' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' </pre>
 +
 +
=== cURL Example for iOS ===
 +
 +
<pre> curl --location 'https://apimobile.callproof.com/api/team?search=' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' </pre>
  
 
=== Successful Response (200) ===
 
=== Successful Response (200) ===

Latest revision as of 11:22, 21 July 2026

Mobile_API »Get Team

Base URL

https://apimobile.callproof.com

Endpoint

/api/team

Purpose

Retrieves the authenticated user’s team list for messaging/collaboration. The list combines company team members, chat groups, and cross-company (external) chat users, sorted by most recent message. An optional search filters people by name and groups by group name.

HTTP Method

GET

Headers

Header Required Description
Authorization Yes Bearer access token

Security

  • Yes – Requires Bearer Token authentication.

Parameters

Path Parameters

None.

Query Parameters

Parameter Type Required Description
search string No Filters team members by first/last name (prefix match) and groups/external users by name contains

Request Body

None.

cURL Example for Android

 curl --location 'https://apimobile.callproof.com/api/team?search=' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' 

cURL Example for iOS

 curl --location 'https://apimobile.callproof.com/api/team?search=' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' 

Successful Response (200)

Returns a combined list of team members, groups, and external users, sorted by latest message time (newest first).

Field Type Description
clientStatusCode integer Status indicator for the client (for example, 200)
user_id integer Identifier of the authenticated user
company_id integer Identifier of the authenticated user’s company
data array Team / group / external-user entries
uri string Requested resource URI

data[]

Field Type Description
team_id integer User ID for a person, or room record ID for a group
team_name string Person full name, or group name
title string Job title for a person, or Group for groups
is_group boolean true for groups; false for individual users
company_name string Company name (empty for groups)
is_cross_company_room boolean true for cross-company chats
edit_access boolean Whether the authenticated user can edit the group
is_group_admin boolean Whether the authenticated user is a group admin
group_count integer Number of members in the group (0 for individuals)
phone string Phone number for a person (empty for groups)
event_status string Idle/activity status for a person
color_code string Status color code
font_color_code string Status font color code
streak_start string/number Streak start value (when available)
streak_end string/number Streak end value (when available)
streak_value number Current streak value
badges_image string Badge image URL, when available
profile_image string Profile image URL for a person
group_icon string Group icon URL (groups only)
room_id string/integer Chat room identifier
last_message string Unix timestamp of the last message, or 0 when none
unread_count integer Number of unread messages for the authenticated user
goal_details object Goal progress details (see below)

data[].goal_details

Field Type Description
goal_type string Goal type (for example, amount), or empty for groups
target_points number Target goal value
total_points number Current progress toward the goal

Error Responses

Status Code Meaning
400 Bad Request – team list could not be retrieved
401 Unauthorized – missing, invalid, or expired Bearer token
  • 400 – An error occurred while retrieving the team list (for example, "Error while retriving the Teams List").
  • 401 – Authentication failed or the access token is missing/expired.