Add New labels For Specific Contact
Contents
Add Contact Label
Base URL
https://apimobile.callproof.com
Endpoint
/api/contact/{id}/label
Purpose
Assigns a label to a contact. You can either create a new label by name, or attach an existing label by ID.
HTTP Method
POST
Headers
| Header | Required | Description |
|---|---|---|
| Authorization | Yes | Bearer access token |
Security
- Yes – Requires Bearer Token authentication.
Parameters
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | integer | Yes | Unique identifier of the contact |
Query Parameters
None.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| label | string | Conditional | New label name to create and assign (maximum 100 characters). Required when label_id is not provided
|
| label_id | integer/string | Conditional | Existing label ID to assign to the contact. Required when label is not provided
|
cURL Example for Android
curl --location --request POST 'https://apimobile.callproof.com/api/contact/{id}/label' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--form 'label=YOUR_LABEL_NAME'
cURL Example for iOS
curl --location --request POST 'https://apimobile.callproof.com/api/contact/{id}/label' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--form 'label=YOUR_LABEL_NAME'
Successful Response (200)
Indicates that the label was assigned to the contact successfully.
| 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 |
| message | string | Confirmation message (for example, "contact label added successfully") |
| uri | string | Requested resource URI |
Error Responses
| Status Code | Meaning |
|---|---|
| 200 | Validation failed – response body uses clientStatusCode 401 with the first validation error message
|
| 400 | Bad Request – the label could not be added |
| 401 | Unauthorized – missing, invalid, or expired Bearer token |
- Validation (HTTP 200, clientStatusCode 401) – Neither
labelnorlabel_idwas provided, orlabelexceeds 100 characters. - 400 – Contact not found ("Contact Not Found"), label already exists on the account ("Label already exists on this Account"), or another add error (for example, "Error while Adding Contact Label").
- 401 – Authentication failed or the access token is missing/expired.