v1/Blocks

Create a new memory block

Changed on

Adds a new memory block to the system using the core creation tool.

post/api/v1/blocks

Request

  • The document declares no server URL.
  • Auth: none declared

Request body

typestring required

Type of memory block to create (must be registered in schema registry)

textstring required

Primary content of the memory block

namespace_idstring

Namespace ID for multi-tenant organization (defaults to 'legacy')

state'draft' | 'published' | 'archived' nullable

Initial state of the block

visibility'internal' | 'public' | 'restricted' nullable

Visibility level of the block

tagsstring[]

Optional tags for filtering and metadata

metadataobject

Type-specific metadata for the block

source_filestring nullable

Optional source file or markdown name

created_bystring nullable

Optional identifier for creator (agent name or user ID)

Response

Successful Response

idstring

Globally unique ID for this memory block

namespace_idstring

Foreign key to namespaces.id for multi-tenant organization

type'knowledge' | 'task' | 'project' | 'doc' | 'interaction' | 'log' | 'epic' | 'bug' required

Block type used to determine structure and relationships

schema_versioninteger nullable

Version of the schema this block adheres to (links to node_schemas table)

textstring required

Primary content or description of the block

state'draft' | 'published' | 'archived' nullable

Current state of the block

visibility'internal' | 'public' | 'restricted' nullable

Visibility level of the block

block_versioninteger nullable

Version number of this block

parent_idstring nullable

ID of the parent block in the hierarchy (foreign key to memory_blocks.id)

has_childrenboolean

Whether this block has child blocks (denormalized for fast lookups)

tagsstring[]

Optional tags for filtering, theming, or metadata

metadataobject

Custom metadata based on block type (reconstructed from block_properties)

source_filestring nullable

Optional source markdown or file name

source_uristring nullable

Optional source link or Logseq block URI

created_bystring nullable

Optional identifier for creator (agent name or user ID)

created_atstring date-time

ISO timestamp of block creation

updated_atstring date-time

ISO timestamp of last update

embeddingnumber[] nullable

Optional vector embedding of the block's content

Changes

    • info

      added the new optional request property

    • info

      added the optional property to the response with the status

    • warning

      removed the request property

    • warning

      removed the optional property from the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status