Tasks

Task management with end-to-end encrypted content; metadata for filtering and smart lists is stored in the clear.

Service: tasks.tasks

Task management with end-to-end encrypted content. User-facing content (titles, notes, URLs) is encrypted client-side before reaching the server. Metadata used for filtering and smart lists (dates, priority, flags) is stored in the clear.

All methods use the JSON-RPC 2.0 protocol over WebSocket. See Enbox API for transport details, error codes, query operators, and encryption model.

Fields

Field Type Required Description
id string Primary key. Read-only, auto-generated
folder_id string? Parent folder id. null = Inbox
owner_id string Owner user id. Read-only
owner_wrapped_key string Content key wrapped by owner’s account key (base64)
folder_wrapped_key string? Content key wrapped by folder key. null when not in a shared folder
assigned_to_id string? Assigned user id
completed boolean Completion flag. Default false
completed_at string? ISO 8601 completion timestamp. Read-only
due_at string? ISO 8601 due date or datetime
has_time boolean true if the time part of due_at is meaningful. Default false
priority integer Priority level. Values: 0 (none) · 1 (low) · 2 (medium) · 3 (high). Default 0
flagged boolean Flagged for follow-up. Default false
position float Fractional drag-sort position within a folder
enc_title string Encrypted task title. Plain string after decryption
enc_notes string Encrypted rich-text notes. Plain string after decryption (HTML or plain text)
enc_url string Encrypted associated URL. Plain string after decryption
enc_location string Encrypted location string. Plain string after decryption
enc_repeat string Encrypted recurrence rule. Plain string after decryption. Values: none · daily · weekdays · weekly · monthly · yearly
subtasks_total integer Total subtask count. Read-only, computed
subtasks_done integer Completed subtask count. Read-only, computed
created_at string ISO 8601 creation timestamp. Read-only
updated_at string ISO 8601 last update timestamp. Read-only
task_tag string[] Assigned tag IDs
task_subtask Subtask[] Checklist items. Returned in detail view
task_attachment Attachment[] File metadata. Returned in detail view

Filterable: folder_id · assigned_to_id · completed · priority · flagged

Warning: When setting due_at, always set has_time accordingly. If has_time is false, only the date portion of due_at is displayed to the user; the time part is ignored.

Subtask

Checklist item within a task.

Field Type Required Description
id string Primary key. Read-only. Omit when creating
completed boolean Completion flag. Default false
position float Fractional ordering position
enc_title string Encrypted subtask title. Plain string after decryption

Attachment

File metadata within a task. Binary content is uploaded and downloaded via the Attachments service using presigned URLs.

Field Type Required Description
id string Primary key. Read-only. Omit when creating
size_bytes integer Logical plaintext file size in bytes
status string Upload state. Read-only. Values: pending (uploading) · ready (finalized)
enc_name string Encrypted file name. Plain string after decryption
enc_mime_type string Encrypted MIME type. Plain string after decryption (e.g. "application/pdf", "image/png")
thumbnail_128_id string? Chunk id of the encrypted 128 px thumbnail. Read-only. null for non-image files
chunk_count integer Number of uploaded chunks. Read-only, computed

AttachmentChunk

Ordered chunk reference for a file attachment. Created by confirmChunk.

Field Type Required Description
id string Primary key. Read-only
attachment_id string Parent Attachment id
chunk_index integer 0-based chunk order
chunk_id string Reference to the stored encrypted blob

find

List tasks with filtering, sorting, and pagination.

WebSocket

Request

{
  "jsonrpc": "2.0",
  "method": "tasks.tasks.find",
  "params": {
    "filter": { "completed": { "$eq": false } },
    "sort": [{ "field": "created_at", "dir": "desc" }],
    "limit": 100,
    "fields": [
      "id", "folder_id", "folder_wrapped_key", "completed", "due_at", "priority", "flagged",
      "position", "enc_title", "enc_notes", "subtasks_total", "subtasks_done",
      "owner_id", "owner_wrapped_key",
      "task_tag.tag_id"
    ]
  },
  "id": 1
}

Response

{
  "jsonrpc": "2.0",
  "result": {
    "items": [
      {
        "id": "1920438291738",
        "folder_id": "1920438291700",
        "folder_wrapped_key": null,
        "completed": false,
        "due_at": "2026-05-15T09:00:00Z",
        "priority": 2,
        "flagged": false,
        "position": 1000.0,
        "enc_title": "<base64>",
        "enc_notes": "<base64>",
        "subtasks_total": 3,
        "subtasks_done": 1,
        "owner_id": "42",
        "owner_wrapped_key": "<base64>",
        "task_tag": ["1920438291800"]
      }
    ],
    "total": 47
  },
  "id": 1
}

findOneById

Fetch a single task with full detail including subtasks and attachments.

WebSocket

Request

{
  "jsonrpc": "2.0",
  "method": "tasks.tasks.findOneById",
  "params": {
    "id": "1920438291738",
    "fields": [
      "id", "folder_id", "folder_wrapped_key", "completed", "completed_at", "due_at", "has_time",
      "priority", "flagged", "position", "created_at",
      "enc_title", "enc_notes", "enc_url", "enc_location", "enc_repeat",
      "subtasks_total", "subtasks_done",
      "owner_id", "owner_wrapped_key",
      "task_tag.tag_id",
      "task_subtask.id", "task_subtask.completed", "task_subtask.position", "task_subtask.enc_title",
      "task_attachment.id", "task_attachment.size_bytes", "task_attachment.status",
      "task_attachment.enc_name", "task_attachment.enc_mime_type",
      "task_attachment.thumbnail_128_id", "task_attachment.chunk_count"
    ]
  },
  "id": 2
}

Response

