Concepts

Structures

Object types in Capacities are represented as structures in the API. Every object has a structureId that identifies which type it belongs to.

Retrieve structures for the token's space via GET /space/structures (or capacities.space.structures() in the TypeScript SDK).

Structure metadata

Each entry in the structures array includes:

FieldDescription
idStructure id — use as structureId when creating objects
titleSingular display name (e.g. "Book")
pluralNamePlural display name (e.g. "Books")
propertyDefinitionsFields on objects of this type; label fields include labelSet (see Properties)
labelColorColor for this type in the UI
collectionsCollections of this structure

Not every basic structure supports every API operation. At the moment, the following structures are supported via the standard CRUD endpoints:

  • Page
  • Tags
  • Tasks
  • Custom object types

Content IDs

All content in Capacities is identified by UUIDs.

  • Space id — shown in Settings → Space settings, or via GET /user/spaces / GET /space.
  • Object id — use GET /object?id=… or copy an object reference from the app (⋯ menu → Copy object reference). The last segment of a reference URL is the object id:
    capacities://SPACE_ID/OBJECT_ID
    
  • Collection id — same as object ids: copy a collection reference from the app (⋯ menu → Copy object reference), or look it up under each structure's collections on GET /space/structures, or on objects in the collections array.
  • Property definition id — keys in properties and blocks on objects; listed on each structure's propertyDefinitions from GET /space/structures, or in the app under that property's definition settings.
  • Block id — present on blocks returned by GET /object; required for patch/delete/position operations.

Built-in structures

Built-in Capacities types use fixed structureId strings:

Object typestructureId
SpaceRootSpace
Object typeRootStructure
CollectionRootDatabase
QueryRootQuery
PageRootPage
ImageMediaImage
PDFMediaPDF
AudioMediaAudio
WeblinkMediaWebResource
FileMediaFile
TweetMediaTweet
AI ChatRootAIChat
TableRootSimpleTable
Daily noteRootDailyNote
TagRootTag
TaskRootTask

Custom object types you create in Capacities have their own structureId (a UUID). Look them up via GET /space/structures.

Are you missing something in the documentation?

Create a ticket on our feedback board. - Let us know if you have an idea for a feature, improvement or think there is something missing.

Request additions to the documentation. - If your questions are not getting answered, let us know and we will extend the documentation.