Skip to main content
POST
/
api
/
notes
Create Note
curl --request POST \
  --url https://api.example.com/api/notes \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "title": "<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

Request Body

title
string
required
The title of the note to be created

Response

message
string
Success message indicating the note was created
data
object
The created note object
id
number
Unique identifier for the note
title
string
Title of the note
data
string | null
Content of the note (null when first created)
description
string | null
Description of the note
thumbnail
string | null
Thumbnail image path
views
number
Number of views (defaults to 0)
visibility
string
Note visibility: “Public”, “Private”, or “Shared” (defaults to “Private”)
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 \
  -H "Authorization: Bearer YOUR_AUTH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "My First Note"
  }'

Response Example

{
  "message": "Note created",
  "data": {
    "id": 123,
    "title": "My First Note",
    "description": null,
    "data": null,
    "thumbnail": null,
    "views": 0,
    "visibility": "Private",
    "createdAt": "2026-03-03T10:30:00.000Z",
    "updatedAt": "2026-03-03T10:30:00.000Z",
    "ownerId": 42,
    "categoryId": null,
    "subcategoryId": null
  }
}

Error Responses

error
string
Error message describing what went wrong

Unauthorized (401)

Returned when the authentication token is invalid or missing.
{
  "error": "Invalid or expired token"
}

Bad Request (400)

Returned when the request is malformed or validation fails.
{
  "error": "Error creating note"
}
The note is created with default visibility set to “Private”. You can change this using the publish endpoint.

Build docs developers (and LLMs) love