> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/open-webui/open-webui/llms.txt
> Use this file to discover all available pages before exploring further.

# Notes

> Create, organize, and share personal and collaborative notes with rich text formatting

## Overview

Open WebUI's Notes feature provides a collaborative note-taking system with markdown support, access control, and real-time synchronization. Perfect for documentation, knowledge management, and team collaboration.

<Note>
  Notes functionality requires the `features.notes` permission for non-admin users.
</Note>

## Creating Notes

Create personal or shared notes:

```python theme={null}
# API endpoint: POST /api/v1/notes/create
{
  "title": "Meeting Notes - Q1 Planning",
  "data": {
    "content": {
      "md": "# Q1 Planning\n\n## Goals\n- Launch new feature\n- Improve performance"
    }
  },
  "meta": {
    "tags": ["meeting", "planning", "q1"]
  },
  "access_grants": [
    {
      "principal_type": "user",
      "principal_id": "user-123",
      "permission": "write"
    }
  ]
}
```

<Steps>
  <Step title="Set Title">
    Choose a descriptive title for easy identification
  </Step>

  <Step title="Write Content">
    Use markdown formatting in the `data.content.md` field
  </Step>

  <Step title="Add Metadata">
    Include tags, categories, or custom fields in `meta`
  </Step>

  <Step title="Configure Access">
    Define who can read or edit the note (optional)
  </Step>
</Steps>

## Viewing Notes

### List Your Notes

Retrieve notes you can access:

```bash theme={null}
# API endpoint: GET /api/v1/notes/?page=1
# Returns 60 notes per page, sorted by last updated
```

Response includes:

* **Note ID**: Unique identifier
* **Title**: Note name
* **Truncated Content**: First 1000 characters of markdown
* **User Info**: Note owner details
* **Timestamps**: Created and updated times

### Search Notes

Find notes with advanced filtering:

<Tabs>
  <Tab title="Text Search">
    ```bash theme={null}
    GET /api/v1/notes/search?query=planning&page=1
    ```

    Searches in:

    * Note titles
    * Markdown content
    * Normalized text (spaces and hyphens treated equally)
  </Tab>

  <Tab title="View Options">
    Filter by ownership:

    ```bash theme={null}
    # Created by you
    GET /api/v1/notes/search?view_option=created

    # Shared with you
    GET /api/v1/notes/search?view_option=shared

    # All accessible notes
    GET /api/v1/notes/search?view_option=all
    ```
  </Tab>

  <Tab title="Permission Filter">
    ```bash theme={null}
    # Notes you can edit
    GET /api/v1/notes/search?permission=write

    # Notes you can read
    GET /api/v1/notes/search?permission=read
    ```
  </Tab>

  <Tab title="Sorting">
    ```bash theme={null}
    # Sort by name
    GET /api/v1/notes/search?order_by=name&direction=asc

    # Sort by creation date
    GET /api/v1/notes/search?order_by=created_at&direction=desc

    # Sort by last update (default)
    GET /api/v1/notes/search?order_by=updated_at&direction=desc
    ```
  </Tab>
</Tabs>

### Get Note Details

Retrieve full note content:

```bash theme={null}
# API endpoint: GET /api/v1/notes/{id}
```

Response includes:

```json theme={null}
{
  "id": "note-123",
  "user_id": "owner-id",
  "title": "My Note",
  "data": {
    "content": {
      "md": "Full markdown content..."
    }
  },
  "meta": {...},
  "access_grants": [...],
  "write_access": true,
  "created_at": 1234567890,
  "updated_at": 1234567900
}
```

<Tip>
  The `write_access` field indicates whether you can edit the note.
</Tip>

## Editing Notes

Update note content or metadata:

```python theme={null}
# API endpoint: POST /api/v1/notes/{id}/update
{
  "title": "Updated Title",
  "data": {
    "content": {
      "md": "# Updated Content\n\nNew information here..."
    }
  },
  "meta": {
    "tags": ["updated", "new-tag"]
  }
}
```

### Partial Updates

Update specific fields without affecting others:

```python theme={null}
# Update only the title
{"title": "New Title"}

# Update only metadata
{"meta": {"priority": "high"}}

# Update only content
{"data": {"content": {"md": "New content"}}}
```

<Note>
  Data and metadata are merged with existing values, not replaced entirely.
</Note>

### Real-Time Sync

Notes emit WebSocket events on update:

```javascript theme={null}
// Clients subscribed to room: note:{note_id}
// Receive event: note-events
{
  "id": "note-123",
  "title": "Updated Note",
  "data": {...},
  "updated_at": 1234567900
}
```

Use for:

* **Collaborative Editing**: Multiple users see changes instantly
* **Auto-Save Indicators**: Show when note was last saved
* **Conflict Resolution**: Detect concurrent edits

