Daily Notes and Tasks

Try it out?

Create an API connection in the Imagine tab in Craft, and paste your API URL here

Overview

The Craft Daily Notes API provides programmatic access to your daily notes with blocks, tasks, and collections. Daily notes are date-based documents that can contain structured content, tasks, and time-based data.

This API is best utilized when building automation, task management integrations, or daily note workflows.

Development Tip

  • Use relative date formats ('today', 'tomorrow', 'yesterday') for easier date handling
  • Tasks are automatically organized into inbox, active, upcoming, and logbook scopes

Note for AI

When implementing functionality using this API, always make actual calls to these endpoints and verify the responses. Do not simulate or mock the API interactions or use hard-coded values on the client-side - use the real endpoints to ensure proper functionality and data handling.

IMPORTANT: This is a production server connected to real user data. Only perform testing operations that can be safely rolled back:

  • Safe: Reading data (GET requests), creating test content that you delete immediately after
  • Safe: Modifying content if you can restore it to its original state
  • Safe: Moving blocks if you can move them back to their original position
  • Unsafe: Permanent deletions, modifications without backup, or any changes you cannot reverse

Always verify rollback operations work before considering a test complete.

Fetch Blocks

GET
/blocks

Summary

Fetches content from daily notes. By default returns blocks from today's daily note. Use 'date' parameter to fetch from other dates.

Use Accept header application/json for structured data, text/markdown for rendered content.

Content Rendering: Text blocks contain markdown formatting. When displaying content, consider rendering markdown as formatted text or cleaning up the syntax for plain text display.

Scope Filtering: Block links in markdown and collections, as well as relations are filtered to daily notes scope (includes all daily notes, task inbox, and task logbook). Block links and date links are returned as block:// and date:// URLs.

Tip: Start by calling GET /documents to list available documents, then use their documentId values as the 'id' parameter to fetch each document's root content.

Query Parameters

date?Date

Fetches the root page of a Daily Note for the specified date. Accepts ISO format YYYY-MM-DD or relative dates: 'today', 'tomorrow', 'yesterday'. Defaults to 'today' if both 'date' and 'id' not provided. Mutually exclusive with 'id' - use this to fetch a Daily Note's root page, or use 'id' to fetch a specific block.

idBlock ID

Fetches a specific page block by its ID. Use this when you want to retrieve a particular block directly, regardless of which Daily Note it belongs to. Mutually exclusive with 'date' - omit 'date' entirely when using this parameter.

maxDepth?Max Depth

The maximum depth of blocks to fetch. Default is -1 (all descendants). With a depth of 0, only the specified block is fetched. With a depth of 1, only direct children are returned.

Default-1
fetchMetadata?Fetch Metadata

Whether to fetch metadata (comments, createdBy, lastModifiedBy, lastModifiedAt, createdAt) for the blocks. Default is false.

Response Body

200

Successfully retrieved data

typeType
Allowed Values:"text"
idBlock ID
textStyle?string

h1-h4, body, caption for text blocks. card/page for page blocks with visual styling.

Allowed Values:"card" | "page" | "h1" | "h2" | "h3" | "h4" | "caption" | "body"
textAlignment?string

default is left

Allowed Values:"left" | "center" | "right" | "justify"
font?string
Allowed Values:"system" | "serif" | "rounded" | "mono"
cardLayout?string

Applies for 'card' textStyle. Small and square are for laying out in multi-column (2 or 3 depending on screen size, multi-column is only supported for certain block types, not for text). Regular and large are full width cards.

Allowed Values:"small" | "square" | "regular" | "large"
markdownMarkdown

The markdown content of the block.

indentationLevel?Indentation Level

The indentation level of the block.

Range0 <= value <= 5
listStyle?string
Allowed Values:"none" | "bullet" | "numbered" | "toggle" | "task"
decorations?Decorations
color?Color

