---
title: "Server notes API"
description: "API reference for Alpacon server notes. Create, list, retrieve, update, and delete notes attached to servers with support for private notes, pinned notes, and user mentions."
---

> Full documentation index: https://docs.alpacax.com/llms.txt

# Server notes

**Endpoint**: `/api/servers/notes/`

Manage notes attached to servers. Notes allow teams to document server configurations, maintenance history, and operational details. Notes support markdown formatting, private visibility, pinning, and user mentions.

  
    ## List notes

    Retrieve a paginated list of notes.

    ### Request

    ```http
    GET /api/servers/notes/
    ```

    ### Query parameters

    | Parameter | Type | Description |
    |-----------|------|-------------|
    | `server` | UUID | Filter by server ID |
    | `author` | UUID | Filter by author user ID |
    | `private` | boolean | Filter by private status |
    | `pinned` | boolean | Filter by pinned status |
    | `search` | string | Search across content, server name, and author name |
    | `ordering` | string | Sort order (e.g., `-added_at`, `pinned`). Default: `-pinned`, `-added_at` |
    | `page` | integer | Page number |
    | `page_size` | integer | Results per page (default: 15, max: 100) |

    ### Response

    ```json
    {
      "count": 5,
      "next": null,
      "previous": null,
      "results": [
        {
          "id": "c72e9f01-3a5b-4d8e-9f12-1a2b3c4d5e6f",
          "server": {
            "id": "7e3984de-49ab-4cc6-bcdf-21fbd35858b8",
            "name": "web-server-01",
            "os": "Ubuntu 22.04",
            "is_connected": true,
            "platform": "debian",
            "is_deleted": false
          },
          "author": {
            "id": "a540bf0f-8b37-4f03-8546-dd71c6b03329",
            "name": "admin",
            "email": "admin@example.com"
          },
          "content": "Upgraded to Ubuntu 22.04 LTS on 2024-01-15.",
          "private": false,
          "pinned": true,
          "added_at": "2024-01-15T14:30:00Z",
          "updated_at": "2024-01-15T14:30:00Z"
        }
      ]
    }
    ```

    ### Example

    ```bash
    curl -X GET "https://your-workspace.us1.alpacon.io/api/servers/notes/?server=7e3984de-49ab-4cc6-bcdf-21fbd35858b8&pinned=true" \
      -H "Authorization: token=\"alpat-xxxxxxxxxxxxxxxxxx\""
    ```
  </Tabs.Tab>

  <Tabs.Tab>
    ## Create note

    Add a new note to a server. Supports markdown content, private visibility, pinning, and user mentions.

    ### Request

    ```http
    POST /api/servers/notes/
    ```

    ### Request body

    ```json
    {
      "server": "7e3984de-49ab-4cc6-bcdf-21fbd35858b8",
      "content": "Scheduled maintenance window: 2024-02-01 02:00-04:00 UTC",
      "private": false,
      "pinned": true,
      "mentioned_users": ["a540bf0f-8b37-4f03-8546-dd71c6b03329"]
    }
    ```

    ### Parameters

    | Field | Type | Required | Description |
    |-------|------|----------|-------------|
    | `server` | UUID | Yes | Server ID to attach the note to |
    | `content` | string | Yes | Note content (max 512 characters, markdown supported) |
    | `private` | boolean | No | Private note visible only to author (default: `false`) |
    | `pinned` | boolean | No | Pin note to top of list (default: `false`, max 3 pinned notes per server) |
    | `mentioned_users` | array[UUID] | No | User IDs to mention (triggers notifications). Write-only |

    ### Response

    The create response returns `author` as a user ID and omits `added_at`. List, Get, and Update responses include the nested author and `added_at`.

    ```json
    {
      "id": "d83f0a12-4b6c-5e9f-0a23-2b3c4d5e6f7a",
      "server": {
        "id": "7e3984de-49ab-4cc6-bcdf-21fbd35858b8",
        "name": "web-server-01",
        "os": "Ubuntu 22.04",
        "is_connected": true,
        "platform": "debian",
        "is_deleted": false
      },
      "author": "a540bf0f-8b37-4f03-8546-dd71c6b03329",
      "content": "Scheduled maintenance window: 2024-02-01 02:00-04:00 UTC",
      "private": false,
      "pinned": true,
      "updated_at": "2024-01-20T10:00:00Z"
    }
    ```

    ### Example

    ```bash
    curl -X POST "https://your-workspace.us1.alpacon.io/api/servers/notes/" \
      -H "Authorization: token=\"alpat-xxxxxxxxxxxxxxxxxx\"" \
      -H "Content-Type: application/json" \
      -d '{"server": "7e3984de-49ab-4cc6-bcdf-21fbd35858b8", "content": "Maintenance scheduled for next week", "pinned": true}'
    ```
  </Tabs.Tab>

  <Tabs.Tab>
    ## Get note

    Retrieve a specific note by ID.

    ### Request

    ```http
    GET /api/servers/notes/{note_id}/
    ```

    ### Path parameters

    | Parameter | Type | Required | Description |
    |-----------|------|----------|-------------|
    | `note_id` | UUID | Yes | Note ID |

    ### Response

    ```json
    {
      "id": "c72e9f01-3a5b-4d8e-9f12-1a2b3c4d5e6f",
      "server": {
        "id": "7e3984de-49ab-4cc6-bcdf-21fbd35858b8",
        "name": "web-server-01",
        "os": "Ubuntu 22.04",
        "is_connected": true,
        "platform": "debian",
        "is_deleted": false
      },
      "author": {
        "id": "a540bf0f-8b37-4f03-8546-dd71c6b03329",
        "name": "admin",
        "email": "admin@example.com"
      },
      "content": "Upgraded to Ubuntu 22.04 LTS on 2024-01-15.",
      "private": false,
      "pinned": true,
      "added_at": "2024-01-15T14:30:00Z",
      "updated_at": "2024-01-15T14:30:00Z"
    }
    ```

    ### Example

    ```bash
    curl -X GET "https://your-workspace.us1.alpacon.io/api/servers/notes/c72e9f01-3a5b-4d8e-9f12-1a2b3c4d5e6f/" \
      -H "Authorization: token=\"alpat-xxxxxxxxxxxxxxxxxx\""
    ```
  </Tabs.Tab>

  <Tabs.Tab>
    ## Update note

    Update an existing note. Only `content`, `private`, and `pinned` are writable.

    ### Request

    ```http
    PATCH /api/servers/notes/{note_id}/
    ```

    ### Path parameters

    | Parameter | Type | Required | Description |
    |-----------|------|----------|-------------|
    | `note_id` | UUID | Yes | Note ID |

    ### Request body

    ```json
    {
      "content": "Updated maintenance notes: completed without issues.",
      "pinned": false
    }
    ```

    ### Parameters

    | Field | Type | Required | Description |
    |-------|------|----------|-------------|
    | `content` | string | No | Updated note content (max 512 characters) |
    | `private` | boolean | No | Private visibility |
    | `pinned` | boolean | No | Pinned status (max 3 pinned notes per server) |

    ### Response

    ```json
    {
      "id": "d83f0a12-4b6c-5e9f-0a23-2b3c4d5e6f7a",
      "server": {
        "id": "7e3984de-49ab-4cc6-bcdf-21fbd35858b8",
        "name": "web-server-01",
        "os": "Ubuntu 22.04",
        "is_connected": true,
        "platform": "debian",
        "is_deleted": false
      },
      "author": {
        "id": "a540bf0f-8b37-4f03-8546-dd71c6b03329",
        "name": "admin",
        "email": "admin@example.com"
      },
      "content": "Updated maintenance notes: completed without issues.",
      "private": false,
      "pinned": false,
      "added_at": "2024-01-20T10:00:00Z",
      "updated_at": "2024-01-20T16:45:00Z"
    }
    ```

    ### Example

    ```bash
    curl -X PATCH "https://your-workspace.us1.alpacon.io/api/servers/notes/d83f0a12-4b6c-5e9f-0a23-2b3c4d5e6f7a/" \
      -H "Authorization: token=\"alpat-xxxxxxxxxxxxxxxxxx\"" \
      -H "Content-Type: application/json" \
      -d '{"content": "Updated maintenance notes: completed without issues.", "pinned": false}'
    ```
  </Tabs.Tab>

  <Tabs.Tab>
    ## Delete note

    Remove a note from a server.

    ### Request

    ```http
    DELETE /api/servers/notes/{note_id}/
    ```

    ### Path parameters

    | Parameter | Type | Required | Description |
    |-----------|------|----------|-------------|
    | `note_id` | UUID | Yes | Note ID |

    ### Response

    ```http
    204 No Content
    ```

    ### Example

    ```bash
    curl -X DELETE "https://your-workspace.us1.alpacon.io/api/servers/notes/d83f0a12-4b6c-5e9f-0a23-2b3c4d5e6f7a/" \
      -H "Authorization: token=\"alpat-xxxxxxxxxxxxxxxxxx\""
    ```
  </Tabs.Tab>
</Tabs>

## Error responses

| Status | Error code | Description |
|--------|------------|-------------|
| 400 | `note_pin_limit_exceeded` | Maximum 3 pinned notes per server |
| 401 | — | Invalid or missing authentication. Uncoded `{"detail": "..."}` response |
| 403 | — | Insufficient permissions (e.g., editing another user's private note). Uncoded `{"detail": "..."}` response |
| 403 | `api_token_scope_missing` | The API or service token doesn't hold the `note:<action>` scope this request needs |
| 404 | — | Note not found. Uncoded `{"detail": "..."}` response |

Source: https://docs.alpacax.com/reference/api/servers/notes/