## Access Control

### Permission Levels

<Tabs>
  <Tab title="Read Access">
    Users can:

    * View note content
    * See note metadata
    * Include in search results
    * Clone/export the note
  </Tab>

  <Tab title="Write Access">
    Users can (in addition to read):

    * Edit note content
    * Update metadata
    * Manage access grants
    * Delete the note
  </Tab>

  <Tab title="Owner">
    Note creator has:

    * Full write access
    * Cannot be revoked
    * Permanent ownership (no transfer)
  </Tab>
</Tabs>

### Configuring Access

Set up access grants for notes:

```python theme={null}
# API endpoint: POST /api/v1/notes/{id}/access/update
{
  "access_grants": [
    {
      "principal_type": "user",
      "principal_id": "user-123",
      "permission": "write"
    },
    {
      "principal_type": "group",
      "principal_id": "group-engineering",
      "permission": "read"
    },
    {
      "principal_type": "user",
      "principal_id": "*",  # Public access
      "permission": "read"
    }
  ]
}
```

### Access Grant Types

<CardGroup cols={3}>
  <Card title="User Access" icon="user">
    Grant access to specific users by ID
  </Card>

  <Card title="Group Access" icon="users">
    All group members inherit access automatically
  </Card>

  <Card title="Public Access" icon="globe">
    Use `principal_id: "*"` for organization-wide sharing
  </Card>
</CardGroup>

<Warning>
  Public note sharing requires the `sharing.public_notes` permission for non-admin users.
</Warning>

### Group-Based Access

Notes automatically become available to users based on group membership:

<Steps>
  <Step title="Create Groups">
    Set up user groups (e.g., "Marketing Team", "Engineering")
  </Step>

  <Step title="Grant Group Access">
    Add group to note's access grants
  </Step>

  <Step title="Automatic Propagation">
    All group members immediately see the note in their list
  </Step>

  <Step title="Dynamic Updates">
    Adding users to the group automatically grants note access
  </Step>
</Steps>

## Content Formatting

### Markdown Support

Notes use markdown for rich text formatting:

<Tabs>
  <Tab title="Basic Formatting">
    ```markdown theme={null}
    # Heading 1
    ## Heading 2
    ### Heading 3

    **Bold text**
    *Italic text*
    ~~Strikethrough~~

    - Bullet list
    - Another item

    1. Numbered list
    2. Second item
    ```
  </Tab>

  <Tab title="Links & Images">
    ```markdown theme={null}
    [Link text](https://example.com)

    ![Image alt text](https://example.com/image.png)
    ```
  </Tab>

  <Tab title="Code Blocks">
    ````markdown theme={null}
    Inline `code` with backticks

    ```python
    # Code block with syntax highlighting
    def hello():
        print("Hello, World!")
    ```
    ````
  </Tab>

  <Tab title="Tables">
    ```markdown theme={null}
    | Column 1 | Column 2 |
    |----------|----------|
    | Data 1   | Data 2   |
    | Data 3   | Data 4   |
    ```
  </Tab>
</Tabs>

### Content Storage

Note content is stored in a structured format:

```json theme={null}
{
  "data": {
    "content": {
      "md": "# Your markdown here"
    },
    "custom_field": "Additional data..."
  }
}
```

<Tip>
  The `data` object supports custom fields for application-specific metadata.
</Tip>

## Search & Discovery

### Text Normalization

Search intelligently handles variations:

```bash theme={null}
# These queries all match "to-do", "to do", and "todo"
GET /api/v1/notes/search?query=todo
GET /api/v1/notes/search?query=to-do
GET /api/v1/notes/search?query=to%20do
```

Normalization:

* **Spaces and hyphens** treated as equivalent
* **Case insensitive** matching
* **Partial matches** in title and content

### Search Scope

<CardGroup cols={2}>
  <Card title="Title Search" icon="heading">
    Note titles are indexed for fast lookups
  </Card>

  <Card title="Content Search" icon="file-lines">
    Full markdown content is searchable
  </Card>

  <Card title="Access Filter" icon="filter">
    Results automatically filtered by permissions
  </Card>

  <Card title="Group Integration" icon="users">
    Group membership affects visible results
  </Card>
</CardGroup>

### Pagination

Efficient handling of large note collections:

* **Default**: 60 notes per page
* **Customizable**: Use `limit` parameter in API
* **Total Count**: Response includes total matching notes
* **Offset-Based**: Use `skip` for custom pagination

```bash theme={null}
# Get notes 61-120
GET /api/v1/notes/search?page=2

# Custom pagination
GET /api/v1/notes/?skip=100&limit=25
```

## Deleting Notes

Remove notes permanently:

```bash theme={null}
# API endpoint: DELETE /api/v1/notes/{id}/delete
```

Permission requirements:

