v1

latestOpenAPI 3.1.02026-07-26183980.3 KB
external
external-v2

Create Note

Create a note with an optional note ID, timestamps, and collection links. If omitted, Mem generates the note ID. The first line of content becomes the note title.

post/v2/notes

Request body

collection_idsstring[] nullable

Optional collection IDs to associate with the note. IDs that do not map to accessible collections are ignored.

collection_titlesstring[] nullable

Optional collection titles to associate with the note. Matching is case-insensitive exact match; titles with no match are ignored. Maximum per title: 1,000 characters (and no more than 1,000 UTF-8 bytes).

contentstring required

Full markdown body for the note. Send the full desired note body (partial patch semantics are not supported here). IMPORTANT: The first line is interpreted as the note title. Maximum: 200,000 characters (and no more than 200,000 UTF-8 bytes on create).

created_atstring date-time nullable

Optional creation timestamp (ISO 8601). If provided, it must include a timezone offset and cannot be in the future. If omitted, Mem uses updated_at when provided; otherwise current server time.

idstring uuid nullable

Optional UUID for the note. If omitted, Mem generates a new UUID.

updated_atstring date-time nullable

Optional "last updated" timestamp for this write (ISO 8601). If provided, it must include a timezone offset and cannot be in the future. If omitted, Mem uses the current server time for the initial content write.

Example request

{
  "collection_titles": [
    "Acme Corp",
    "Project Phoenix"
  ],
  "content": "# Meeting with Product Team\n\nDiscussion Topics:\n- Roadmap updates\n- Feature prioritization\n\nAction Items:\n- Schedule follow-up with design\n- Share Q2 priorities document",
  "created_at": "2025-04-01T14:30:45Z",
  "updated_at": "2025-04-02T09:15:22Z"
}

Response

OK

collection_idsstring[] required

Collection UUIDs currently associated with this note.

contentstring required

Full markdown content stored for the note.

created_atstring date-time required

Creation timestamp for the note in ISO 8601 format.

idstring uuid required

UUID of the created note.

request_idstring required

Identifier for this API request. Useful for tracing and support.

titlestring required

Current note title, derived from the first line of markdown content.

updated_atstring date-time required

Last modification timestamp for the note in ISO 8601 format.

versioninteger required

Current note content document version after this write.

Example response

{
  "collection_ids": [
    "59508b41-8770-4855-aa37-302b1e09aee7",
    "026b426c-14fb-4f22-8d98-7a9121bfaec8"
  ],
  "content": "# Sales Call with Acme Corp\n\nContact: John Smith (john@acme.com)\n\nInterested in enterprise plan. Follow up next week.\n\n## Action Items\n- Schedule follow-up call next week\n- Send enterprise pricing information\n\n## Key Points\n- Interested in enterprise plan\n- Contact: John Smith (john@acme.com)",
  "created_at": "2025-04-11T04:47:14.457Z",
  "id": "5e29c8a2-c73b-476b-9311-e2579712d4b1",
  "request_id": "api-request-036ed6c7-de00-459f-a89b-43d26aafe522",
  "title": "Sales Call with Acme Corp",
  "updated_at": "2025-04-11T04:47:19.702Z",
  "version": 2
}