Difference between revisions of "Label List"

From docs
Jump to: navigation, search
(Created page with "== Get Labels == === Base URL === https://apimobile.callproof.com === Endpoint === /api/labels === Purpose === Retrieves labels for the authenticated user’s company. With...")
 
(Successful Response (200))
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
== Get Labels ==
+
== [[Mobile_API]] »Get Labels ==
  
 
=== Base URL ===
 
=== Base URL ===
Line 37: Line 37:
 
==== Request Body ====
 
==== Request Body ====
 
None.
 
None.
 +
 +
=== cURL Example for Android ===
 +
 +
<pre> curl --location 'https://apimobile.callproof.com/api/labels?search=' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' </pre>
 +
 +
=== cURL Example for iOS ===
 +
 +
<pre> curl --location 'https://apimobile.callproof.com/api/labels?search=' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' </pre>
  
 
=== Successful Response (200) ===
 
=== Successful Response (200) ===

Latest revision as of 12:12, 21 July 2026

Mobile_API »Get Labels

Base URL

https://apimobile.callproof.com

Endpoint

/api/labels

Purpose

Retrieves labels for the authenticated user’s company. Without a search term, returns distinct non-empty labels (names in lowercase). With a search term, returns matching labels by 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 labels by a partial, case-insensitive name match. If provided, it must not be empty/whitespace-only

Request Body

None.

cURL Example for Android

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

cURL Example for iOS

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

Successful Response (200)

Returns the company label list.

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 Label payload
uri string Requested resource URI

data.labels[]

Field Type Description
id integer Unique identifier of the label
name string Label name (lowercase and distinct when no search is used; original matching name when search is used)

Error Responses

Status Code Meaning
400 Bad Request – labels could not be retrieved
401 Unauthorized – missing, invalid, or expired Bearer token
  • 400 – Empty search value ("Label is Invalid"), or another error while loading labels.
  • 401 – Authentication failed or the access token is missing/expired.