API Reference

The Solibo SDK is organized into sub-APIs, each corresponding to a functional area of the Solibo Home ecosystem.

Sub-APIs

The HomeApi instance provides access to various sub-APIs through the api field. Each sub-API corresponds to a tag in our OpenAPI specification.

For example:

  • api.board (Board management)
  • api.users (User profiles)
  • api.communication (Messaging and notifications)

All available sub-APIs can be discovered via your IDE’s auto-completion on the api object.

OpenAPI Specification

For the full list of endpoints and model definitions, you can refer to our OpenAPI specification: Swagger UI

Common Models

The SDK uses consistent data models across all platforms. These are located in no.solibo.oss.sdk.api.gen.models (Kotlin) or imported from @solibo/solibo-sdk (TypeScript).

Key models include:

  • AuthUser: Basic user information, either as PersonUser or ClientUser (service accounts).
  • Company: Information about a company, commonly housing companies in Solibo Home.
  • Person: Information about an individual.
  • Organization: Information about a legal entity (company, etc.).
  • Section: Building unit or section details.

Document Upload and Download Wrappers

The TypeScript packages expose higher-level wrappers for document flows so consumers do not need to manually manage the backend’s signed upload and download URLs.

React (@solibo/solibo-react)

  • useUploadDocument(): Upload a private company document.
  • useUploadDocumentBelongsTo(): Upload a document linked to another resource via belongsToId.
  • useMultiUploadDocument(): Upload multiple files and receive Promise.allSettled(...) results.
  • useCreateDocumentDirectory(): Create a document directory without uploading binary content.
  • useGetDocumentURL(): Fetch a private document download URL as React Query data.
  • usePublicGetDocumentURL(): Resolve a public company document URL or a public conversation document URL.

Framework-agnostic (@solibo/solibo-query)

  • uploadDocumentMutationOptions(...)
  • uploadDocumentBelongsToMutationOptions(...)
  • multiUploadDocumentMutationOptions(...)
  • createDocumentDirectoryMutationOptions(...)
  • getDocumentURLQueryOptions(...)
  • Low-level helpers: fileSlingshotRequest(...) and completeSlingshot(...)

Upload behavior

For file uploads, the wrappers hide the backend’s two-step “slingshot” flow:

  1. They prepare the required request headers from the File.
  2. They call the SDK’s createDocument(...) or createDocumentBelongsTo(...) endpoint.
  3. They read the signed upload and verification headers from the SDK response.
  4. They PUT the actual file bytes to storage.
  5. They HEAD the uploaded object to verify it, and clean up the document if verification fails.

You normally do not need to call the raw backend upload URL yourself. Use the wrappers unless you are implementing a custom upload flow.

For directory creation, use useCreateDocumentDirectory() or createDocumentDirectoryMutationOptions(...) instead of the file upload wrappers.

Download behavior

  • useGetDocumentURL() and getDocumentURLQueryOptions(...) use non-redirect mode and return a UrlWrapper body containing { url }.
  • usePublicGetDocumentURL() is imperative rather than React Query-based:
    • getDocumentURL(documentId) resolves a public company document URL.
    • getDocumentURL(conversationId, documentId) resolves a public conversation document URL.
  • These wrappers intentionally return the signed URL so the app can decide whether to open, preview, or download it.

Paged Lists

All collection endpoints return a PagedList<T> wrapper instead of a plain array. This applies to both the Kotlin SDK and the TypeScript layer.

Structure

PagedList<T>
  .items   — the current page of results (List<T> / T[])
  .meta    — metadata, including .count (total items on this page)
  .paging  — cursor pagination tokens:
               .next     — pass as pageToken to fetch the next page ("END_OF_LIST" means no more pages)
               .previous — token for the previous page

Kotlin

val response = mockApi.task.indexTasks(1L).body()
val tasks: List<Task> = response.items
val total: Long = response.meta.count ?: 0L
val nextToken: String? = response.paging.next

React / TypeScript (via hooks)

Paged list hooks use TanStack’s useInfiniteQuery. Each call appends a new page to data.pages:

import { useIssues } from '@solibo/solibo-query'

function IssueList({ companyId }: { companyId: number }) {
  const { data, fetchNextPage, hasNextPage } = useIssues({ companyId })

  const allIssues = data?.pages.flatMap(page => page.items) ?? []

  return (
    <>
      {allIssues.map(issue => <div key={issue.id.toString()}>{issue.title}</div>)}
      {hasNextPage && <button onClick={() => fetchNextPage()}>Load more</button>}
    </>
  )
}

When calling the SDK directly (outside a hook), access .items and convert to a JS array:

const body = (await sdk.api.task.indexTasks(toLong(companyId))).body()
const tasks = body.items.asJsReadonlyArrayView()

Field Projections

Most read endpoints accept an optional fields query parameter that limits which fields are returned in the response. This reduces payload size when only a subset of data is needed.

Kotlin

// Only include company and feed fields in the homepage response
val homepage = sdk.api.homepage.showHomepage(companyId, fields = "company,feed").body()

TypeScript (via hooks)

Pass fields through the hook’s params object:

const { data } = useHomepage({ companyId, fields: 'company,feed' })

Omitting fields returns the full object. Consult the Swagger UI for the available field names per endpoint.


Platform-Specific Details

Kotlin (Multiplatform)

Models are data classes with @Serializable annotations. All API calls are suspend functions.

Web (JS/TS)

Models are TypeScript interfaces. API calls return Promise objects. The @solibo/solibo-query package provides React Query hooks for most of these APIs.


Solibo AS