aNotepad API Documentation (v1)

The aNotepad API (version 1) provides a RESTful interface to manage notes programmatically. This API allows authenticated users to create, retrieve, update, and delete notes. All endpoints require authentication via a Personal Access Token (PAT) passed in the Authorization header.

Base URL: https://api.anotepad.com/api/v1

Authentication

All API requests require a valid Personal Access Token (PAT) for a user with Professional or Business plan. Include the token in the Authorization header as follows:

Authorization: Bearer <your-personal-access-token>

Failure: If the token is invalid, missing, or the user does not meet the requirements, the API returns a 401 Unauthorized response.

General Notes

  • All endpoints return JSON responses.
  • Dates are in UTC and serialized in ISO 8601 format (e.g., 2025-03-16T12:00:00Z).
  • The API enforces limits on input lengths (e.g., titles ≤ 200 characters, content ≤ 1,000,000 characters, passwords ≤ 20 characters).
  • Supported note types for creation/update: PlainText, RichText, and Task.

Endpoints

Retrieve a paginated list of notes for the authenticated user, excluding content. Notes are sorted by last update time in descending order.

  • Method: GET
  • Path: /notes
  • Query Parameters:
    • updatedStart (optional, DateTime): Filter notes updated on or after this date (e.g., 2025-01-01T00:00:00Z).
    • updatedEnd (optional, DateTime): Filter notes updated on or before this date (e.g., 2025-03-16T23:59:59Z).
    • start (optional, int, default: 0): Starting index for pagination (minimum 0).
    • count (optional, int, default: 1000): Number of notes to return (minimum 1, maximum 1000).
  • Response:
    • 200 OK: Array of note objects (without Content).
    • 401 Unauthorized: Authentication failed.

Example Request:

GET /api/v1/notes?updatedStart=2025-01-01T00:00:00Z&updatedEnd=2025-03-16T23:59:59Z&start=0&count=10
Authorization: Bearer <token>

Example Response:

[{
    "Number": "n1234567",
    "DateCreated": "2025-01-01T10:00:00Z",
    "DateUpdated": "2025-03-10T15:30:00Z",
    "Title": "Meeting Notes",
    "Type": "PlainText",
    "Access": "Private",
    "Password": null
}]

Retrieve a paginated list of notes for the authenticated user, including content. Notes are sorted by last update time in descending order.

  • Method: GET
  • Path: /notes/content
  • Query Parameters:
    • updatedStart (optional, DateTime): Filter notes updated on or after this date.
    • updatedEnd (optional, DateTime): Filter notes updated on or before this date.
    • start (optional, int, default: 0): Starting index for pagination (minimum 0).
    • count (optional, int, default: 1000): Number of notes to return (minimum 1, maximum 1000).
  • Response:
    • 200 OK: Array of note objects (including Content).
    • 401 Unauthorized: Authentication failed.

Example Request:

GET /api/v1/notes/content?start=0&count=5
Authorization: Bearer <token>

Example Response:

[{
    "Number": "n1234567",
    "DateCreated": "2025-01-01T10:00:00Z",
    "DateUpdated": "2025-03-10T15:30:00Z",
    "Title": "Meeting Notes",
    "Content": "Discussed project timelines...",
    "Type": "PlainText",
    "Access": "Private",
    "Password": null
}]

Retrieve details of a specific note by its number.

  • Method: GET
  • Path: /notes/{number}
  • Path Parameters:
    • number (string, required): Unique note identifier (e.g., n1234567).
  • Response:
    • 200 OK: Note object (including Content if applicable).
    • 401 Unauthorized: Authentication failed.
    • 404 Not Found: Note not found or inaccessible.

Example Request:

GET /api/v1/notes/n1234567
Authorization: Bearer <token>

Example Response:

{
    "Number": "n1234567",
    "DateCreated": "2025-01-01T10:00:00Z",
    "DateUpdated": "2025-03-10T15:30:00Z",
    "Title": "Meeting Notes",
    "Content": "Discussed project timelines...",
    "Type": "PlainText",
    "Access": "Private",
    "Password": null
}

Create a new note for the authenticated user.

  • Method: POST
  • Path: /notes
  • Request Body: JSON object representing the note (see Note schema below).
  • Constraints:
    • Title is required and must be ≤ 200 characters.
    • Content (optional) must be ≤ 1,000,000 characters.
    • Password (optional) must be ≤ 20 characters.
    • Type must be PlainText, RichText, or Task.
    • Access must be Private, Public, or PasswordProtected.
  • Response:
    • 200 OK: Created note object (including assigned Number).
    • 400 Bad Request: Validation errors (e.g., invalid Type or missing Title).
    • 401 Unauthorized: Authentication failed.

