Update Custom fields option
Revision as of 13:05, 17 July 2026 by Ashley DeBon (talk | contribs) (Created page with "== Update Contact Custom Fields == === Base URL === https://apimobile.callproof.com === Endpoint === /api/contact/{id}/custom-fields === Purpose === Updates custom field va...")
Contents
Update Contact Custom Fields
Base URL
https://apimobile.callproof.com
Endpoint
/api/contact/{id}/custom-fields
Purpose
Updates custom field values for a specific contact. Accepts a JSON list of field values and saves each supported field type (text, select, radio, checkbox, textarea, date/time, number, image, and multi-select).
HTTP Method
PUT
Headers
| Header | Required | Description |
|---|---|---|
| Authorization | Yes | Bearer access token |
| Content-Type | Conditional | Use multipart/form-data when uploading image custom-field files; otherwise form/JSON body is fine
|
Security
- Yes – Requires Bearer Token authentication.
Parameters
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | integer | Yes | Unique identifier of the contact whose custom fields are being updated |
Query Parameters
None.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| form_data | string (JSON) | Yes | JSON array (or single object) of custom field values to update |
| form_field_file_{custom_field_id} | file | No | Image file for an image-type custom field (file name includes the custom field ID) |
| contact_image | file | No | Alternate image upload field used by some image custom-field flows |
form_data object fields
| Parameter | Type | Required | Description |
|---|---|---|---|
| custom_field_id | integer | Yes | Custom field identifier (alias: field_id)
|
| custom_field_type_id | integer | Yes | Field type identifier (alias: cfield_type_id). Supported values: 1 text, 2 select, 3 radio, 4 checkbox, 6 textarea, 7 date, 8 time, 9 datetime, 10 integer, 11 decimal, 12 auto-integer, 13 image, 14 multiple select
|
| value | string | Conditional | Field value for text, checkbox, textarea, date/time, number, image, and multiple-select fields |
| option_selected_id | integer/string | Conditional | Selected option ID for select and radio fields |
| custom_field_option_default_id | string | No | Optional default/selected option identifier |
| required | boolean | No | Whether the field is marked required (defaults to false when omitted) |
Successful Response (200)
Indicates that the contact custom fields 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, "Custom fields updated Sucessfully") |
| 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 – custom fields could not be updated |
| 401 | Unauthorized – missing, invalid, or expired Bearer token |
- Validation (HTTP 200, clientStatusCode 401) – Missing
form_data. - 400 – Invalid field value (for example, "Text Field is Required", "Select Field is Required"), or a general update failure (for example, "Something went wrong while updating custom fields" / "Error While Updating the custom fields").
- 401 – Authentication failed or the access token is missing/expired.