Create Note
curl --request POST \
--url https://api.example.com/v1/notes \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"content": "<string>",
"note_type": "<string>",
"tags": [
{}
],
"is_pinned": true,
"contact_id": "<string>",
"contact_name": "<string>",
"related_company_id": "<string>",
"company_name": "<string>",
"deal_id": "<string>",
"created_date": "<string>"
}
'import requests
url = "https://api.example.com/v1/notes"
payload = {
"title": "<string>",
"content": "<string>",
"note_type": "<string>",
"tags": [{}],
"is_pinned": True,
"contact_id": "<string>",
"contact_name": "<string>",
"related_company_id": "<string>",
"company_name": "<string>",
"deal_id": "<string>",
"created_date": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
content: '<string>',
note_type: '<string>',
tags: [{}],
is_pinned: true,
contact_id: '<string>',
contact_name: '<string>',
related_company_id: '<string>',
company_name: '<string>',
deal_id: '<string>',
created_date: '<string>'
})
};
fetch('https://api.example.com/v1/notes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/notes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'title' => '<string>',
'content' => '<string>',
'note_type' => '<string>',
'tags' => [
[
]
],
'is_pinned' => true,
'contact_id' => '<string>',
'contact_name' => '<string>',
'related_company_id' => '<string>',
'company_name' => '<string>',
'deal_id' => '<string>',
'created_date' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/notes"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"content\": \"<string>\",\n \"note_type\": \"<string>\",\n \"tags\": [\n {}\n ],\n \"is_pinned\": true,\n \"contact_id\": \"<string>\",\n \"contact_name\": \"<string>\",\n \"related_company_id\": \"<string>\",\n \"company_name\": \"<string>\",\n \"deal_id\": \"<string>\",\n \"created_date\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v1/notes")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"content\": \"<string>\",\n \"note_type\": \"<string>\",\n \"tags\": [\n {}\n ],\n \"is_pinned\": true,\n \"contact_id\": \"<string>\",\n \"contact_name\": \"<string>\",\n \"related_company_id\": \"<string>\",\n \"company_name\": \"<string>\",\n \"deal_id\": \"<string>\",\n \"created_date\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/notes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"content\": \"<string>\",\n \"note_type\": \"<string>\",\n \"tags\": [\n {}\n ],\n \"is_pinned\": true,\n \"contact_id\": \"<string>\",\n \"contact_name\": \"<string>\",\n \"related_company_id\": \"<string>\",\n \"company_name\": \"<string>\",\n \"deal_id\": \"<string>\",\n \"created_date\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {}
}Notes
Create Note
Create a note linked to a contact, company, or deal
POST
/
v1
/
notes
Create Note
curl --request POST \
--url https://api.example.com/v1/notes \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"content": "<string>",
"note_type": "<string>",
"tags": [
{}
],
"is_pinned": true,
"contact_id": "<string>",
"contact_name": "<string>",
"related_company_id": "<string>",
"company_name": "<string>",
"deal_id": "<string>",
"created_date": "<string>"
}
'import requests
url = "https://api.example.com/v1/notes"
payload = {
"title": "<string>",
"content": "<string>",
"note_type": "<string>",
"tags": [{}],
"is_pinned": True,
"contact_id": "<string>",
"contact_name": "<string>",
"related_company_id": "<string>",
"company_name": "<string>",
"deal_id": "<string>",
"created_date": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
content: '<string>',
note_type: '<string>',
tags: [{}],
is_pinned: true,
contact_id: '<string>',
contact_name: '<string>',
related_company_id: '<string>',
company_name: '<string>',
deal_id: '<string>',
created_date: '<string>'
})
};
fetch('https://api.example.com/v1/notes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/notes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'title' => '<string>',
'content' => '<string>',
'note_type' => '<string>',
'tags' => [
[
]
],
'is_pinned' => true,
'contact_id' => '<string>',
'contact_name' => '<string>',
'related_company_id' => '<string>',
'company_name' => '<string>',
'deal_id' => '<string>',
'created_date' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/notes"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"content\": \"<string>\",\n \"note_type\": \"<string>\",\n \"tags\": [\n {}\n ],\n \"is_pinned\": true,\n \"contact_id\": \"<string>\",\n \"contact_name\": \"<string>\",\n \"related_company_id\": \"<string>\",\n \"company_name\": \"<string>\",\n \"deal_id\": \"<string>\",\n \"created_date\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v1/notes")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"content\": \"<string>\",\n \"note_type\": \"<string>\",\n \"tags\": [\n {}\n ],\n \"is_pinned\": true,\n \"contact_id\": \"<string>\",\n \"contact_name\": \"<string>\",\n \"related_company_id\": \"<string>\",\n \"company_name\": \"<string>\",\n \"deal_id\": \"<string>\",\n \"created_date\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/notes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"content\": \"<string>\",\n \"note_type\": \"<string>\",\n \"tags\": [\n {}\n ],\n \"is_pinned\": true,\n \"contact_id\": \"<string>\",\n \"contact_name\": \"<string>\",\n \"related_company_id\": \"<string>\",\n \"company_name\": \"<string>\",\n \"deal_id\": \"<string>\",\n \"created_date\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {}
}Request
At least one parent link is required. A note must reference
contact_id, related_company_id (a.k.a. company_id on the body), or deal_id. Orphan notes are rejected with 400.Body Parameters
string
required
Note title
string
Note content (max 50,000 characters)
string
default:"general"
Note type:
general, meeting, call, email, otherarray
Array of tag strings
boolean
default:"false"
Pin the note
string
UUID of the linked contact. Must belong to your workspace.
string
Human name — the server fuzzy-matches within your workspace and resolves to a
contact_id.
Use when an agent has a name but not a UUID. If multiple contacts match, returns
400 ambiguous_reference listing candidate UUIDs — retry with contact_id.string
UUID of the linked company. (Also accepts
company_id as an alias.)string
Human name — same fuzzy resolution as
contact_name but against the Company table.string
UUID of the linked deal.
string
Optional ISO 8601 timestamp. Honored verbatim if within the last 5 years and not more than 24 h in the future; otherwise the server
now() is used. Never null.Headers
Authorization: Bearer wbk_your_api_key_here
Content-Type: application/json
Response
object
Created note with
id, title, note_type, tags, is_pinned, contact_id, related_company_id, deal_id, created_date.curl -X POST https://data.leadlex.com/functions/v1/api-gateway/v1/notes \
-H "Authorization: Bearer wbk_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"title": "Call summary — Hans Müller",
"content": "Discussed Q2 IP audit timeline.",
"note_type": "call",
"contact_id": "789e0123-e45b-67c8-a901-234567890abc",
"created_date": "2026-04-10T12:00:00Z"
}'
import requests
API_KEY = "wbk_your_api_key_here"
BASE_URL = "https://data.leadlex.com/functions/v1/api-gateway"
headers = {"Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json"}
response = requests.post(f"{BASE_URL}/v1/notes", headers=headers, json={
"title": "Call summary",
"content": "Discussed Q2 IP audit timeline.",
"note_type": "call",
"contact_id": "789e0123-e45b-67c8-a901-234567890abc",
})
print(response.json())
const response = await fetch(
'https://data.leadlex.com/functions/v1/api-gateway/v1/notes',
{
method: 'POST',
headers: { 'Authorization': 'Bearer wbk_your_api_key_here', 'Content-Type': 'application/json' },
body: JSON.stringify({
title: 'Call summary',
content: 'Discussed Q2 IP audit timeline.',
contact_id: '789e0123-e45b-67c8-a901-234567890abc'
})
}
);
const { data } = await response.json();
Errors
| Status | Code | Description |
|---|---|---|
| 400 | validation_error | Missing title — or no parent link (contact_id / company_id / deal_id) |
| 403 | insufficient_permissions | Missing contacts:write permission |
Orphan-note rejection example
{
"error": {
"code": "validation_error",
"message": "At least one parent link (contact_id, company_id, deal_id, or event_id) is required"
}
}
Sub-resource alternative
If you already have a contact or company in hand, you can skip the parent-link body field and POST to the sub-resource endpoint:POST /v1/contacts/{contact_id}/notesPOST /v1/companies/{company_id}/notes