API:People:Delete

From docs
Jump to: navigation, search

API » Delete Contact Personnel

Base URL

https://app.callproof.com

Endpoint

/api/contact/personnel/delete/<personnel_id>/

Purpose

Permanently removes a person (personnel record) associated with a contact in your CallProof company. Use this when an individual should no longer remain linked to the contact account.

HTTP Method

GET

Headers

No required headers.

Header Required Description
No headers are required for this endpoint. Authentication is provided via query parameters.

Security

  • Yes – Requires a valid API key and secret with permission to delete contacts.

Parameters

Path Parameters

Parameter Type Required Description
personnel_id integer Yes Unique identifier of the personnel record to delete. Must belong to your company.

Query Parameters

Parameter Type Required Description
key string Yes Public API key assigned to your CallProof account.
secret string Yes Private API secret paired with the API key.

Request Body

None.

cURL Example

curl -X GET "https://app.callproof.com/api/contact/personnel/delete/55/?key=YOUR_API_KEY&secret=YOUR_API_SECRET"

Successful Response (200)

Indicates the personnel record was successfully deleted.

Field Type Description
result string Confirmation message indicating the personnel record was deleted.
code integer HTTP-style status value; 200 on success.

Example response:

{
  "result": "Contacts deleted successfully.",
  "code": 200
}

Notes

  • personnel_id is provided in the URL path.
  • The personnel record must belong to your company.
  • This action permanently deletes the personnel record and cannot be undone through this endpoint.
  • Deleting a personnel record does not delete the parent contact.
  • Unlike most create/update endpoints, this endpoint uses GET with credentials in the query string.
  • On success, the response uses a result/code format rather than the results/errors/code envelope used by many other CallProof API endpoints.

Error Responses

Status Code Meaning
400 Bad Request – The personnel ID is invalid, does not match a personnel record in your company, or the record could not be deleted.
401 Unauthorized – The API key and/or secret is missing, invalid, inactive, associated with a disabled account, or lacks permission to delete contacts.
405 Method Not Allowed – A method other than GET was used.
500 Internal Server Error – An unexpected server problem occurred. Not specified in Swagger.

400 response body examples:

{
  "results": [],
  "errors": ["Invalid contact people id."],
  "code": 400
}
{
  "results": [],
  "errors": ["Error Occur - Unable to delete personnel"],
  "code": 400
}

401 response body example:

{
  "results": [],
  "errors": ["Invalid API Key"],
  "code": 401
}

405 response body example:

{
  "results": [],
  "errors": ["Method not allowed"],
  "code": 405
}