CI HUBCI HUB SDK

CI HUB Integration SDK

Write an adapter that translates your platform's API into CI HUB's handler format using defineIntegration. CI HUB calls your handlers; you return data in the expected shape.

Your Platform API  ←→  Your Adapter  ←→  CI HUB

Quick start

Scaffold a new project:

npm create @ci-hub/integration my-integration
pnpm create @ci-hub/integration my-integration
yarn create @ci-hub/integration my-integration
bun create @ci-hub/integration my-integration
cd my-integration
npm run dev

Minimum handlers

Five handlers are required for a working adapter:

HandlerPurpose
loginComplete login flow — render login screen, exchange credentials or OAuth code for tokens
checkTokenValidate the stored token. Return an error to force re-login
refreshTokenCalled when checkToken fails. Refresh the access token, or return an error to force re-login
logoutEnd the session. If your platform has no logout endpoint, return sendStatus(200) — CI HUB deletes stored tokens automatically
infoReturn basic metadata about the authenticated user and the remote system

Add search for read-only asset browsing. Add createAsset / updateAsset for write support. Every other handler is optional.

Handler categories

CategoryHandlers
Authlogin, logout, checkToken, refreshToken
Assetssearch, getFolder, createAsset, updateAsset, deleteAsset, download
FolderscreateFolder, renameFolder, deleteFolder, moveFolder
Asset actionslockAsset, renameAsset, moveAsset, getAssetVersions
TaskssearchTasks, getTask, getTaskAssets, addTaskComment, addTaskAsset, deleteTaskAsset, updateCustomTaskState
BrandgetBrandConfig, getBrandAssets
AdvanceddoTransformation, additionalRendition, saveAssetRelations

Next steps

On this page