Update the Contact Company Details

From docs
Jump to: navigation, search

Update Contact Company Details

Base URL

https://apimobile.callproof.com

Endpoint

/api/contacts/{id}/company-details

Purpose

Updates company-level details for a specific contact. This includes the parent company name and company-related custom field values, so account company information can be maintained from the contact profile.

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 string / integer Yes Unique identifier of the contact whose company details are being updated

Query Parameters

None.

Request Body

Parameter Type Required Description
parent_company_name string No Parent company name to save on the contact
company_details string No JSON string containing company custom field values to update for the contact

cURL Example for Android

curl --location --request PUT 'https://apimobile.callproof.com/api/contacts/{id}/company-details' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--form 'parent_company_name=YOUR_PARENT_COMPANY_NAME'

cURL Example for iOS

curl --location --request PUT 'https://apimobile.callproof.com/api/contacts/{id}/company-details' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--form 'parent_company_name=YOUR_PARENT_COMPANY_NAME'

Successful Response (200)

Indicates that the contact’s company details 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, "Account Company Details Updated Successfully")
uri string Requested resource URI

Error Responses

Status Code Meaning
400 Bad Request – company details could not be updated successfully
401 Unauthorized – missing, invalid, or expired Bearer token
  • 400 – An error occurred while updating the parent company name or company custom field values (for example, "Error While Updating Account Company Details").
  • 401 – Authentication failed or the access token is missing/expired.