Difference between revisions of "API:ContactNote:Delete"

From docs
Jump to: navigation, search
(Created page with " == API » Delete Contact Note == '''URL:''' <nowiki>https://app.callproof.com/api/contact_note/delete/</nowiki> '''Method:''' POST '''Required Fields:''' * '''''a...")
 
 
Line 1: Line 1:
 +
== [[API]] &#187; Delete Contact Note ==
 +
 +
=== Base URL ===
 +
https://app.callproof.com
 +
 +
=== Endpoint ===
 +
/api/contact_note/delete/
 +
 +
=== Purpose ===
 +
Permanently removes a contact note from your CallProof company. Use this when a note should no longer be retained on the contact record.
 +
 +
=== HTTP Method ===
 +
POST
 +
 +
=== Headers ===
 +
{| class="wikitable"
 +
! Header !! Required !! Description
 +
|-
 +
| Content-Type || Yes || Must be <code>application/json</code>.
 +
|}
 +
 +
=== Security ===
 +
* '''Yes''' – Requires a valid API key and secret with permission to delete contact notes. Credentials are sent in the request body.
 +
 +
=== Parameters ===
 +
 +
==== Path Parameters ====
 +
None.
 +
 +
==== Query Parameters ====
 +
None.
  
== [[API]] &#187; Delete Contact Note ==
+
==== Request Body ====
 +
{| class="wikitable"
 +
! 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.
 +
|-
 +
| contact_note || object || Yes || Contact note deletion payload.
 +
|-
 +
| contact_note.id || integer || Yes || Unique identifier of the note to delete. Must belong to your company.
 +
|}
 +
 
 +
=== cURL Example ===
 +
<pre>
 +
curl -X POST "https://app.callproof.com/api/contact_note/delete/" \
 +
  -H "Content-Type: application/json" \
 +
  -d '{
 +
    "api_key": {
 +
      "key": "YOUR_API_KEY",
 +
      "secret": "YOUR_API_SECRET"
 +
    },
 +
    "contact_note": {
 +
      "id": 1001
 +
    }
 +
  }'
 +
</pre>
  
'''URL:''' <nowiki>https://app.callproof.com/api/contact_note/delete/</nowiki>
+
=== Successful Response (200) ===
 +
Indicates the note was successfully deleted. The response returns the details of the deleted note.
  
'''Method:''' POST
+
{| class="wikitable"
 +
! Field !! Type !! Description
 +
|-
 +
| results || object || Details of the deleted contact note.
 +
|-
 +
| results.id || integer || Unique identifier of the deleted note.
 +
|-
 +
| results.created || string || Date and time the note was created (<code>YYYY-MM-DD HH:MM:SS</code>).
 +
|-
 +
| results.created_by_id || integer || User ID of the person who created the note.
 +
|-
 +
| results.created_by_email || string || Email address of the person who created the note.
 +
|-
 +
| results.created_by || string || Display name of the person who created the note.
 +
|-
 +
| results.contact_id || integer || Identifier of the contact associated with the note.
 +
|-
 +
| results.contact || string || Display name of the associated contact.
 +
|-
 +
| results.company_id || integer || Identifier of the company associated with the contact.
 +
|-
 +
| results.company || string || Company name associated with the contact.
 +
|-
 +
| results.note || string || Text content of the deleted note.
 +
|-
 +
| errors || array || Empty list when the request succeeds.
 +
|-
 +
| code || integer || HTTP-style status value; <code>200</code> on success.
 +
|}
  
'''Required Fields:'''
+
Example response:
 +
<pre>
 +
{
 +
  "results": {
 +
    "id": 1001,
 +
    "created": "2024-06-15 14:30:00",
 +
    "created_by_id": 456,
 +
    "created_by_email": "rep@example.com",
 +
    "created_by": "Jane Smith",
 +
    "contact_id": 789,
 +
    "contact": "John Doe",
 +
    "company_id": 321,
 +
    "company": "Acme Corp",
 +
    "note": "Followed up on proposal."
 +
  },
 +
  "errors": [],
 +
  "code": 200
 +
}
 +
</pre>
  
