API:People:Update
Contents
API »Update Contact Personnel
Base URL
Endpoint
/api/contact/personnel/update/
Purpose
Updates an existing person (personnel record) under a contact in your CallProof company. Use this to change details such as name, email, title, notes, or to enable/disable the personnel record.
HTTP Method
POST
Headers
| Header | Required | Description |
|---|---|---|
| Content-Type | Yes | Must be application/json.
|
Security
- Yes – Requires a valid API key and secret with permission to update contacts. Credentials are sent in the request body.
Parameters
Path Parameters
None.
Query Parameters
None.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key | object | Yes | Authentication credentials object. |
| api_key.key | string | Yes | Public API key assigned to your CallProof account. |
| api_key.secret | string | Yes | Private API secret paired with the API key. |
| personnel | object | Yes | Personnel update payload. |
| personnel.id | integer | Yes | Unique identifier of the personnel record to update. Must belong to your company. |
| personnel.first_name | string | No | Updated first name. Applied only when a non-empty value is provided. |
| personnel.last_name | string | No | Updated last name. |
| personnel.email | string | No | Updated email address. |
| personnel.title | string | No | Updated job title. |
| personnel.notes | string | No | Updated free-text notes about the person. |
| personnel.disable | integer | No | Set to 1 to disable the personnel record; 0 to keep it enabled.
|
cURL Example
curl -X POST "https://app.callproof.com/api/contact/personnel/update/" \
-H "Content-Type: application/json" \
-d '{
"api_key": {
"key": "YOUR_API_KEY",
"secret": "YOUR_API_SECRET"
},
"personnel": {
"id": 55,
"title": "Director of Purchasing",
"email": "sarah.jones@acme.com"
}
}'
Successful Response (200)
Indicates the personnel record was updated successfully. The response returns the updated personnel details.
| Field | Type | Description |
|---|---|---|
| results | object | Updated personnel details. |
| results.id | integer | Unique identifier for the personnel record. |
| results.fullname | string | Full display name of the person. |
| results.first_name | string | First name. |
| results.last_name | string | Last name. |
| results.title | string | Job title. |
| results.last_contacted | string | Date and time this person was last contacted, or empty if none. |
| results.role | string | Role name associated with the person, or empty if none. |
| results.email | string | Email address. |
| results.updated | string | Date and time the personnel record was last updated (YYYY-MM-DD HH:MM:SS).
|
| errors | object | Empty object when the request succeeds. |
| code | integer | HTTP-style status value; 200 on success.
|
Example response:
{
"results": {
"id": 55,
"fullname": "Sarah Jones",
"first_name": "Sarah",
"last_name": "Jones",
"title": "Director of Purchasing",
"last_contacted": "2024-06-15 14:30:00",
"role": "Decision Maker",
"email": "sarah.jones@acme.com",
"updated": "2024-06-15 14:35:00"
},
"errors": {},
"code": 200
}
Notes
- The
idparameter is the personnel record ID, not the contact ID. - The personnel record must belong to your company.
- Only the fields you provide are updated; omitted fields are left unchanged.
first_nameis applied only when a non-empty value is supplied.disablecontrols whether the personnel record is active:1disables it and0keeps it enabled.- Field-level validation issues are returned in the
errorsobject with HTTP200. - Invalid JSON in the request body returns HTTP
400.
Error Responses
| Status Code | Meaning |
|---|---|
| 200 | Validation issue – The personnel ID is missing, the personnel record was not found, or the record could not be saved. Details are provided in the errors object.
|
| 400 | Bad Request – The JSON payload is invalid. |
| 401 | Unauthorized – The API key and/or secret is missing, invalid, inactive, associated with a disabled account, or lacks permission to update contacts. |
| 405 | Method Not Allowed – A method other than POST was used. |
| 500 | Internal Server Error – An unexpected server problem occurred. Not specified in Swagger. |
400 response body example:
{
"results": [],
"errors": ["Invalid json data"],
"code": 400
}
200 validation response examples:
{
"results": [],
"errors": {
"personnel_id": ["Personnel ID required"]
},
"code": 200
}
{
"results": [],
"errors": {
"personnel_id": ["Personnel not found"]
},
"code": 200
}
401 response body example:
{
"results": [],
"errors": ["Invalid API Key"],
"code": 401
}
405 response body example:
{
"results": [],
"errors": ["Method not allowed"],
"code": 405
}