Update the Contact Phone Based on ContactId
Revision as of 09:06, 17 July 2026 by Ashley DeBon (talk | contribs) (Created page with "== Update Contact Phone == === Base URL === https://apimobile.callproof.com === Endpoint === /api/contacts/{id}/phone/{phone_id} === Purpose === Updates an existing phone n...")
Contents
Update Contact Phone
Base URL
https://apimobile.callproof.com
Endpoint
/api/contacts/{id}/phone/{phone_id}
Purpose
Updates an existing phone number for a contact. You can change the number, type, extension, and country code, and replace which people (personnel) are linked to that phone, including their per-person extensions.
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 |
| phone_id | integer | Yes | Unique identifier of the phone record to update |
Query Parameters
None.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| phone_number | string | No | Updated phone number (digits only after processing; when provided, length must be between 10 and 15 characters; letters are not allowed) |
| phone_type_id | integer | No | Phone type identifier (for example, Cell, Work, Home) |
| extension | string | No | Main extension for the phone number (maximum 6 characters) |
| country_code | string | No | Country code associated with the phone number |
| associated_contacts | string (JSON array) | No | JSON array of personnel IDs to associate with this phone (replaces existing links; for example, [12,34])
|
| associated_contacts_extension | string (JSON array) | No | JSON array of extensions corresponding to each personnel ID in associated_contacts (same order)
|
Successful Response (200)
Indicates that the contact phone was 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 phone was updated 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 phone could not be updated |
| 401 | Unauthorized – missing, invalid, or expired Bearer token |
- Validation (HTTP 200, clientStatusCode 401) – Invalid
phone_type_id, invalidphone_numberformat/length, orextensionlonger than 6 characters. - 400 – Contact not found ("Contact Not Found"), phone already exists on the contact ("Phone Number Already Exists"), phone record not found ("Contact Phone Not Found"), or another update error ("Error While Updating Contact Phone").
- 401 – Authentication failed or the access token is missing/expired.