* '''''api_key[key]''''' - API Key
+
=== Notes ===
* '''''api_key[secret]''''' - API Key Secret
+
* The <code>id</code> parameter is the note ID, not the contact ID.
* '''''contact_note[id]''''' - Contact Note ID
+
* The note must belong to your company.
 +
* This action permanently deletes the note and cannot be undone through this endpoint.
 +
* The response returns the deleted note’s details for confirmation.
 +
* Deleting a note does not delete the associated contact.
  
'''Optional Fields:'''
+
=== Error Responses ===
 +
{| class="wikitable"
 +
! Status Code !! Meaning
 +
|-
 +
| 400 || Bad Request – The note ID is missing, invalid, or does not match a note in your company.
 +
|-
 +
| 401 || Unauthorized – The API key and/or secret is missing, invalid, inactive, associated with a disabled account, or lacks permission to delete contact notes.
 +
|-
 +
| 405 || Method Not Allowed – A method other than POST was used.
 +
|-
 +
| 500 || Internal Server Error – An unexpected server problem occurred. Not specified in Swagger.
 +
|}
  
None
+
'''400 response body example:'''
 +
<pre>
 +
{
 +
  "results": [],
 +
  "errors": ["Invalid 'id' field"],
 +
  "code": 400
 +
}
 +
</pre>
  
'''Data Returned:'''
+
'''401 response body example:'''
 +
<pre>
 +
{
 +
  "results": [],
 +
  "errors": ["Invalid API Key"],
 +
  "code": 401
 +
}
 +
</pre>
  
* '''''results''''' - Contact Note
+
'''405 response body example:'''
* '''''errors''''' - Array of errors produced by the request
+
<pre>
* '''''code''''' - HTTP request status
+
{
 +
  "results": [],
 +
  "errors": ["Method not allowed"],
 +
  "code": 405
 +
}
 +
</pre>

Latest revision as of 12:08, 17 July 2026

API » Delete Contact Note

Base URL

https://app.callproof.com

Endpoint

/api/contact_note/delete/

Purpose

Permanently removes a contact note from your CallProof company. Use this when a note should no longer be retained on the contact 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 delete contact notes. 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.
contact_note object Yes Contact note deletion payload.
contact_note.id integer Yes Unique identifier of the note to delete. Must belong to your company.

cURL Example

curl -X POST "https://app.callproof.com/api/contact_note/delete/" \
  -H "Content-Type: application/json" \
  -d '{
    "api_key": {
      "key": "YOUR_API_KEY",
      "secret": "YOUR_API_SECRET"
    },
    "contact_note": {
      "id": 1001
    }
  }'

Successful Response (200)

Indicates the note was successfully deleted. The response returns the details of the deleted note.

Field Type Description
results object Details of the deleted contact note.
results.id integer Unique identifier of the deleted note.
results.created string Date and time the note was created (YYYY-MM-DD HH:MM:SS).
results.created_by_id integer User ID of the person who created the note.
results.created_by_email string Email address of the person who created the note.
results.created_by string Display name of the person who created the note.
results.contact_id integer Identifier of the contact associated with the note.
results.contact string Display name of the associated contact.
results.company_id integer Identifier of the company associated with the contact.
results.company string Company name associated with the contact.
results.note string Text content of the deleted note.
errors array Empty list when the request succeeds.
code integer HTTP-style status value; 200 on success.

Example response:

{
  "results": {
    "id": 1001,
    "created": "2024-06-15 14:30:00",
    "created_by_id": 456,
    "created_by_email": "rep@example.com",
    "created_by": "Jane Smith",
    "contact_id": 789,
    "contact": "John Doe",
    "company_id": 321,
    "company": "Acme Corp",
    "note": "Followed up on proposal."
  },
  "errors": [],
  "code": 200
}

Notes

  • The id parameter is the note ID, not the contact ID.
  • The note must belong to your company.
  • This action permanently deletes the note and cannot be undone through this endpoint.
  • The response returns the deleted note’s details for confirmation.
  • Deleting a note does not delete the associated contact.

Error Responses

Status Code Meaning
400 Bad Request – The note ID is missing, invalid, or does not match a note in your company.
401 Unauthorized – The API key and/or secret is missing, invalid, inactive, associated with a disabled account, or lacks permission to delete contact notes.
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 'id' field"],
  "code": 400
}

401 response body example:

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

405 response body example:

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