Create Note
http
POST https://services.leadconnectorhq.com/contacts/{contactId}/notesAuthorization
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
Authorization | string | Yes | Bearer token generated from the Leadway portal. See Authentication. | |
Version | string | Yes | 2021-07-28 | API version. |
Path parameters
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
contactId | string | Yes | sx6wyHhbFdRXh302LLNR | Contact Id |
Body
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
userId | string | No | GCs5KuzPqTls7vWclkEV | |
body | string | Yes | lorem ipsum | |
title | string | No | Follow-up summary | |
color | string | No | #FFAA00 | |
pinned | boolean | No | False |
Responses
201 - Successful response
note(object)id(string): Example:HGPcayliwcdoUFzvbTokbody(string): Example:lorem ipsumuserId(string): Example:TUcmRxWrjqzJS8EjkxNKdateAdded(string): Example:2021-07-08T12:02:11.285ZcontactId(string): Example:TUcmRxWrjqzJS8EjkxNKtitle(string): Example:Follow-up summarycolor(string): Example:#FFAA00pinned(boolean): Example:False
json
{
"note": {
"id": "HGPcayliwcdoUFzvbTok",
"body": "lorem ipsum",
"userId": "TUcmRxWrjqzJS8EjkxNK",
"dateAdded": "2021-07-08T12:02:11.285Z",
"contactId": "TUcmRxWrjqzJS8EjkxNK",
"title": "Follow-up summary",
"color": "#FFAA00",
"pinned": false
}
}400 - Bad Request
json
{}422 - Unprocessable Entity
json
{}Example
curl -X POST 'https://services.leadconnectorhq.com/contacts/YOUR_contactId/notes' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"userId": "GCs5KuzPqTls7vWclkEV",
"body": "lorem ipsum",
"title": "Follow-up summary",
"color": "#FFAA00",
"pinned": false
}'const response = await fetch('https://services.leadconnectorhq.com/contacts/YOUR_contactId/notes', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"userId": "GCs5KuzPqTls7vWclkEV", "body": "lorem ipsum", "title": "Follow-up summary", "color": "#FFAA00", "pinned": false}),
});
const data = await response.json();import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/contacts/YOUR_contactId/notes',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"userId": "GCs5KuzPqTls7vWclkEV", "body": "lorem ipsum", "title": "Follow-up summary", "color": "#FFAA00", "pinned": false},
)
data = response.json()<?php
$ch = curl_init('https://services.leadconnectorhq.com/contacts/YOUR_contactId/notes');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'userId': 'GCs5KuzPqTls7vWclkEV', 'body': 'lorem ipsum', 'title': 'Follow-up summary', 'color': '#FFAA00', 'pinned': false}),
]);
$data = json_decode(curl_exec($ch), true);