Difference between revisions of "Account live search"

From docs
Jump to: navigation, search
(Contact Live Search)
(Successful Response (200))
 
Line 37: Line 37:
 
| search || string || No || Search text used to match contacts. If omitted or empty, an empty result list is returned
 
| search || string || No || Search text used to match contacts. If omitted or empty, an empty result list is returned
 
|}
 
|}
 +
 +
=== cURL Example for Android ===
 +
 +
<pre> curl --location 'https://apimobile.callproof.com/api/contact-live-search' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --header 'Content-Type: application/json' \ --data '{ "search": "YOUR_SEARCH_TEXT" }' </pre>
 +
 +
=== cURL Example for iOS ===
 +
 +
<pre> curl --location 'https://apimobile.callproof.com/api/contact-live-search' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --header 'Content-Type: application/json' \ --data '{ "search": "YOUR_SEARCH_TEXT" }' </pre>
  
 
=== Successful Response (200) ===
 
=== Successful Response (200) ===

Latest revision as of 11:57, 21 July 2026

Mobile_API »Contact Live Search

Base URL

https://apimobile.callproof.com

Endpoint

/api/contact-live-search

Purpose

Performs a live search of contacts within the authenticated user’s company. Matches are found against contact title, first name, last name, and company name.

HTTP Method

POST

Headers

Header Required Description
Authorization Yes Bearer access token

Security

  • Yes – Requires Bearer Token authentication.

Parameters

Path Parameters

None.

Query Parameters

None.

Request Body

Parameter Type Required Description
search string No Search text used to match contacts. If omitted or empty, an empty result list is returned

cURL Example for Android

 curl --location 'https://apimobile.callproof.com/api/contact-live-search' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --header 'Content-Type: application/json' \ --data '{ "search": "YOUR_SEARCH_TEXT" }' 

cURL Example for iOS

 curl --location 'https://apimobile.callproof.com/api/contact-live-search' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --header 'Content-Type: application/json' \ --data '{ "search": "YOUR_SEARCH_TEXT" }' 

Successful Response (200)

Returns matching contacts for the company.

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 List of matching contacts
uri string Requested resource URI

data[]

Field Type Description
id integer Unique identifier of the contact
title string Contact title
contact_name string Display name: company name when available; otherwise first name + last name

Error Responses

Status Code Meaning
400 Bad Request – contact search could not be completed
401 Unauthorized – missing, invalid, or expired Bearer token
  • 400 – An error occurred while searching contacts (for example, "Unfortunately, we’ve encountered an error and alerted CallProof.").
  • 401 – Authentication failed or the access token is missing/expired.