Example Request:

POST /api/v1/notes
Authorization: Bearer <token>
Content-Type: application/json
{
    "Title": "New Task",
    "Content": "Complete API docs",
    "Type": "Task",
    "Access": "Private",
    "Password": null
}

Example Response:

{
    "Number": "N124",
    "DateCreated": "2025-03-16T12:00:00Z",
    "DateUpdated": "2025-03-16T12:00:00Z",
    "Title": "New Task",
    "Content": "Complete API docs",
    "Type": "Task",
    "Access": "Private",
    "Password": null
}

Update an existing note by its number.

  • Method: PUT
  • Path: /notes/{number}
  • Path Parameters:
    • number (string, required): Unique note identifier (e.g., n1234567).
  • Request Body: JSON object representing the updated note (see Note schema below).
  • Constraints:
    • Same as POST (title, content, password limits).
    • Only PlainText, RichText, or Task types can update Content.
  • Response:
    • 200 OK: Updated note object.
    • 400 Bad Request: Validation errors.
    • 401 Unauthorized: Authentication failed.
    • 404 Not Found: Note not found or inaccessible.

Example Request:

PUT /api/v1/notes/n1234567
Authorization: Bearer <token>
Content-Type: application/json
{
    "Title": "Updated Meeting Notes",
    "Content": "Revised timelines...",
    "Type": "PlainText",
    "Access": "Public",
    "Password": null
}

Example Response:

{
    "Number": "n1234567",
    "DateCreated": "2025-01-01T10:00:00Z",
    "DateUpdated": "2025-03-16T12:05:00Z",
    "Title": "Updated Meeting Notes",
    "Content": "Revised timelines...",
    "Type": "PlainText",
    "Access": "Public",
    "Password": null
}

Delete a specific note by its number.

  • Method: DELETE
  • Path: /notes/{number}
  • Path Parameters:
    • number (string, required): Unique note identifier (e.g., n1234567).
  • Response:
    • 200 OK: Note deleted successfully (returns status code 200).
    • 401 Unauthorized: Authentication failed.
    • 404 Not Found: Note not found or inaccessible.

Example Request:

DELETE /api/v1/notes/n1234567
Authorization: Bearer <token>

Example Response:

200

Data Schema

Note Object

Field Type Description
Number string Unique identifier for the note (assigned on creation).
DateCreated DateTime UTC timestamp of note creation (ISO 8601).
DateUpdated DateTime UTC timestamp of last update (ISO 8601).
Title string Note title (required, max 200 characters).
Content string Note content (optional, max 1,000,000 characters, null for some types).
Password string Password for PasswordProtected access (optional, max 20 characters).
Type NoteType Note type (enum, see below).
Access NoteAccess Access level (enum, see below).

NoteType Enum

Value Description
PlainText Plain text note
RichText Rich text note
Task Task note
Whiteboard Whiteboard note (read-only)
Spreadsheet Spreadsheet note (read-only)
OneMeeting Meeting note (read-only)

Note: Only PlainText, RichText, and Task are supported for creation and content updates.

NoteAccess Enum

Value Description
Private Accessible only to the owner
Public Accessible to anyone
PasswordProtected Accessible with a password

Error Responses

  • 400 Bad Request: Validation errors (e.g., invalid input). Response includes an array of error messages:
    ["Note title cannot be empty", "Invalid value for note Type"]
  • 401 Unauthorized: Missing or invalid authentication.
  • 404 Not Found: Resource (e.g., note) not found.

Rate Limits

The API enforces rate limits to prevent abuse and ensure fair usage. The default rate limits are as follows:

  • Professional Plan: 60 requests per minute
  • Business Plan: 300 requests per minute

Example Usage (cURL)

Create a Note

curl -X POST "https://api.anotepad.com/api/v1/notes" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"Title":"Test Note","Content":"Hello World","Type":"PlainText","Access":"Private"}'

Retrieve a Note

curl "https://api.anotepad.com/api/v1/notes/n1234567" \
-H "Authorization: Bearer <token>"

Delete a Note

curl -X DELETE "https://api.anotepad.com/api/v1/notes/n1234567" \
-H "Authorization: Bearer <token>"

Have Questions?

Contact support@anotepad.com for support.