SISuperintelligenceDocs

Search docs

Search every page of the documentation.

API reference

Knowledge pages

Pages, databases, search, trash and favorites.

See Knowledge.

GET /v1/orgs/:orgId/pages

The page tree, or the trash with archived=1.

Auth: user access token or platform agent key · Scope: knowledge:read

Path parameterDescription
:orgIdOrganization id (org_…).
Query parameterTypeRequiredNotes
archived"0" | "1"No

Response 200

{
  pages: {
    pageId: string
    parentId: string
    kind: "database" | "doc"
    title: string
    icon?: string
    position: number
    archived: boolean
    archivedAt?: number
    contentVersion: number
    createdAt: number
    updatedAt: number
    createdBy: string
    updatedBy?: string
  }[]
  truncated: boolean
}

Errors

StatusMessage
404Page not found

POST /v1/orgs/:orgId/pages

Creates a page or database, at the top level or under a parent.

Auth: user access token or platform agent key · Scope: knowledge:write

Path parameterDescription
:orgIdOrganization id (org_…).

Request body

FieldTypeRequiredNotes
parentIdstring | "root"Nomatches ^[A-Za-z0-9_-]{1,64}$
titlestringNoup to 200 characters
iconstringNoup to 16 characters; trimmed
kind"doc" | "database"No
propertiesobjectNokeys match ^[A-Za-z0-9_-]{1,32}$; values: string (up to 4,000 characters), number, boolean, string[] (up to 50 items, each up to 32 characters) or null

Response 201

{
  page: {
    pageId: string
    parentId: string
    kind: "database" | "doc"
    title: string
    icon?: string
    position: number
    archived: boolean
    archivedAt?: number
    contentVersion: number
    createdAt: number
    updatedAt: number
    createdBy: string
    updatedBy?: string
    schema?: {
      id: string
      name: string
      type: "number" | "text" | "url" | "date" | "select" | "multi_select" | "checkbox"
      options?: {
        id: string
        name: string
        color?: "gray" | "brown" | "orange" | "yellow" | "green" | "blue" | "purple" | "pink" | "red"
      }[]
    }[]
    properties?: {
      [key: string]: boolean | string | number | string[]
    }
  }
}

Errors

StatusMessage
400Parent page not found.
400The parent page is in the trash.
400Unknown property.
404Page not found

Searches page titles and text.

Auth: user access token or platform agent key · Scope: knowledge:read

Path parameterDescription
:orgIdOrganization id (org_…).
Query parameterTypeRequiredDefaultNotes
qstringNo""up to 200 characters

Response 200

{
  results: {
    updatedAt: number
    kind: "database" | "doc"
    title: string
    pageId: string
    parentId: string
    icon?: string
    snippet?: string
  }[]
}

Errors

StatusMessage
404Page not found

GET /v1/orgs/:orgId/pages/:pageId

A page with its content. Databases include their rows; rows include their database's schema.

Auth: user access token or platform agent key · Scope: knowledge:read

Path parameterDescription
:orgIdOrganization id (org_…).
:pageIdPage id (doc_…).

Response 200

{
  page: {
    pageId: string
    parentId: string
    kind: "database" | "doc"
    title: string
    icon?: string
    position: number
    archived: boolean
    archivedAt?: number
    contentVersion: number
    createdAt: number
    updatedAt: number
    createdBy: string
    updatedBy?: string
    schema?: {
      id: string
      name: string
      type: "number" | "text" | "url" | "date" | "select" | "multi_select" | "checkbox"
      options?: {
        id: string
        name: string
        color?: "gray" | "brown" | "orange" | "yellow" | "green" | "blue" | "purple" | "pink" | "red"
      }[]
    }[]
    properties?: {
      [key: string]: boolean | string | number | string[]
    }
  }
  content: null | {
    version: number
    blocks: null | unknown[]
    markdown: string
  }
  rows?: {
    pageId: string
    parentId: string
    kind: "database" | "doc"
    title: string
    icon?: string
    position: number
    archived: boolean
    archivedAt?: number
    contentVersion: number
    createdAt: number
    updatedAt: number
    createdBy: string
    updatedBy?: string
    schema?: {
      id: string
      name: string
      type: "number" | "text" | "url" | "date" | "select" | "multi_select" | "checkbox"
      options?: {
        id: string
        name: string
        color?: "gray" | "brown" | "orange" | "yellow" | "green" | "blue" | "purple" | "pink" | "red"
      }[]
    }[]
    properties?: {
      [key: string]: boolean | string | number | string[]
    }
  }[]
  database?: {
    pageId: string
    title: string
    icon?: string
    schema: {
      id: string
      name: string
      type: "number" | "text" | "url" | "date" | "select" | "multi_select" | "checkbox"
      options?: {
        id: string
        name: string
        color?: "gray" | "brown" | "orange" | "yellow" | "green" | "blue" | "purple" | "pink" | "red"
      }[]
    }[]
  }
}

Errors

StatusMessage
404Page not found

PATCH /v1/orgs/:orgId/pages/:pageId

Renames, moves, trashes or restores a page, or edits a database's properties or a row's values.

Auth: user access token or platform agent key · Scope: knowledge:write

Path parameterDescription
:orgIdOrganization id (org_…).
:pageIdPage id (doc_…).

