Create Note
Create a new encrypted note for the authenticated user. Note content is automatically encrypted before storage.
POST
/notes/create
Description
This endpoint creates a new note for the authenticated user. The note content is automatically encrypted using AES-256-CBC encryption before being stored in the database. Each note is assigned a unique NoteToken (UUID v4) for identification.
Authentication
This endpoint requires Bearer token authentication via the Authorization header.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
Title |
String | Yes | Note title (max 100 characters) |
Note |
String | Yes | Note content (max 100,000 characters, will be encrypted) |
Pinned |
Boolean | No | Pin note to top (default: false) |
Code Examples
curl -X POST "https://api-v3.sweeppea.com/notes/create" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"Title": "My Important Note",
"Note": "This is the content of my note that will be encrypted",
"Pinned": false
}'
Response
201 Created
{
"Response": true,
"Message": "Note Created Successfully",
"Data": {
"NoteToken": "uuid-v4-string",
"Title": "My Important Note",
"CreationDate": "2026-01-16T11:49:43.140Z",
"Pinned": false
}
}
Error Responses
400 Bad Request
{
"Response": false,
"Message": "Missing Required Fields: Title and Note are required",
"Code": 400
}
400 Bad Request
{
"Response": false,
"Message": "Title Exceeds Maximum Length of 100 Characters",
"Code": 400
}
400 Bad Request
{
"Response": false,
"Message": "Note Exceeds Maximum Length of 100000 Characters",
"Code": 400
}
400 Bad Request
{
"Response": false,
"Message": "Note Title Already Exists",
"Code": 400
}
401 Unauthorized
{
"Response": false,
"Message": "Invalid or Missing Bearer Token",
"Code": 401
}
403 Forbidden
{
"Response": false,
"Message": "Invalid API Token",
"Code": 403
}
500 Internal Server Error
{
"Response": false,
"Message": "Internal Server Error",
"Code": 500
}
Important Notes
- 🔐 Encryption: Note content is automatically encrypted using AES-256-CBC encryption before storage
- 🆔 Unique Identifier: Each note receives a unique NoteToken (UUID v4) for identification
- 📏 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
- 👤 User Association: Notes are automatically associated with the authenticated user's UserToken
- 📌 Pinned Notes: Pinned notes will appear at the top of the notes list