Notes API
The Notes API lets you manage notes programmatically.
List Notes
Section titled “List Notes”Get all notes in a workspace.
GET /api/noteQuery Parameters
Section titled “Query Parameters”| Parameter | Type | Description |
|---|---|---|
workspaceId | string | Filter by workspace (uses default if not provided) |
groupId | string | Filter by group (optional) |
isDeleted | boolean | Include deleted notes (default: false) |
search | string | Search in name and content (optional) |
sort | string | Sort field and direction, e.g. name:asc or updatedAt:desc |
page | number | Page number (default: 1) |
limit | number | Results per page (default: 50, max: 100) |
Response
Section titled “Response”{ "data": [ { "id": "550e8400-e29b-41d4-a716-446655440000", "name": "My Note", "content": "# Hello\n\nThis is my note.", "workspaceId": "660e8400-e29b-41d4-a716-446655440001", "groupId": "770e8400-e29b-41d4-a716-446655440002", "userId": "880e8400-e29b-41d4-a716-446655440003", "icon": null, "isDeleted": false, "deletedAt": null, "deletedBy": null, "isEncrypted": false, "encryptionMetadata": null, "createdAt": "2024-01-15T10:30:00.000Z", "updatedAt": "2024-01-15T14:45:00.000Z" } ], "pagination": { "page": 1, "limit": 50, "total": 42, "totalPages": 1 }, "count": 42, "filters": { "workspaceId": "660e8400-e29b-41d4-a716-446655440001", "groupId": null, "isDeleted": false, "search": null }}Example
Section titled “Example”curl -X GET "https://sidvy.com/api/note?limit=10&sort=updatedAt:desc" \ -H "Authorization: Bearer sidvy_abc123..."Create Note
Section titled “Create Note”Create a new note.
POST /api/noteRequest Body
Section titled “Request Body”{ "name": "My New Note", "content": "# New Note\n\nContent here.", "workspaceId": "660e8400-e29b-41d4-a716-446655440001", "groupId": "770e8400-e29b-41d4-a716-446655440002"}| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Note title |
content | string | No | Note content (markdown) |
workspaceId | string | No | Target workspace (uses default if not provided) |
groupId | string | No | Target group |
Response
Section titled “Response”{ "data": { "id": "550e8400-e29b-41d4-a716-446655440000", "name": "My New Note", "content": "# New Note\n\nContent here.", "workspaceId": "660e8400-e29b-41d4-a716-446655440001", "groupId": "770e8400-e29b-41d4-a716-446655440002", "userId": "880e8400-e29b-41d4-a716-446655440003", "icon": null, "isDeleted": false, "deletedAt": null, "deletedBy": null, "isEncrypted": false, "encryptionMetadata": null, "createdAt": "2024-01-15T10:30:00.000Z", "updatedAt": "2024-01-15T10:30:00.000Z" }, "count": 1}Example
Section titled “Example”curl -X POST "https://sidvy.com/api/note" \ -H "Authorization: Bearer sidvy_abc123..." \ -H "Content-Type: application/json" \ -d '{"name": "My New Note", "content": "# Hello World"}'Update Note
Section titled “Update Note”Update an existing note.
PUT /api/noteRequest Body
Section titled “Request Body”{ "id": "550e8400-e29b-41d4-a716-446655440000", "name": "Updated Title", "content": "# Updated Content", "groupId": "770e8400-e29b-41d4-a716-446655440002"}| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Note ID to update |
name | string | No | New note title |
content | string | No | New note content |
groupId | string | No | Move to group (set to null to remove from group) |
Response
Section titled “Response”Returns the updated note object in the same format as create.
Example
Section titled “Example”curl -X PUT "https://sidvy.com/api/note" \ -H "Authorization: Bearer sidvy_abc123..." \ -H "Content-Type: application/json" \ -d '{"id": "550e8400-e29b-41d4-a716-446655440000", "name": "New Title"}'Delete Note
Section titled “Delete Note”Move a note to trash (soft delete).
DELETE /api/noteRequest Body
Section titled “Request Body”{ "id": "550e8400-e29b-41d4-a716-446655440000"}| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Note ID to delete |
Response
Section titled “Response”{ "data": { "deleted": true, "noteId": "550e8400-e29b-41d4-a716-446655440000", "movedToTrash": true }, "count": 1}Example
Section titled “Example”curl -X DELETE "https://sidvy.com/api/note" \ -H "Authorization: Bearer sidvy_abc123..." \ -H "Content-Type: application/json" \ -d '{"id": "550e8400-e29b-41d4-a716-446655440000"}'Errors
Section titled “Errors”404 Not Found
Section titled “404 Not Found”{ "error": "NOT_FOUND", "message": "Note not found"}400 Validation Error
Section titled “400 Validation Error”{ "error": "VALIDATION_ERROR", "message": "name: Required field is missing"}Storage Limit Errors
Section titled “Storage Limit Errors”When creating or updating notes, storage limits are enforced:
{ "error": "VALIDATION_ERROR", "message": "Note exceeds maximum size (1MB)"}{ "error": "VALIDATION_ERROR", "message": "User storage quota exceeded"}