Skip to main content
POST
/
api
/
notes
/
publish
Update Note Visibility
curl --request POST \
  --url https://api.example.com/api/notes/publish \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "visibility": "<string>"
}
'
{
  "message": "<string>",
  "data": {
    "id": 123,
    "title": "<string>",
    "data": {},
    "description": {},
    "thumbnail": {},
    "views": 123,
    "visibility": "<string>",
    "ownerId": 123,
    "createdAt": "<string>",
    "updatedAt": "<string>"
  },
  "error": "<string>"
}

Authentication

This endpoint requires authentication via an Authorization header.
Authorization
string
required
Bearer token for user authentication

Query Parameters

notes_id
string
required
The ID of the note to update

Request Body

visibility
string
required
The new visibility setting for the note. Must be one of:
  • Public - Note is visible to all users
  • Private - Note is only visible to the owner
  • Shared - Note is visible to users it has been explicitly shared with

Response

message
string
Success message indicating the note visibility was updated
data
object
The updated note object
id
number
Unique identifier for the note
title
string
Title of the note
data
string | null
Content of the note
description
string | null
Description of the note
thumbnail
string | null
Thumbnail image path
views
number
Number of views
visibility
string
Updated visibility: “Public”, “Private”, or “Shared”
ownerId
number
ID of the user who owns the note
createdAt
string
ISO 8601 timestamp when the note was created
updatedAt
string
ISO 8601 timestamp when the note was last updated
curl -X POST "https://api.noteverse.com/api/notes/publish?notes_id=123" \
  -H "Authorization: Bearer YOUR_AUTH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "visibility": "Public"
  }'

Response Example

{
  "message": "Note visibility updated successfully",
  "data": {
    "id": 123,
    "title": "My Public Note",
    "data": "This note is now visible to everyone",
    "description": null,
    "thumbnail": null,
    "views": 15,
    "visibility": "Public",
    "createdAt": "2026-03-01T10:30:00.000Z",
    "updatedAt": "2026-03-03T15:00:00.000Z",
    "ownerId": 42,
    "categoryId": null,
    "subcategoryId": null
  }
}

Error Responses

error
string
Error message describing what went wrong

Bad Request (400)

Returned when the visibility value is invalid.
{
  "error": "visibility must be Private, Public or Shared"
}
Returned when the note ID is missing or the update fails.
{
  "error": "Error fetching notes"
}

Unauthorized (401)

Returned when the authentication token is invalid or missing.
{
  "error": "Invalid or expired token"
}
Visibility Options:
  • Public - The note appears in featured notes and can be accessed by anyone
  • Private - Only the note owner can access it
  • Shared - Only the owner and users with explicit sharing permissions can access it
Changing a note to “Public” makes it visible to all users in the system. Ensure the note doesn’t contain sensitive information before making it public.

Use Cases

Publishing a Note

Set visibility to Public to make your note discoverable in the featured notes list:
{
  "visibility": "Public"
}

Making a Note Private

Set visibility to Private to restrict access to only yourself:
{
  "visibility": "Private"
}

Preparing to Share

Set visibility to Shared when you want to control access through the sharing system:
{
  "visibility": "Shared"
}
After setting visibility to “Shared”, you can use the sharing endpoints to grant specific users access with View or Edit permissions.

Build docs developers (and LLMs) love