Skip to main content
POST
/
notes
JavaScript
import Moonbase from '@moonbaseai/sdk';

const client = new Moonbase({
  apiKey: process.env['MOONBASE_API_KEY'], // This is the default and can be omitted
});

const note = await client.notes.create({
  body: { markdown: "# A note title\n\nHere's a note for me! Yay!" },
});

console.log(note.id);
{
  "id": "1CLJt2v5pkpkAnvdgXfEcF",
  "type": "note",
  "lock_version": 0,
  "body": {
    "markdown": "# A note title\n\nHere's a note for me! Yay!"
  },
  "created_at": "2025-02-17T16:00:00.000Z",
  "updated_at": "2025-02-17T16:00:00.000Z",
  "title": "A note title",
  "creator": {
    "id": "1CLJt2v271pTY4bHG7UQrc",
    "type": "item",
    "collection": {
      "id": "1CLJt2ubZ7zAZFBxUxeBHo",
      "type": "collection",
      "ref": "people"
    }
  },
  "associations": []
}

Authorizations

Authorization
string
header
required

Your Moonbase API key.

Body

application/json

The Note object to create.

body
FormattedText · object
required

The main content of the note.

associations
Pointer · object[]

Link the Note to Moonbase items (person, organization, deal, task, or an item in a custom collection), meetings, or calls.

Response

Creation succeeded.

The Note object represents a block of text content, often used for meeting notes or summaries.

type
string
required

String representing the object’s type. Always note for this object.

Allowed value: "note"
id
string
required

Unique identifier for the object.

lock_version
integer
required

The current lock version of the note for optimistic concurrency control.

body
FormattedText · object
required

The main content of the note.

created_at
string<date-time>
required

Time at which the object was created, as an ISO 8601 timestamp in UTC.

updated_at
string<date-time>
required

Time at which the object was last updated, as an ISO 8601 timestamp in UTC.

associations
Pointer · object[]
required

A list of items, meetings or calls this note is associated with.

title
string

An optional title for the note.

summary
string

A short, system-generated summary of the note's content.

creator
ItemPointer · object

The person that created the note.