Update Note
curl --request PATCH \
--url https://api.example.com/v1/notes/:id \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"content": "<string>",
"note_type": "<string>",
"tags": [
{}
],
"is_pinned": true
}
'import requests
url = "https://api.example.com/v1/notes/:id"
payload = {
"title": "<string>",
"content": "<string>",
"note_type": "<string>",
"tags": [{}],
"is_pinned": True
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
content: '<string>',
note_type: '<string>',
tags: [{}],
is_pinned: true
})
};
fetch('https://api.example.com/v1/notes/:id', 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/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'title' => '<string>',
'content' => '<string>',
'note_type' => '<string>',
'tags' => [
[
]
],
'is_pinned' => true
]),
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/:id"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"content\": \"<string>\",\n \"note_type\": \"<string>\",\n \"tags\": [\n {}\n ],\n \"is_pinned\": true\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.example.com/v1/notes/:id")
.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}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/notes/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.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}"
response = http.request(request)
puts response.read_body{
"data": {}
}Notes
Update Note
Update an existing note
PATCH
/
v1
/
notes
/
:id
Update Note
curl --request PATCH \
--url https://api.example.com/v1/notes/:id \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"content": "<string>",
"note_type": "<string>",
"tags": [
{}
],
"is_pinned": true
}
'import requests
url = "https://api.example.com/v1/notes/:id"
payload = {
"title": "<string>",
"content": "<string>",
"note_type": "<string>",
"tags": [{}],
"is_pinned": True
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
content: '<string>',
note_type: '<string>',
tags: [{}],
is_pinned: true
})
};
fetch('https://api.example.com/v1/notes/:id', 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/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'title' => '<string>',
'content' => '<string>',
'note_type' => '<string>',
'tags' => [
[
]
],
'is_pinned' => true
]),
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/:id"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"content\": \"<string>\",\n \"note_type\": \"<string>\",\n \"tags\": [\n {}\n ],\n \"is_pinned\": true\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.example.com/v1/notes/:id")
.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}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/notes/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.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}"
response = http.request(request)
puts response.read_body{
"data": {}
}Request
Path Parameters
string
required
Note ID (UUID)
Body Parameters
string
Note title
string
Content (max 50,000 characters)
string
Note type
array
Tags (replaces existing)
boolean
Pin/unpin
Headers
Authorization: Bearer wbk_your_api_key_here
Content-Type: application/json
Response
object
Updated note with
id, title, note_type, tags, is_pinned, updated_datecurl -X PATCH https://data.leadlex.com/functions/v1/api-gateway/v1/notes/note-001 \
-H "Authorization: Bearer wbk_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{ "is_pinned": true }'
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.patch(f"{BASE_URL}/v1/notes/note-001", headers=headers, json={"is_pinned": True})
print(response.json())
const response = await fetch(
'https://data.leadlex.com/functions/v1/api-gateway/v1/notes/note-001',
{
method: 'PATCH',
headers: { 'Authorization': 'Bearer wbk_your_api_key_here', 'Content-Type': 'application/json' },
body: JSON.stringify({ is_pinned: true })
}
);
const { data } = await response.json();
Errors
| Status | Code | Description |
|---|---|---|
| 404 | not_found | Note not found |
| 403 | insufficient_permissions | Missing contacts:write permission |