API:People:Create
Contents
API » Create Contact Personnel
Base URL
Endpoint
/api/contact/personnel/create/
Purpose
Creates a new person (personnel record) under an existing contact in your CallProof company. Use this to add individuals such as decision makers or other contacts at an account, optionally including role, notes, and phone numbers.
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 create 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 creation payload. |
| personnel.contact_id | integer | Yes | Unique identifier of the contact that will own the personnel record. Must belong to your company. |
| personnel.first_name | string | Yes | First name of the person. |
| personnel.last_name | string | No | Last name of the person. |
| personnel.email | string | No | Email address. |
| personnel.title | string | No | Job title. |
| personnel.notes | string | No | Free-text notes about the person. |
| personnel.role_id | integer | No | Role identifier. Must match an existing people role in your company when provided. |
| personnel.phones | array of strings | No | Phone numbers to associate with the person. Each value must contain at least 10 digits. An extension may be included using an x separator (for example, 5551234567x123).
|
cURL Example
curl -X POST "https://app.callproof.com/api/contact/personnel/create/" \
-H "Content-Type: application/json" \
-d '{
"api_key": {
"key": "YOUR_API_KEY",
"secret": "YOUR_API_SECRET"
},
"personnel": {
"contact_id": 789,
"first_name": "Sarah",
"last_name": "Jones",
"email": "sarah@acme.com",
"title": "Purchasing Manager",
"role_id": 3,
"notes": "Primary decision maker",
"phones": ["5551234567"]
}
}'
Successful Response (200)
Indicates the personnel record was created successfully. The response returns the new personnel details.
| Field | Type | Description |
|---|---|---|
| id | integer | Unique identifier for the personnel record. |
| fullname | string | Full display name of the person. |
| first_name | string | First name. |
| last_name | string | Last name. |
| title | string | Job title. |
| last_contacted | string | Date and time this person was last contacted, or empty if none. |
| role | string | Role name associated with the person, or empty if none. |
| string | Email address. | |
| updated | string | Date and time the personnel record was last updated (YYYY-MM-DD HH:MM:SS).
|
Example response:
{
"id": 55,
"fullname": "Sarah Jones",
"first_name": "Sarah",
"last_name": "Jones",
"title": "Purchasing Manager",
"last_contacted": "",
"role": "Decision Maker",
"email": "sarah@acme.com",
"updated": "2024-06-15 14:30:00"
}
Notes
personnelandcontact_idare required.first_nameis required.- The contact must belong to your company.
- If
role_idis provided, it must match an existing people role in your company. - Phone numbers in
phonesmust be numeric and at least 10 digits long. - An optional extension can be appended with
x(for example,5551234567x123). - On success, this endpoint returns the personnel object directly (not wrapped in a
results/errors/codeenvelope used by many other CallProof API endpoints). - Phone numbers provided during creation are associated with the new personnel record, but phone details are not included in the success response body.
Error Responses
| Status Code | Meaning |
|---|---|
| 400 | Bad Request – The JSON is invalid, required fields are missing, the contact/role is invalid, or one or more phone numbers are invalid. |
| 401 | Unauthorized – The API key and/or secret is missing, invalid, inactive, associated with a disabled account, or lacks permission to create 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 examples:
{
"results": [],
"errors": ["personnel data is required."],
"code": 400
}
{
"results": [],
"errors": ["First name is required."],
"code": 400
}
{
"results": [],
"errors": ["55512 is not a valid phone number"],
"code": 400
}
401 response body example:
{
"results": [],
"errors": ["Invalid API Key"],
"code": 401
}
405 response body example:
{
"results": [],
"errors": ["Method not allowed"],
"code": 405
}