* **Owner**: Can always delete
* **Write Access**: Can delete if granted
* **Admin**: Can delete any note

<Warning>
  Deleting a note:

  * Removes all content permanently
  * Revokes all access grants
  * Cannot be undone
  * No trash/recovery mechanism
</Warning>

## Metadata Management

Organize notes with custom metadata:

### Common Metadata Fields

```json theme={null}
{
  "meta": {
    "tags": ["project-x", "meeting", "important"],
    "category": "documentation",
    "priority": "high",
    "due_date": "2024-12-31",
    "assignee": "user-123",
    "status": "in-progress"
  }
}
```

<Tip>
  Use consistent metadata schemas across your organization for better organization and filtering.
</Tip>

### Tags vs. Metadata

<Tabs>
  <Tab title="Tags">
    * Simple string arrays
    * Good for categories and topics
    * Easy to filter and group
    * Commonly used in UI
  </Tab>

  <Tab title="Custom Metadata">
    * Structured data
    * Application-specific fields
    * Rich data types
    * Extensible schema
  </Tab>
</Tabs>

## Best Practices

### Note Organization

<Steps>
  <Step title="Use Descriptive Titles">
    Choose clear, searchable titles:

    * ✅ "Q1 2024 Marketing Strategy"
    * ✅ "API Integration Guide - Stripe"
    * ❌ "Notes", "Untitled", "Test"
  </Step>

  <Step title="Apply Consistent Tags">
    Develop a tagging taxonomy:

    * Project names
    * Document types
    * Departments
    * Status indicators
  </Step>

  <Step title="Set Appropriate Access">
    Start restrictive, expand as needed:

    * Personal notes: Owner only
    * Team notes: Group access
    * Public docs: Organization-wide read
  </Step>

  <Step title="Regular Maintenance">
    Keep notes relevant:

    * Archive outdated content
    * Update access as teams change
    * Remove duplicate notes
  </Step>
</Steps>

### Content Guidelines

* **Structure Content**: Use headers for scannable notes
* **Link References**: Connect related notes and resources
* **Version Important Changes**: Note major updates in content
* **Keep It Concise**: Break long documents into multiple notes

### Collaboration

* **Write Access**: Grant to active collaborators only
* **Read Access**: Share broadly for visibility
* **Use Groups**: Easier than individual user grants
* **Real-Time Awareness**: Leverage WebSocket events for collaboration

## Performance Optimization

### Content Truncation

List views automatically truncate content:

```python theme={null}
# In list/search results
"data": {
  "content": {
    "md": "First 1000 characters only..."
  }
}
```

Benefits:

* **Faster Loading**: Reduced payload size
* **Better UX**: Quick previews
* **Scalability**: Handles large note collections

### Efficient Querying

<CardGroup cols={2}>
  <Card title="Use Filters" icon="filter">
    Narrow results at the database level instead of client-side
  </Card>

  <Card title="Pagination" icon="list-ol">
    Load notes incrementally for better performance
  </Card>

  <Card title="Limit Fields" icon="compress">
    Use list endpoints for previews, detail endpoint for full content
  </Card>

  <Card title="Cache Results" icon="database">
    Leverage HTTP caching headers
  </Card>
</CardGroup>

## Admin Features

### Access Control Override

Admins can optionally bypass restrictions:

```python theme={null}
# Configuration option
BYPASS_ADMIN_ACCESS_CONTROL = True
```

When enabled, admins:

* View all notes regardless of access grants
* Modify any note content
* Manage access for all users
* Delete any note

<Warning>
  Use admin override carefully. It bypasses all permission checks.
</Warning>

## API Reference

<CardGroup cols={2}>
  <Card title="List Notes" icon="list">
    ```
    GET /api/v1/notes/?page=1
    ```

    Paginated note list (60 per page)
  </Card>

  <Card title="Search Notes" icon="magnifying-glass">
    ```
    GET /api/v1/notes/search?query=...
    ```

    Advanced filtering and sorting
  </Card>

  <Card title="Get Note" icon="eye">
    ```
    GET /api/v1/notes/{id}
    ```

    Full note content and metadata
  </Card>

  <Card title="Create Note" icon="plus">
    ```
    POST /api/v1/notes/create
    ```

    Create new note with content
  </Card>

  <Card title="Update Note" icon="pen">
    ```
    POST /api/v1/notes/{id}/update
    ```

    Modify content or metadata
  </Card>

  <Card title="Update Access" icon="lock">
    ```
    POST /api/v1/notes/{id}/access/update
    ```

    Manage access grants
  </Card>

  <Card title="Delete Note" icon="trash">
    ```
    DELETE /api/v1/notes/{id}/delete
    ```

    Permanently remove note
  </Card>
</CardGroup>

<Note>
  All endpoints require authentication and respect note access controls.
</Note>