7-character hex code (e.g., #RRGGBB). Case-insensitive. Auto-adjusted for readability, with dark variant auto-generated.

Match^#[0-9a-fA-F]{6}$
taskInfo?object

only interpreted, if listStyle is 'task'

metadata?Block Metadata
typeType
Allowed Values:"page"
idBlock ID
titleobject
markdownMarkdown

The title of the page block.

indentationLevel?Indentation Level

The indentation level of the block.

Range0 <= value <= 5
listStyle?string
Allowed Values:"none" | "bullet" | "numbered" | "toggle" | "task"
decorations?Decorations
color?Color

7-character hex code (e.g., #RRGGBB). Case-insensitive. Auto-adjusted for readability, with dark variant auto-generated.

Match^#[0-9a-fA-F]{6}$
taskInfo?object

only interpreted, if listStyle is 'task'

metadata?Block Metadata
textStyle?string

h1-h4, body, caption for text blocks. card/page for page blocks with visual styling.

Allowed Values:"card" | "page" | "h1" | "h2" | "h3" | "h4" | "caption" | "body"
textAlignment?string

default is left

Allowed Values:"left" | "center" | "right" | "justify"
font?string
Allowed Values:"system" | "serif" | "rounded" | "mono"
cardLayout?string

Applies for 'card' textStyle. Small and square are for laying out in multi-column (2 or 3 depending on screen size, multi-column is only supported for certain block types, not for text). Regular and large are full width cards.

Allowed Values:"small" | "square" | "regular" | "large"
contentarray<unknown>

Content of the page block. Array of blocks. Follows the same block schema.

typeType
Allowed Values:"collectionItem"
idBlock ID
titleTitle

The title of the block.

propertiesProperties

The properties of the block.

Empty Object

markdownMarkdown

The title of the collection item

metadata?Block Metadata
contentarray<unknown>

Content of the collection item block's page. Array of blocks. Follows the same block schema.

typeType
Allowed Values:"image"
idBlock ID
urlstring
altText?string
size?string
Allowed Values:"fit" | "fill"
width?string
Allowed Values:"auto" | "fullWidth"
uploaded?boolean
fileSize?number
mimeType?string
aspectRatio?number
previewImageWidth?number
isPreviewImageUploaded?boolean
markdownMarkdown

The markdown content of the block.

indentationLevel?Indentation Level

The indentation level of the block.

Range0 <= value <= 5
listStyle?string
Allowed Values:"none" | "bullet" | "numbered" | "toggle" | "task"
decorations?Decorations
color?Color

7-character hex code (e.g., #RRGGBB). Case-insensitive. Auto-adjusted for readability, with dark variant auto-generated.

Match^#[0-9a-fA-F]{6}$
taskInfo?object

only interpreted, if listStyle is 'task'

metadata?Block Metadata
typeType
Allowed Values:"video"
idBlock ID
urlstring
altText?string
size?string
Allowed Values:"fit" | "fill"
width?string
Allowed Values:"auto" | "fullWidth"
uploaded?boolean
fileSize?number
mimeType?string
markdownMarkdown

The markdown content of the block.

indentationLevel?Indentation Level

The indentation level of the block.

Range0 <= value <= 5
listStyle?string
Allowed Values:"none" | "bullet" | "numbered" | "toggle" | "task"
decorations?Decorations
color?Color

7-character hex code (e.g., #RRGGBB). Case-insensitive. Auto-adjusted for readability, with dark variant auto-generated.

Match^#[0-9a-fA-F]{6}$
taskInfo?object

only interpreted, if listStyle is 'task'

metadata?Block Metadata
typeType
Allowed Values:"file"
idBlock ID
urlstring
fileName?File Name

The name of the file.

blockLayout?string
Allowed Values:"small" | "regular" | "card"
uploaded?boolean
mimeType?string
fileSize?number
markdownMarkdown

The markdown content of the block.

indentationLevel?Indentation Level

The indentation level of the block.

Range0 <= value <= 5
listStyle?string
Allowed Values:"none" | "bullet" | "numbered" | "toggle" | "task"
decorations?Decorations
color?Color

7-character hex code (e.g., #RRGGBB). Case-insensitive. Auto-adjusted for readability, with dark variant auto-generated.

Match^#[0-9a-fA-F]{6}$
taskInfo?object

only interpreted, if listStyle is 'task'

metadata?Block Metadata
typeType
Allowed Values:"drawing"
idBlock ID
urlstring
markdownMarkdown

The markdown content of the block.

indentationLevel?Indentation Level

The indentation level of the block.

Range0 <= value <= 5
listStyle?string
Allowed Values:"none" | "bullet" | "numbered" | "toggle" | "task"
decorations?Decorations
color?Color

7-character hex code (e.g., #RRGGBB). Case-insensitive. Auto-adjusted for readability, with dark variant auto-generated.

Match^#[0-9a-fA-F]{6}$
taskInfo?object

only interpreted, if listStyle is 'task'

metadata?Block Metadata
typeType
Allowed Values:"whiteboard"
idBlock ID
url?string
markdownMarkdown

The markdown content of the block.

indentationLevel?Indentation Level

The indentation level of the block.

Range0 <= value <= 5
listStyle?string
Allowed Values:"none" | "bullet" | "numbered" | "toggle" | "task"
decorations?Decorations
color?Color

7-character hex code (e.g., #RRGGBB). Case-insensitive. Auto-adjusted for readability, with dark variant auto-generated.

Match^#[0-9a-fA-F]{6}$
taskInfo?object

only interpreted, if listStyle is 'task'

metadata?Block Metadata
typeType
Allowed Values:"table"
idBlock ID
markdownMarkdown

The markdown content of the block.

indentationLevel?Indentation Level

The indentation level of the block.

Range0 <= value <= 5
listStyle?string
Allowed Values:"none" | "bullet" | "numbered" | "toggle" | "task"
decorations?Decorations
color?Color

7-character hex code (e.g., #RRGGBB). Case-insensitive. Auto-adjusted for readability, with dark variant auto-generated.

Match^#[0-9a-fA-F]{6}$
taskInfo?object

only interpreted, if listStyle is 'task'

metadata?Block Metadata
typeType
Allowed Values:"collection"
idBlock ID
markdownMarkdown

The markdown content of the block.

indentationLevel?Indentation Level

The indentation level of the block.

Range0 <= value <= 5
listStyle?string
Allowed Values:"none" | "bullet" | "numbered" | "toggle" | "task"
decorations?Decorations
color?Color

7-character hex code (e.g., #RRGGBB). Case-insensitive. Auto-adjusted for readability, with dark variant auto-generated.

Match^#[0-9a-fA-F]{6}$
taskInfo?object

only interpreted, if listStyle is 'task'

metadata?Block Metadata
typeType
Allowed Values:"code"
idBlock ID
rawCodeRaw Code

The raw code of the block.

language?string
Allowed Values:"ada" | "bash" | "cpp" | "cs" | "css" | "dart" | "dockerfile" | "matlab" | "go" | "groovy" | "haskell" | "html" | "java" | "javascript" | "json" | "julia" | "kotlin" | "lua" | "markdown" | "objectivec" | "perl" | "php" | "prolog" | "plaintext" | "python" | "r" | "ruby" | "rust" | "scala" | "shell" | "sql" | "swift" | "typescript" | "vbnet" | "xml" | "yaml" | "math_formula" | "other"
markdownMarkdown

The markdown content of the block.

indentationLevel?Indentation Level

The indentation level of the block.

Range0 <= value <= 5
listStyle?string
Allowed Values:"none" | "bullet" | "numbered" | "toggle" | "task"
decorations?Decorations
color?Color

7-character hex code (e.g., #RRGGBB). Case-insensitive. Auto-adjusted for readability, with dark variant auto-generated.

Match^#[0-9a-fA-F]{6}$
taskInfo?object

only interpreted, if listStyle is 'task'

metadata?Block Metadata
typeType
Allowed Values:"richUrl"
idBlock ID
urlstring
title?string
description?string
layout?string
Allowed Values:"small" | "regular" | "card"
markdownMarkdown

The markdown content of the block.

indentationLevel?Indentation Level

The indentation level of the block.

Range0 <= value <= 5
listStyle?string
Allowed Values:"none" | "bullet" | "numbered" | "toggle" | "task"
decorations?Decorations
color?Color

7-character hex code (e.g., #RRGGBB). Case-insensitive. Auto-adjusted for readability, with dark variant auto-generated.

Match^#[0-9a-fA-F]{6}$
taskInfo?object

only interpreted, if listStyle is 'task'

metadata?Block Metadata
typeType
Allowed Values:"line"
idBlock ID
lineStylestring

pageBreak lineStyle is just a strong visual separator within a page (chunks to page-looking groups visually). It does not affect the page block hierarchy.

Default"regular"
Allowed Values:"strong" | "regular" | "light" | "extraLight" | "pageBreak"
markdownMarkdown

The markdown content of the block.

indentationLevel?Indentation Level

The indentation level of the block.

Range0 <= value <= 5
listStyle?string
Allowed Values:"none" | "bullet" | "numbered" | "toggle" | "task"
decorations?Decorations
color?Color

7-character hex code (e.g., #RRGGBB). Case-insensitive. Auto-adjusted for readability, with dark variant auto-generated.

Match^#[0-9a-fA-F]{6}$
taskInfo?object

only interpreted, if listStyle is 'task'

metadata?Block Metadata
Try it out?

Create an API connection in the Imagine tab in Craft, and paste your API URL here

Document with nested structure

Insert Blocks

POST
/blocks

Summary

Insert content into a daily note. This single endpoint handles both structured blocks and markdown insertion via Content-Type header negotiation.

Content-Type: application/json - Insert structured block objects with position in request body Content-Type: text/markdown - Insert raw markdown text with position specified via query parameter (?position={"position":"end","date":"today"})

Using date-based position targets the most recently updated daily note for that date. To insert into another daily note from the same day, use pageId with the daily note's block ID instead. Multiple daily notes for the same date can occur due to sync conflicts or trash restore, but this is not a core use-case - try using one daily note per day whenever possible.

Returns the inserted blocks with their assigned block IDs for later reference.

Request Body

application/json
blocksNew Blocks

The blocks to insert, as JSON array

positionPosition

JSON object to insert the content at

positionPage Position

The position to insert the blocks at. 'start' inserts at the start of the page, 'end' inserts at the end of the page.

Allowed Values:"start" | "end"
pageIdPage ID

ID of the block to insert children into. Leave empty to target root page. Only page, text, and card type blocks can be parent blocks. Text blocks are auto-converted to page type when they receive children. Collection items are implicitly pages.

date?Date

The Daily Note date to target. Accepts ISO format YYYY-MM-DD or relative dates: 'today', 'tomorrow', 'yesterday'. Defaults to 'today' if not provided.

Default"today"
positionPage Position

The position to insert the blocks at. 'start' inserts at the start of the page, 'end' inserts at the end of the page.

Allowed Values:"start" | "end"
positionSibling Position

The position to insert the blocks at. 'before' inserts before the referenced block, 'after' inserts after the referenced block.

Allowed Values:"before" | "after"
siblingIdSibling ID

ID of the block to insert blocks next to.

markdownMarkdown

The markdown content to insert, which will be converted to a flat list of blocks at insert position. Separate each paragraph and heading with two newlines. Separate each list item with one newline. The first item in any list cannot be empty. Craft-specific tokens are HTML tags.:

  • <callout></callout> for callouts. Can be used to wrap multiple paragraphs/images/etc.
  • <caption></caption> for caption text style. Can be used to wrap a paragraph.
  • <highlight color=''></highlight> for highlights - color is optional. Can only be used inline.
  • <page><pageTitle>Title</pageTitle><content>Content</content></page> for nested page/card structures - where title supports inline formatting, pages can be nested, and content accepts same markdown as top level markdown. Supports <page textStyle='card' cardLayout='small|square|...'> for card styled page blocks.

Special link formats:

  • [text](block://blockId) for block links - links to specific blocks by their ID
  • [text](date://YYYY-MM-DD) for date links - links to daily notes by date
positionPosition

JSON object to insert the content at

positionPage Position

The position to insert the blocks at. 'start' inserts at the start of the page, 'end' inserts at the end of the page.

Allowed Values:"start" | "end"
pageIdPage ID

ID of the block to insert children into. Leave empty to target root page. Only page, text, and card type blocks can be parent blocks. Text blocks are auto-converted to page type when they receive children. Collection items are implicitly pages.

date?Date

The Daily Note date to target. Accepts ISO format YYYY-MM-DD or relative dates: 'today', 'tomorrow', 'yesterday'. Defaults to 'today' if not provided.

Default"today"
positionPage Position

The position to insert the blocks at. 'start' inserts at the start of the page, 'end' inserts at the end of the page.

Allowed Values:"start" | "end"
positionSibling Position

The position to insert the blocks at. 'before' inserts before the referenced block, 'after' inserts after the referenced block.

Allowed Values:"before" | "after"
siblingIdSibling ID

ID of the block to insert blocks next to.

Response Body

200

Successfully created resource

itemsBlocks

Array of blocks

Try it out?

Create an API connection in the Imagine tab in Craft, and paste your API URL here

Successfully inserted blocks with auto-assigned IDs

Delete Blocks

DELETE
/blocks

Summary

Delete content from daily notes. Removes specified blocks by their IDs.

Request Body

application/json
blockIdsBlock IDs

The IDs of the blocks to delete

Response Body

200

Successfully deleted resource

itemsDeleted Block IDs

Array of deleted block IDs

Try it out?

Create an API connection in the Imagine tab in Craft, and paste your API URL here

Successfully deleted multiple blocks

Update Blocks

PUT
/blocks

Summary

Update content in daily notes. For text blocks, provide updated markdown content. Only the fields that are provided will be updated.

Request Body

application/json
blocksBlocks to Update

The blocks to update, as JSON array. Only the fields that are provided will be updated.

Response Body

200

Successfully updated resource

itemsBlocks

Array of blocks

Try it out?

Create an API connection in the Imagine tab in Craft, and paste your API URL here

Successfully updated text blocks

Move Blocks

PUT
/blocks/move

Summary

Move blocks to reorder them or move them to a different daily note. Returns the moved block IDs.

Request Body

application/json
blockIdsBlock IDs

The IDs of the blocks to move

positionPosition

JSON object to move the content to

positionPage Position

The position to insert the blocks at. 'start' inserts at the start of the page, 'end' inserts at the end of the page.

Allowed Values:"start" | "end"
pageIdPage ID

ID of the block to insert children into. Leave empty to target root page. Only page, text, and card type blocks can be parent blocks. Text blocks are auto-converted to page type when they receive children. Collection items are implicitly pages.

date?Date

The Daily Note date to target. Accepts ISO format YYYY-MM-DD or relative dates: 'today', 'tomorrow', 'yesterday'. Defaults to 'today' if not provided.

Default"today"
positionPage Position

The position to insert the blocks at. 'start' inserts at the start of the page, 'end' inserts at the end of the page.

Allowed Values:"start" | "end"
positionSibling Position

The position to insert the blocks at. 'before' inserts before the referenced block, 'after' inserts after the referenced block.

Allowed Values:"before" | "after"
siblingIdSibling ID

ID of the block to insert blocks next to.

Response Body

200

Successfully moved resource

itemsMoved Block IDs

Array of moved block IDs

Try it out?

Create an API connection in the Imagine tab in Craft, and paste your API URL here

Successfully moved blocks to daily note

Search in Document

GET
/blocks/search

Summary

Search content within a specific daily note. Supports regex patterns for flexible searching. Use the 'date' query parameter to specify which daily note to search (defaults to 'today').

Query Parameters

dateDate

The Daily Note date to search within. Accepts ISO format YYYY-MM-DD or relative dates: 'today', 'tomorrow', 'yesterday'.

patternPattern

The search patterns to look for. Patterns must follow RE2-compatible syntax, which supports most common regular-expression features (literal text, character classes, grouping alternation, quantifiers, lookaheads, and fixed-width lookbehinds.

caseSensitive?Case Sensitive

Whether the search should be case sensitive. Default is false.

beforeBlockCount?Before Block Count

The number of blocks to include before the matched block.

afterBlockCount?After Block Count

The number of blocks to include after the matched block.

Response Body

200

Successfully retrieved data

itemsSearch Matches

Array of search matches with structured context

Try it out?

Create an API connection in the Imagine tab in Craft, and paste your API URL here

Search across Daily Notes

GET
/daily-notes/search

Summary

Search content across multiple daily notes using relevance-based ranking. This endpoint uses FlexiSpaceSearch to find matches across your daily notes within an optional date range.

Key Features:

  • Search across multiple daily notes (vs /blocks/search which searches a single daily note)
  • Include term filtering
  • Optional date range filtering (startDate/endDate)
  • Relevance-based ranking (top 20 results)
  • Context blocks before/after each match
  • Supports relative dates: 'today', 'tomorrow', 'yesterday'

Example Use Cases:

  • Find all mentions of a project across the last month
  • Search for meeting notes from a specific time period
  • Locate tasks or action items across multiple days

Query Parameters

include?Include

Search terms to include in the search. Can be a single string or array of strings.

regexps?Regular Expressions

Search terms to include in the search. Patterns must follow RE2-compatible syntax, which supports most common regular-expression features (literal text, character classes, grouping alternation, quantifiers, lookaheads, and fixed-width lookbehinds.

startDate?Start Date

The start date for filtering daily notes. Accepts ISO format YYYY-MM-DD or relative dates: 'today', 'tomorrow', 'yesterday'. Only daily notes on or after this date will be included in the search.

endDate?End Date

The end date for filtering daily notes. Accepts ISO format YYYY-MM-DD or relative dates: 'today', 'tomorrow', 'yesterday'. Only daily notes on or before this date will be included in the search.

fetchMetadata?Fetch Metadata

Whether to include document metadata (lastModifiedAt, createdAt) in each search result. Default is false.

Response Body

200

Successfully retrieved data

itemsSearch Matches

Array of individual search matches across daily notes, ordered by document relevance

Try it out?

Create an API connection in the Imagine tab in Craft, and paste your API URL here

List Collections

GET
/collections

Summary

List all collections across daily notes. Use optional startDate and endDate query parameters to filter collections by daily note date range.

Query Parameters

startDate?Start Date

The start date for filtering daily notes. Accepts ISO format YYYY-MM-DD or relative dates: 'today', 'tomorrow', 'yesterday'. Only collections in daily notes on or after this date will be included.

endDate?End Date

The end date for filtering daily notes. Accepts ISO format YYYY-MM-DD or relative dates: 'today', 'tomorrow', 'yesterday'. Only collections in daily notes on or before this date will be included.

Response Body

200

Success

itemsCollections

Array of collections in the specified date range

Try it out?

Create an API connection in the Imagine tab in Craft, and paste your API URL here

Collections list with daily note dates

Get Collection Schema

GET
/collections/{collectionId}/schema

Summary

Get collection schema in JSON Schema format

Path Parameters

collectionIdstring

Query Parameters

format?Format

The format to return the schema in. Default: json-schema-items. - 'schema': Returns the collection schema structure that can be edited - 'json-schema-items': Returns JSON Schema for addCollectionItems/updateCollectionItems validation

Default"json-schema-items"
Allowed Values:"schema" | "json-schema-items"

Response Body

200

Successfully retrieved data

response?unknown
Try it out?

Create an API connection in the Imagine tab in Craft, and paste your API URL here

Get Collection Items

GET
/collections/{collectionId}/items

Summary

Get all items from a collection

Path Parameters

collectionIdstring

Query Parameters

maxDepth?Max Depth

The maximum depth of nested content to fetch for each collection item. Default is -1 (all descendants). With a depth of 0, only the item properties are fetched without nested content.

Default-1

Response Body

200

Successfully retrieved data

itemsCollection Items

Array of items in the collection.

Try it out?

Create an API connection in the Imagine tab in Craft, and paste your API URL here

Collection items with properties and content

Add Collection Items

POST
/collections/{collectionId}/items

Summary

Add new items to a collection. Two-way relations are synced automatically in the background - only set one side for consistency.

Path Parameters

collectionIdstring

Request Body

application/json
itemsItems to Add

Items to add to the collection. Each item should match the collection's schema (properties will be validated at runtime).

allowNewSelectOptions?Allow New Select Options

Allow adding new options to select properties. When true, new values will be automatically added to the collection schema. Never add new option values without explicit user intent.

Response Body

200

Successfully created resource

itemsSuccessfully Added Items

Array of successfully added items

Try it out?

Create an API connection in the Imagine tab in Craft, and paste your API URL here

Successfully added collection items

Delete Collection Items

DELETE
/collections/{collectionId}/items

Summary

Delete collection items (also deletes content inside items)

Path Parameters

collectionIdstring

Request Body

application/json
idsToDeleteIDs to Delete

IDs of the items to delete from the collection.

Response Body

200

Successfully deleted resource

itemsDeleted Item IDs

Array of successfully deleted item IDs

Try it out?

Create an API connection in the Imagine tab in Craft, and paste your API URL here

Successfully deleted collection items

Update Collection Items

PUT
/collections/{collectionId}/items

Summary

Update collection items. Two-way relations are synced automatically in the background - only set one side for consistency.

Path Parameters

collectionIdstring

Request Body

application/json
itemsToUpdateItems to Update

Items to update in the collection. Each item should have an id and optionally properties matching the collection's schema (properties will be validated at runtime).

allowNewSelectOptions?Allow New Select Options

Allow adding new options to select properties. When true, new values will be automatically added to the collection schema. Never add new option values without explicit user intent.

Response Body

200

Successfully updated resource

itemsSuccessfully Updated Items

Array of successfully updated items

Try it out?

Create an API connection in the Imagine tab in Craft, and paste your API URL here

Successfully updated collection items

Get Tasks

GET
/tasks

Summary

Retrieve tasks. Tasks are automatically organized into inbox, active, upcoming, and logbook categories.

Query Parameters

scopeScope

Filter tasks by scope: - 'active': Active tasks from inbox and other documents (tasks due before now that are not completed/cancelled) - 'upcoming': Upcoming tasks from inbox and other documents (tasks scheduled after now) - 'inbox': Only tasks in the task inbox - 'logbook': Only tasks in the task logbook (completed and cancelled tasks)

Allowed Values:"active" | "upcoming" | "inbox" | "logbook"

Response Body

200

Successfully retrieved data

itemsTasks

Array of tasks matching the query scope

Try it out?

Create an API connection in the Imagine tab in Craft, and paste your API URL here

Active tasks with schedule dates

Add Tasks

POST
/tasks

Summary

Create new tasks in inbox or daily notes. Tasks can include schedule dates and deadlines.

Request Body

application/json
tasksTasks to Add

Tasks to create. Each task will be added to the top of the target location.

Response Body

200

Successfully created resource

itemsSuccessfully Added Tasks

Tasks that were successfully added

Try it out?

Create an API connection in the Imagine tab in Craft, and paste your API URL here

Tasks successfully added

Delete Tasks

DELETE
/tasks

Summary

Delete tasks by their IDs. Only tasks in inbox, logbook, or daily notes can be deleted.

Request Body

application/json
idsToDeleteIDs to Delete

IDs of the tasks to delete. Only tasks in inbox, logbook, or daily notes can be deleted. Tasks in regular documents cannot be deleted via this tool.

Response Body

200

Successfully deleted resource

itemsSuccessfully Deleted Task IDs

IDs of tasks that were successfully deleted

Try it out?

Create an API connection in the Imagine tab in Craft, and paste your API URL here

Tasks successfully deleted

Update Tasks

PUT
/tasks

Summary

Update existing tasks. Can modify task content, state, schedule dates, and deadlines. Marking tasks as done/canceled moves them to logbook.

Request Body

application/json
tasksToUpdateTasks to Update

Tasks to update. Each task must have an id and optionally fields to update.

Response Body

200

Successfully updated resource

itemsSuccessfully Updated Tasks

Tasks that were successfully updated

Try it out?

Create an API connection in the Imagine tab in Craft, and paste your API URL here

Tasks successfully updated

Upload File

POST
/upload

Summary

Upload a file (image, video, or document) and insert it at the specified position. Send raw binary data in request body with Content-Type header. This is an experimental API, expect breaking changes.

Query Parameters

position?Position

Where to insert: 'start' or 'end' for page positions, 'before' or 'after' for sibling positions. Defaults to 'end'.

Allowed Values:"start" | "end" | "before" | "after"
date?Date

Daily note date. Accepts 'today', 'yesterday', 'tomorrow', or ISO date (YYYY-MM-DD). Defaults to 'today'. Use with position 'start' or 'end'.

siblingId?Sibling ID

Block ID to insert relative to. Required when position is 'before' or 'after'.

Request Body

application/octet-stream
bodyfile
Formatbinary

Response Body

200

Success

blockIdstring

The ID of the created block

assetUrlstring

The URL to access the uploaded asset

Try it out?

Create an API connection in the Imagine tab in Craft, and paste your API URL here

Add comments

POST
/comments

Summary

Add comments to blocks. This is an experimental endpoint, expect breaking changes.

Request Body

application/json
commentsarray<object>

List of comments to add.

Response Body

200

Successfully created resource

commentIdstring

The ID of the created comment

Try it out?

Create an API connection in the Imagine tab in Craft, and paste your API URL here

Comments successfully created

Get Connection Info

GET
/connection

Summary

Returns connection metadata including space ID, timezone, current time, and URL templates for constructing deep links to blocks. This is an experimental API, expect breaking changes.

Response Body

200

Successfully retrieved data

spaceobject
utcobject
urlTemplatesobject
Try it out?

Create an API connection in the Imagine tab in Craft, and paste your API URL here