Request body

FieldTypeRequiredNotes
titlestringNoup to 200 characters
iconstringNoup to 16 characters; trimmed; can be null
parentIdstring | "root"Nomatches ^[A-Za-z0-9_-]{1,64}$
positionintegerNo≥ 0
archivedbooleanNo
schemaobject[]Noup to 50 items
schema[].idstringNomatches ^[A-Za-z0-9_-]{1,32}$
schema[].namestringYes1–100 characters; trimmed
schema[].type"text" | "number" | "select" | "multi_select" | "date" | "checkbox" | "url"Yes
schema[].optionsobject[]Noup to 100 items
schema[].options[].idstringNomatches ^[A-Za-z0-9_-]{1,32}$
schema[].options[].namestringYes1–100 characters; trimmed
schema[].options[].color"gray" | "brown" | "orange" | "yellow" | "green" | "blue" | "purple" | "pink" | "red"No
propertiesobjectNokeys match ^[A-Za-z0-9_-]{1,32}$; values: string (up to 4,000 characters), number, boolean, string[] (up to 50 items, each up to 32 characters) or null

Response 200

{
  page: {
    pageId: string
    parentId: string
    kind: "database" | "doc"
    title: string
    icon?: string
    position: number
    archived: boolean
    archivedAt?: number
    contentVersion: number
    createdAt: number
    updatedAt: number
    createdBy: string
    updatedBy?: string
    schema?: {
      id: string
      name: string
      type: "number" | "text" | "url" | "date" | "select" | "multi_select" | "checkbox"
      options?: {
        id: string
        name: string
        color?: "gray" | "brown" | "orange" | "yellow" | "green" | "blue" | "purple" | "pink" | "red"
      }[]
    }[]
    properties?: {
      [key: string]: boolean | string | number | string[]
    }
  }
}

Errors

StatusMessage
400A page can't be moved into itself.
400Target page not found.
400The target page is in the trash.
400A page can't be moved into one of its subpages.
400Pages are nested too deeply.
400Only databases have properties.
400Only database rows have property values.
400Unknown property.
404Page not found
409The page changed. Try again.

PUT /v1/orgs/:orgId/pages/:pageId/content

Saves page content. baseVersion is the version you started from; if the page has changed since, the save fails with 409.

Auth: user access token or platform agent key · Scope: knowledge:write

Path parameterDescription
:orgIdOrganization id (org_…).
:pageIdPage id (doc_…).

Request body (up to 1,065,536 bytes)

FieldTypeRequiredNotes
blocksany JSON[]Yescan be null
markdownstringYes
baseVersionintegerYes≥ 0

Response 200

{
  version: number
  updatedAt: number
}

Errors

StatusMessage
404Page not found
409This page is in the trash. Restore it to edit.
409This page changed since you opened it.
413Pages can be up to 1 MB.

DELETE /v1/orgs/:orgId/pages/:pageId

Moves a page to the trash.

Auth: user access token or platform agent key · Scope: knowledge:write

Path parameterDescription
:orgIdOrganization id (org_…).
:pageIdPage id (doc_…).

Response 200

{
  page: {
    pageId: string
    parentId: string
    kind: "database" | "doc"
    title: string
    icon?: string
    position: number
    archived: boolean
    archivedAt?: number
    contentVersion: number
    createdAt: number
    updatedAt: number
    createdBy: string
    updatedBy?: string
    schema?: {
      id: string
      name: string
      type: "number" | "text" | "url" | "date" | "select" | "multi_select" | "checkbox"
      options?: {
        id: string
        name: string
        color?: "gray" | "brown" | "orange" | "yellow" | "green" | "blue" | "purple" | "pink" | "red"
      }[]
    }[]
    properties?: {
      [key: string]: boolean | string | number | string[]
    }
  }
}

Errors

StatusMessage
400A page can't be moved into itself.
400Target page not found.
400The target page is in the trash.
400A page can't be moved into one of its subpages.
400Pages are nested too deeply.
400Only databases have properties.
400Only database rows have property values.
400Unknown property.
404Page not found
409The page changed. Try again.

GET /v1/orgs/:orgId/favorites

The caller's favorite pages, oldest first.

Auth: user access token or platform agent key · Scope: knowledge:read

Path parameterDescription
:orgIdOrganization id (org_…).

Response 200

{
  favorites: {
    pageId: string
    createdAt: number
  }[]
}

Errors

StatusMessage
404Page not found

PUT /v1/orgs/:orgId/favorites/:pageId

Adds a page to the caller's favorites. Adding it again keeps its place.

Auth: user access token or platform agent key · Scope: knowledge:read

Path parameterDescription
:orgIdOrganization id (org_…).
:pageIdPage id (doc_…).

Response 200

{
  favorite: {
    pageId: string
    createdAt: number
  }
}

Errors

StatusMessage
400This page is in the trash.
400You can have up to 200 favorites.
404Page not found

DELETE /v1/orgs/:orgId/favorites/:pageId

Removes a page from the caller's favorites.

Auth: user access token or platform agent key · Scope: knowledge:read

Path parameterDescription
:orgIdOrganization id (org_…).
:pageIdPage id (doc_…).

Response 200

{
  ok: true
}

Errors

StatusMessage
404Page not found