{
  "jsonrpc": "2.0",
  "result": {
    "id": "1920438291738",
    "folder_id": "1920438291700",
    "folder_wrapped_key": null,
    "completed": false,
    "completed_at": null,
    "due_at": "2026-05-15T09:00:00Z",
    "has_time": true,
    "priority": 2,
    "flagged": false,
    "position": 1000.0,
    "created_at": "2026-05-01T10:30:00Z",
    "enc_title": "<base64>",
    "enc_notes": "<base64>",
    "enc_url": "<base64>",
    "enc_location": "<base64>",
    "enc_repeat": "<base64>",
    "subtasks_total": 3,
    "subtasks_done": 1,
    "owner_id": "42",
    "owner_wrapped_key": "<base64>",
    "task_tag": ["1920438291800"],
    "task_subtask": [
      { "id": "1920438291750", "completed": false, "position": 0, "enc_title": "<base64>" },
      { "id": "1920438291751", "completed": true,  "position": 1, "enc_title": "<base64>" },
      { "id": "1920438291752", "completed": false, "position": 2, "enc_title": "<base64>" }
    ],
    "task_attachment": [
      {
        "id": "1920438291760",
        "size_bytes": 245760,
        "status": "ready",
        "enc_name": "<base64>",
        "enc_mime_type": "<base64>",
        "thumbnail_128_id": null,
        "chunk_count": 1
      }
    ]
  },
  "id": 2
}

create

Create a new task. The server assigns id, created_at, and updated_at.

WebSocket

Request

{
  "jsonrpc": "2.0",
  "method": "tasks.tasks.create",
  "params": {
    "document": {
      "folder_id": "1920438291700",
      "enc_title": "<base64>",
      "enc_notes": "<base64>",
      "due_at": "2026-05-15T09:00:00Z",
      "has_time": true,
      "priority": 2,
      "position": 1000.0,
      "owner_id": "42",
      "owner_wrapped_key": "<base64>",
      "task_tag": ["1920438291800"],
      "task_subtask": [
        { "completed": false, "position": 0, "enc_title": "<base64>" }
      ]
    }
  },
  "id": 3
}

Response

{
  "jsonrpc": "2.0",
  "result": {
    "id": "1920438291738",
    "folder_id": "1920438291700",
    "enc_title": "<base64>",
    "created_at": "2026-05-13T18:30:00Z"
  },
  "id": 3
}

updateOneById

Partial update — only specified fields change; omitted fields are untouched. Nested collections are updated automatically: items with id are updated, items without id are created, items missing from the array are deleted.

WebSocket

Request

{
  "jsonrpc": "2.0",
  "method": "tasks.tasks.updateOneById",
  "params": {
    "id": "1920438291738",
    "document": {
      "completed": true,
      "enc_title": "<base64-new>"
    }
  },
  "id": 4
}

Response

{
  "jsonrpc": "2.0",
  "result": {
    "id": "1920438291738",
    "completed": true,
    "enc_title": "<base64-new>",
    "updated_at": "2026-05-13T18:45:00Z"
  },
  "id": 4
}

replaceOneById

Full replacement — all writable fields must be provided. Unlike updateOneById, omitted fields are reset to defaults. Nested collections (task_tag, task_subtask, task_attachment) are not accepted in this method — use updateOneById to modify them.

WebSocket

Request

{
  "jsonrpc": "2.0",
  "method": "tasks.tasks.replaceOneById",
  "params": {
    "id": "1920438291738",
    "document": {
      "folder_id": "1920438291700",
      "completed": true,
      "due_at": "2026-05-15T09:00:00Z",
      "has_time": true,
      "priority": 2,
      "flagged": false,
      "position": 1000.0,
      "enc_title": "<base64>",
      "enc_notes": "<base64>",
      "enc_url": "<base64>",
      "enc_location": "<base64>",
      "enc_repeat": "<base64>"
    }
  },
  "id": 4
}

Response

{
  "jsonrpc": "2.0",
  "result": {
    "id": "1920438291738",
    "completed": true,
    "enc_title": "<base64>",
    "updated_at": "2026-05-13T18:45:00Z"
  },
  "id": 4
}

update

Batch update multiple tasks in a single transaction (all-or-nothing). See Batch operations.

WebSocket

Request

{
  "jsonrpc": "2.0",
  "method": "tasks.tasks.update",
  "params": {
    "items": [
      { "id": "1920438291738", "document": { "folder_id": "1920438291710" } },
      { "id": "1920438291739", "document": { "folder_id": "1920438291710" } }
    ]
  },
  "id": 5
}

Response

{
  "jsonrpc": "2.0",
  "result": {
    "affected": 2,
    "items": [
      { "id": "1920438291738", "folder_id": "1920438291710" },
      { "id": "1920438291739", "folder_id": "1920438291710" }
    ]
  },
  "id": 5
}

deleteOneById

Delete a task. All subtasks, attachments, tag assignments, and access roles are deleted with it.

WebSocket

Request

{
  "jsonrpc": "2.0",
  "method": "tasks.tasks.deleteOneById",
  "params": {
    "id": "1920438291738"
  },
  "id": 6
}

Response

{
  "jsonrpc": "2.0",
  "result": {
    "id": "1920438291738",
    "enc_title": "<base64>"
  },
  "id": 6
}

delete

Batch delete tasks in a single transaction (all-or-nothing). See Batch operations.

WebSocket

Request

{
  "jsonrpc": "2.0",
  "method": "tasks.tasks.delete",
  "params": {
    "items": [
      { "id": "1920438291738" },
      { "id": "1920438291739" }
    ]
  },
  "id": 7
}

Response

{
  "jsonrpc": "2.0",
  "result": {
    "affected": 2,
    "items": [
      { "id": "1920438291738" },
      { "id": "1920438291739" }
    ]
  },
  "id": 7
}