SNotesSNotes Docs
REST API

Collections API

Create, list, update, trash, and restore SNotes collections, then add or remove notes. Set a name and color, and manage membership with the public REST API.

Collections allow you to organize and group notes into colored categories, folders, or tags. A note can belong to multiple collections simultaneously.


Collection Schema

{
  "id": "e4587563-7182-4df3-a16a-a2fcda00a293",
  "name": "Work Projects",
  "color": "#93c5fd",
  "noteCount": 8,
  "position": "a0",
  "trashedAt": null,
  "createdAt": "2026-08-18T09:00:00Z",
  "updatedAt": "2026-08-18T09:30:00Z"
}

Fields

FieldTypeDescription
idUUIDUnique identifier for the collection.
namestringName of the collection (max 100 chars, unique among active collections).
colorstring | nullOptional hex color (e.g. "#93c5fd").
noteCountintegerActive notes in this collection. Archived and trashed notes are omitted. On a trashed collection, the count is how many notes come back with a restore.
positionstringServer-assigned fractional order key.
trashedAtstring | nullWhen the collection was moved to trash, or null if it is active.
createdAtstringISO 8601 creation timestamp.
updatedAtstringISO 8601 modification timestamp.

1. List Collections

Lists active collections owned by the user, in the user's drag-and-drop order. Trashed collections are omitted.

GET /v1/public/collections/

Example Request

curl -X GET "https://api.snotes.io/v1/public/collections/" \
  -H "Authorization: Bearer sn_live_xxxxxxxxxxxxxxxxxxxxxxxx"

2. Create Collection

Creates a new collection, optionally populating it with existing notes.

POST /v1/public/collections/

Request Body

FieldTypeRequiredDescription
namestringYesUnique name for the collection (max 100 chars).
colorstringNoHex color code (e.g. "#86efac").
noteIdsarray[UUID]NoOptional list of note UUIDs to add immediately.

Example Request

curl -X POST "https://api.snotes.io/v1/public/collections/" \
  -H "Authorization: Bearer sn_live_xxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Travel Plans",
    "color": "#86efac",
    "noteIds": ["7b79da93-ca77-4cf0-9dc4-14227363b965"]
  }'

3. Retrieve Collection

Fetch a single collection by its UUID.

GET /v1/public/collections/{collection_id}/

4. Update Collection

Rename or recolor a collection.

PATCH /v1/public/collections/{collection_id}/

Request Body

FieldTypeDescription
namestringNew collection name.
colorstring | nullNew hex color code or null.

5. Move Collection to Trash

Moves the collection to trash, together with every note currently in it. Notes that were already in trash stay on their own 30-day clock and are not restored with the collection.

Trashed collections disappear from the collection list. They are permanently deleted after 30 days, or sooner with Empty Trash or Delete Collection Permanently.

DELETE /v1/public/collections/{collection_id}/

Response: 204 No Content

Calling this again does not restart the 30-day clock.


6. List Trashed Collections

Returns paginated collections in the trash, most recently trashed first.

GET /v1/public/collections/trash/

7. Restore Collection

Brings a trashed collection back to the top of the collection list, and restores the notes that were trashed with it. Archived notes come back still archived. Notes you already restored or trashed on their own are left as they are.

If an active collection already uses the same name, the restore fails with 409 Conflict and nothing changes.

POST /v1/public/collections/{collection_id}/restore/

8. Delete Collection Permanently

Permanently destroys a collection that is already in trash, and the notes still trashed with it. Notes you already restored are kept. This cannot be undone.

DELETE /v1/public/collections/trash/{collection_id}/

Response: 204 No Content


9. List Notes in Collection

Returns paginated notes that belong to the specified collection. Accepts the same filter and week_start query parameters as List Active Notes.

GET /v1/public/collections/{collection_id}/notes/

10. Add Notes to Collection

Associates one or more existing notes with this collection.

POST /v1/public/collections/{collection_id}/notes/

Request Body

{
  "noteIds": [
    "7b79da93-ca77-4cf0-9dc4-14227363b965",
    "c7a8d438-e6fc-4632-9df6-2e8bf535bfd9"
  ]
}

Response

{
  "collection": {
    "id": "e4587563-7182-4df3-a16a-a2fcda00a293",
    "name": "Travel Plans",
    "color": "#86efac",
    "noteCount": 2
  },
  "added": 2
}

11. Remove Note from Collection

Removes a note from a collection without deleting the note itself.

DELETE /v1/public/collections/{collection_id}/notes/{note_id}/

Response: 204 No Content

On this page