Difference between revisions of "Other company user search"

From docs
Jump to: navigation, search
(External User Search)
(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/external-user-search?search=user@example.com' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' </pre>
 +
 +
=== cURL Example for iOS ===
 +
 +
<pre> curl --location 'https://apimobile.callproof.com/api/external-user-search?search=user@example.com' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' </pre>
  
 
=== Successful Response (200) ===
 
=== Successful Response (200) ===

Latest revision as of 11:27, 21 July 2026

Mobile_API »External User Search

Base URL

https://apimobile.callproof.com

Endpoint

/api/external-user-search

Purpose

Searches for another user by email address (including users outside the authenticated user’s company). Returns profile details when the user is found, enabled, and allowed to be contacted (or when the searcher’s company is in the exception list / same company). Cross-company searches are logged.

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 Yes Email address of the user to find (must be a valid email format)

Request Body

None.

cURL Example for Android

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

cURL Example for iOS

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

Successful Response (200)

Returns the matched user details when available. If no eligible user is found, data may be null.

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 object/null Matched user payload, or null when no eligible match
uri string Requested resource URI

data

Field Type Description
search_result_user_id integer Identifier of the matched user
search_result_company_id integer Company identifier of the matched user
name string Full name of the matched user
company_name string Company name of the matched user
role string Job title / role name of the matched user
badges_image string URL of the user’s badge image, when available
is_cross_company boolean true when the matched user belongs to a different company
room_id integer/string Messaging room ID between the authenticated user and the matched user, when available
profile_image string URL of the user’s profile thumbnail, when available

Error Responses

Status Code Meaning
200 Validation failed – response body uses clientStatusCode 401 with the first validation error message
400 Bad Request – external user search failed
401 Unauthorized – missing, invalid, or expired Bearer token
  • Validation (HTTP 200, clientStatusCode 401) – Missing search, or value is not a valid email.
  • 400 – An error occurred while retrieving the external user (for example, "Error while retrieving external user").
  • 401 – Authentication failed or the access token is missing/expired.