Difference between revisions of "Update the Contact Selected Users"

From docs
Jump to: navigation, search
(Created page with "== Update Contact Selected Users == === Base URL === https://apimobile.callproof.com === Endpoint === /api/contacts/{id}/selected-users === Purpose === Updates the users (s...")
 
(Successful Response (200))
 
Line 41: Line 41:
 
| user_id || string (JSON array) || No || JSON array of user IDs to assign to the contact (for example, <code>[12,34]</code>). If omitted, an empty list is used
 
| user_id || string (JSON array) || No || JSON array of user IDs to assign to the contact (for example, <code>[12,34]</code>). If omitted, an empty list is used
 
|}
 
|}
 +
 +
=== cURL Example for Android ===
 +
<pre>
 +
curl --location --request PUT 'https://apimobile.callproof.com/api/contacts/{id}/selected-users' \
 +
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
 +
--form 'user_id=[12,34]'
 +
</pre>
 +
=== cURL Example for iOS ===
 +
<pre>
 +
curl --location --request PUT 'https://apimobile.callproof.com/api/contacts/{id}/selected-users' \
 +
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
 +
--form 'user_id=[12,34]'
 +
</pre>
  
 
=== Successful Response (200) ===
 
=== Successful Response (200) ===

Latest revision as of 11:46, 17 July 2026

Update Contact Selected Users

Base URL

https://apimobile.callproof.com

Endpoint

/api/contacts/{id}/selected-users

Purpose

Updates the users (sales reps) assigned to a contact. The request supplies a list of user IDs to associate with the contact.

HTTP Method

PUT

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
user_id string (JSON array) No JSON array of user IDs to assign to the contact (for example, [12,34]). If omitted, an empty list is used

cURL Example for Android

curl --location --request PUT 'https://apimobile.callproof.com/api/contacts/{id}/selected-users' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--form 'user_id=[12,34]'

cURL Example for iOS

curl --location --request PUT 'https://apimobile.callproof.com/api/contacts/{id}/selected-users' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--form 'user_id=[12,34]'

Successful Response (200)

Indicates that the contact’s assigned users were updated 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 Users Updated Successfully")
uri string Requested resource URI

Error Responses

Status Code Meaning
400 Bad Request – the selected users could not be updated
401 Unauthorized – missing, invalid, or expired Bearer token
  • 400 – Contact not found ("Contact Not Found"), or another error while updating assigned users (for example, "Error While Updating Contact Selected Users").
  • 401 – Authentication failed or the access token is missing/expired.