Update Note
Update an existing note owned by the authenticated user. Supports partial updates.
POST
https://api-v3.sweeppea.com/notes/update
Description
This endpoint updates an existing note for the authenticated user. You can update the title, content, or pinned status. The note content is automatically re-encrypted if updated. All fields except NoteToken are optional, allowing partial updates.
Authentication
This endpoint requires Bearer token authentication via the Authorization header.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
NoteToken |
String | Yes | Unique identifier of the note to update (UUID v4) |
Title |
String | No | New note title (max 100 characters) |
Note |
String | No | New note content (max 100,000 characters, will be encrypted) |
Pinned |
Boolean | No | Pin/unpin note |
Code Examples
curl -X POST "https://api-v3.sweeppea.com/notes/update" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"NoteToken":"uuid-v4-string","Title":"Updated Title","Note":"Updated content","Pinned":true}'
const response = await fetch('https://api-v3.sweeppea.com/notes/update', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
NoteToken: 'uuid-v4-string',
Title: 'Updated Title',
Note: 'Updated content',
Pinned: true
})
});
const data = await response.json();
console.log(data);
import requests
url = "https://api-v3.sweeppea.com/notes/update"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
payload = {
"NoteToken": "uuid-v4-string",
"Title": "Updated Title",
"Note": "Updated content",
"Pinned": True
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
Response
{
"Response": true,
"Message": "Note Updated Successfully",
"Data": {
"NoteToken": "uuid-v4-string",
"Title": "Updated Title",
"Pinned": true,
"CreationDate": "2026-01-16T11:49:43.140Z"
}
}
Error Responses
{
"Response": false,
"Message": "Missing Required Field: NoteToken is required",
"Help": {
"ExpectedBody": {
"NoteToken": "string (required) \u2014 UUID v4 of the note",
"Title": "string (optional) \u2014 new title, max 100 characters. Must be unique in your account",
"Note": "string (optional) \u2014 new body, max 100,000 characters",
"Pinned": "boolean (optional) \u2014 pin or unpin the note"
}
},
"Code": 400
}
{
"Response": false,
"Message": "No Fields to Update",
"Help": {
"ExpectedBody": {
"NoteToken": "string (required) \u2014 UUID v4 of the note",
"Title": "string (optional) \u2014 new title, max 100 characters. Must be unique in your account",
"Note": "string (optional) \u2014 new body, max 100,000 characters",
"Pinned": "boolean (optional) \u2014 pin or unpin the note"
}
},
"Code": 400
}
{
"Response": false,
"Message": "Title Exceeds Maximum Length of 100 Characters",
"Help": {
"ExpectedBody": {
"NoteToken": "string (required) \u2014 UUID v4 of the note",
"Title": "string (optional) \u2014 new title, max 100 characters. Must be unique in your account",
"Note": "string (optional) \u2014 new body, max 100,000 characters",
"Pinned": "boolean (optional) \u2014 pin or unpin the note"
}
},
"Code": 400
}
{
"Response": false,
"Message": "Note Exceeds Maximum Length of 100000 Characters",
"Help": {
"ExpectedBody": {
"NoteToken": "string (required) \u2014 UUID v4 of the note",
"Title": "string (optional) \u2014 new title, max 100 characters. Must be unique in your account",
"Note": "string (optional) \u2014 new body, max 100,000 characters",
"Pinned": "boolean (optional) \u2014 pin or unpin the note"
}
},
"Code": 400
}
{
"Response": false,
"Message": "Note Title Already Exists",
"Help": {
"ExpectedBody": {
"NoteToken": "string (required) \u2014 UUID v4 of the note",
"Title": "string (optional) \u2014 new title, max 100 characters. Must be unique in your account",
"Note": "string (optional) \u2014 new body, max 100,000 characters",
"Pinned": "boolean (optional) \u2014 pin or unpin the note"
}
},
"Code": 400
}
{
"Response": false,
"Message": "Missing or invalid Bearer token. Send your API token in the Authorization header as: Authorization: Bearer YOUR_API_TOKEN",
"Code": 401
}
{
"Response": false,
"Message": "Invalid API token. It does not match any account.",
"Code": 403
}
{
"Response": false,
"Message": "Note Not Found or Access Denied",
"Code": 404
}
{
"Response": false,
"Message": "Internal server error. Please try again; if it persists, contact support with the time of this request.",
"Code": 500
}
Important Notes
- π Encryption: Note content is automatically re-encrypted using AES-256-CBC if updated
- π Ownership Verification: Users can only update notes they own
- π Partial Updates: You can update only the fields you want to change (Title, Note, or Pinned)
- π Note Identification: Notes are identified by their unique NoteToken (UUID v4)
- π Title Limit: Maximum length of 100 characters
- π Content Limit: Maximum length of 100,000 characters
- π« Unique Titles: Note titles must be unique per user - duplicate titles are not allowed
- π Not Found: Returns 404 if note doesn't exist or belongs to another user