Difference between revisions of "API:ContactNote:New"
Greg Donald (talk | contribs) |
Ashley DeBon (talk | contribs) |
||
| (One intermediate revision by one other user not shown) | |||
| Line 2: | Line 2: | ||
== [[API]] » New Contact Note == | == [[API]] » New Contact Note == | ||
| − | + | === Base URL === | |
| + | https://app.callproof.com | ||
| − | + | === Endpoint === | |
| + | /api/contact_note/new/ | ||
| − | + | === Purpose === | |
| + | Creates a new note for an existing contact in your CallProof company. Use this to record follow-up details, conversation notes, or other free-text information against a 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 create contact notes. Credentials are sent in the request body. | ||
| − | + | === Parameters === | |
| − | + | ==== Path Parameters ==== | |
| − | * '''''errors''''' | + | None. |
| − | + | ||
| + | ==== Query Parameters ==== | ||
| + | None. | ||
| + | |||
| + | ==== 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 creation payload. | ||
| + | |- | ||
| + | | contact_note.contact_id || integer || Yes || Unique identifier of the contact that will own the note. Must belong to your company. | ||
| + | |- | ||
| + | | contact_note.note || string || Yes || Note text content. Leading/trailing spaces are removed. Maximum 4,096 characters. | ||
| + | |- | ||
| + | | contact_note.user_id || integer || Yes || User ID of the sales representative or user credited as the note creator. Must belong to your company. | ||
| + | |- | ||
| + | | contact_note.created || datetime string || No || Date and time the note was created. If omitted or invalid, the current date/time is used. | ||
| + | |} | ||
| + | |||
| + | === cURL Example === | ||
| + | <pre> | ||
| + | curl -X POST "https://app.callproof.com/api/contact_note/new/" \ | ||
| + | -H "Content-Type: application/json" \ | ||
| + | -d '{ | ||
| + | "api_key": { | ||
| + | "key": "YOUR_API_KEY", | ||
| + | "secret": "YOUR_API_SECRET" | ||
| + | }, | ||
| + | "contact_note": { | ||
| + | "contact_id": 789, | ||
| + | "note": "Followed up on proposal.", | ||
| + | "user_id": 456 | ||
| + | } | ||
| + | }' | ||
| + | </pre> | ||
| + | |||
| + | === Successful Response (200) === | ||
| + | Indicates the note was created successfully. The response returns the new note details. | ||
| + | |||
| + | {| class="wikitable" | ||
| + | ! Field !! Type !! Description | ||
| + | |- | ||
| + | | results || object || Newly created contact note details. | ||
| + | |- | ||
| + | | results.id || integer || Unique identifier for the 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 note. | ||
| + | |- | ||
| + | | errors || array || Empty list when the request succeeds. | ||
| + | |- | ||
| + | | code || integer || HTTP-style status value; <code>200</code> on success. | ||
| + | |} | ||
| + | |||
| + | 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> | ||
| + | |||
| + | === Notes === | ||
| + | * <code>contact_id</code>, <code>note</code>, and <code>user_id</code> are required. | ||
| + | * The contact and the user credited on the note must both belong to your company. | ||
| + | * Note text is limited to 4,096 characters. | ||
| + | * If <code>created</code> is omitted or cannot be interpreted, the current date/time is used. | ||
| + | * Creating a note also refreshes the parent contact’s last-updated timestamp. | ||
| + | * Field-level validation failures typically return HTTP <code>200</code> with details in the <code>errors</code> array and an empty <code>results</code> object. | ||
| + | |||
| + | === Error Responses === | ||
| + | {| class="wikitable" | ||
| + | ! Status Code !! Meaning | ||
| + | |- | ||
| + | | 200 || Validation issue – The note text is missing, or the user ID is missing/invalid for your company. | ||
| + | |- | ||
| + | | 400 || Bad Request – The contact ID is missing, invalid, or does not match a contact in your company. | ||
| + | |- | ||
| + | | 401 || Unauthorized – The API key and/or secret is missing, invalid, inactive, associated with a disabled account, or lacks permission to create 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. | ||
| + | |} | ||
| + | |||
| + | '''200 validation response examples:''' | ||
| + | <pre> | ||
| + | { | ||
| + | "results": {}, | ||
| + | "errors": [ | ||
| + | {"note": "required field"} | ||
| + | ], | ||
| + | "code": 200 | ||
| + | } | ||
| + | </pre> | ||
| + | |||
| + | <pre> | ||
| + | { | ||
| + | "results": {}, | ||
| + | "errors": [ | ||
| + | {"user_id": "required field"} | ||
| + | ], | ||
| + | "code": 200 | ||
| + | } | ||
| + | </pre> | ||
| + | |||
| + | '''400 response body example:''' | ||
| + | <pre> | ||
| + | { | ||
| + | "results": [], | ||
| + | "errors": ["Invalid 'contact_id' field"], | ||
| + | "code": 400 | ||
| + | } | ||
| + | </pre> | ||
| + | |||
| + | '''401 response body example:''' | ||
| + | <pre> | ||
| + | { | ||
| + | "results": [], | ||
| + | "errors": ["Invalid API Key"], | ||
| + | "code": 401 | ||
| + | } | ||
| + | </pre> | ||
| + | |||
| + | '''405 response body example:''' | ||
| + | <pre> | ||
| + | { | ||
| + | "results": [], | ||
| + | "errors": ["Method not allowed"], | ||
| + | "code": 405 | ||
| + | } | ||
| + | </pre> | ||
Latest revision as of 12:06, 17 July 2026
Contents
API » New Contact Note
Base URL
Endpoint
/api/contact_note/new/
Purpose
Creates a new note for an existing contact in your CallProof company. Use this to record follow-up details, conversation notes, or other free-text information against a 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 create 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 creation payload. |
| contact_note.contact_id | integer | Yes | Unique identifier of the contact that will own the note. Must belong to your company. |
| contact_note.note | string | Yes | Note text content. Leading/trailing spaces are removed. Maximum 4,096 characters. |
| contact_note.user_id | integer | Yes | User ID of the sales representative or user credited as the note creator. Must belong to your company. |
| contact_note.created | datetime string | No | Date and time the note was created. If omitted or invalid, the current date/time is used. |
cURL Example
curl -X POST "https://app.callproof.com/api/contact_note/new/" \
-H "Content-Type: application/json" \
-d '{
"api_key": {
"key": "YOUR_API_KEY",
"secret": "YOUR_API_SECRET"
},
"contact_note": {
"contact_id": 789,
"note": "Followed up on proposal.",
"user_id": 456
}
}'
Successful Response (200)
Indicates the note was created successfully. The response returns the new note details.
| Field | Type | Description |
|---|---|---|
| results | object | Newly created contact note details. |
| results.id | integer | Unique identifier for the 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 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
contact_id,note, anduser_idare required.- The contact and the user credited on the note must both belong to your company.
- Note text is limited to 4,096 characters.
- If
createdis omitted or cannot be interpreted, the current date/time is used. - Creating a note also refreshes the parent contact’s last-updated timestamp.
- Field-level validation failures typically return HTTP
200with details in theerrorsarray and an emptyresultsobject.
Error Responses
| Status Code | Meaning |
|---|---|
| 200 | Validation issue – The note text is missing, or the user ID is missing/invalid for your company. |
| 400 | Bad Request – The contact ID is missing, invalid, or does not match a contact in your company. |
| 401 | Unauthorized – The API key and/or secret is missing, invalid, inactive, associated with a disabled account, or lacks permission to create 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. |
200 validation response examples:
{
"results": {},
"errors": [
{"note": "required field"}
],
"code": 200
}
{
"results": {},
"errors": [
{"user_id": "required field"}
],
"code": 200
}
400 response body example:
{
"results": [],
"errors": ["Invalid 'contact_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
}