Share Note
Share a note with another user and set their permission level (View or Edit).
Bearer token for authentication
Body Parameters
The ID of the note to share
User object to share the note withID of the user to share with
Permission level for the shared user. Must be either View or Edit
Response
The created shared status objectUnique identifier for the shared status
ID of the user who shared the note
ID of the user who received the share
Permission level: “View” or “Edit”
Timestamp when the note was shared
curl -X POST https://api.noteverse.com/api/notes/shared-statuses \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"notes_id": "123",
"sharedWith": {
"id": 42
},
"permissions": "View"
}'
Response Example
{
"message": "Shared statuses fetched successfully",
"data": {
"id": 789,
"sharedById": 1,
"sharedWithId": 42,
"noteId": 123,
"permissions": "View",
"sharedAt": "2026-03-03T10:30:00.000Z"
}
}
The authenticated user (from the Authorization header) is automatically set as the sharedById user.
Error Responses
400 Bad Request - Missing note ID
{
"error": "Note id is required",
"statusCode": 400
}
400 Bad Request - Authentication failure
{
"error": "Error fetching shared statuses",
"statusCode": 400
}
Get Shared Statuses
Retrieve all sharing information for a specific note, including who has access and their permission levels.
Bearer token for authentication
Query Parameters
The ID of the note to get sharing information for
Response
Array of shared status objectsPermission level: “View” or “Edit”
User who received the sharedata[].sharedWith.username
Username
curl -X GET "https://api.noteverse.com/api/notes/shared-statuses?notes_id=123" \
-H "Authorization: Bearer YOUR_TOKEN"
Response Example
{
"message": "Shared statuses fetched successfully",
"data": [
{
"id": 789,
"noteId": 123,
"permissions": "View",
"sharedBy": {
"id": 1,
"email": "owner@example.com",
"username": "noteowner"
},
"sharedWith": {
"id": 42,
"email": "user@example.com",
"username": "johndoe"
}
},
{
"id": 790,
"noteId": 123,
"permissions": "Edit",
"sharedBy": {
"id": 1,
"email": "owner@example.com",
"username": "noteowner"
},
"sharedWith": {
"id": 43,
"email": "collaborator@example.com",
"username": "janedoe"
}
}
]
}
Error Responses
400 Bad Request - Missing note ID
{
"error": "Note id is required",
"statusCode": 400
}
400 Bad Request - Authentication failure
{
"error": "Error fetching shared statuses",
"statusCode": 400
}
Update Sharing Permissions
Update the permission level for an existing shared status.
Bearer token for authentication
Query Parameters
The ID of the shared status to update
Body Parameters
New permission level: “View” or “Edit”
Response
Updated shared status object with new permissions
curl -X PATCH "https://api.noteverse.com/api/notes/shared-statuses?status_id=789" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"permissions": "Edit"
}'
Response Example
{
"message": "Shared statuses updated successfully",
"data": {
"id": 789,
"sharedById": 1,
"sharedWithId": 42,
"noteId": 123,
"permissions": "Edit",
"sharedAt": "2026-03-03T10:30:00.000Z"
}
}
Delete Shared Status
Remove sharing access for a user by deleting the shared status.
Bearer token for authentication
Query Parameters
The ID of the shared status to delete
Response
Deleted shared status object
curl -X DELETE "https://api.noteverse.com/api/notes/shared-statuses?status_id=789" \
-H "Authorization: Bearer YOUR_TOKEN"
Response Example
{
"message": "Shared statuses deleted successfully",
"data": {
"id": 789,
"sharedById": 1,
"sharedWithId": 42,
"noteId": 123,
"permissions": "View",
"sharedAt": "2026-03-03T10:30:00.000Z"
}
}
Deleting a shared status immediately revokes the user’s access to the note. This action cannot be undone.
Permission Types
The sharing system supports two permission levels defined in the Prisma schema:
- View: User can only view the note content
- Edit: User can view and modify the note content
These permissions are enforced as an enum type in the database schema.