ConductorOne TypeScript SDK
The `conductorone-sdk-typescript` package provides a developer-friendly and type-safe TypeScript SDK for interacting with the ConductorOne API. Currently at version 1.1.1 (released October 2025), this SDK is regularly updated with a frequent release cadence, often driven by the Speakeasy CLI based on changes in the underlying ConductorOne API. Key differentiators include its strong TypeScript typing, ensuring compile-time safety and improved developer experience, and its full support for both CommonJS and ES Modules environments. It encapsulates the HTTP API for managing ConductorOne resources, offering structured access to various API operations such as managing app resource owners, entitlements, and automations, as evidenced by recent additions in `v1.1.1` and `v1.0.2`.
Common errors
-
Cannot find module 'conductorone-sdk-typescript' or its corresponding type declarations.
cause The package is not installed, or the import path is incorrect, or TypeScript cannot find declaration files.fixInstall the package: `npm install conductorone-sdk-typescript`. Verify the import statement: `import { ConductoroneSDKTypescript } from "conductorone-sdk-typescript";`. -
TypeError: Cannot read properties of undefined (reading 'createMonitor') at ConductoroneSDKTypescript.accessConflict
cause The SDK client instance (`conductoroneSDKTypescript`) was not properly initialized, or the `security` configuration was invalid, leading to a non-functional client object.fixEnsure the `ConductoroneSDKTypescript` class is correctly instantiated with all required `security` parameters, e.g., `new ConductoroneSDKTypescript({ security: { bearerAuth: 'YOUR_TOKEN' } })`. -
Error: Request failed with status code 401: Unauthorized
cause The provided authentication credentials (Bearer token or OAuth token) are either missing, expired, or invalid.fixVerify that the `bearerAuth` or `oauth` token supplied during SDK initialization is correct, active, and has the necessary permissions for the API call.
Warnings
- gotcha A peer dependency on `react` is declared, which might be unexpected for a backend API client. If you encounter issues in a React context or bundling errors, ensure `react` is installed in your project.
- breaking As an SDK generated by Speakeasy CLI, minor versions (e.g., from 1.0.x to 1.1.x) may introduce breaking changes to API models, request/response structures, or method signatures if the underlying ConductorOne API contract evolves. Always review changelogs.
- gotcha Handling of authentication (Bearer Token or OAuth2) requires providing credentials during SDK initialization. Failure to do so will result in unauthorized API calls (e.g., 401 status codes).
Install
-
npm install conductorone-sdk-typescript -
yarn add conductorone-sdk-typescript -
pnpm add conductorone-sdk-typescript
Imports
- ConductoroneSDKTypescript
const ConductoroneSDKTypescript = require("conductorone-sdk-typescript");import { ConductoroneSDKTypescript } from "conductorone-sdk-typescript"; - operations (namespace)
import * as operations from "conductorone-sdk-typescript/models/operations";
- shared (namespace)
import * as shared from "conductorone-sdk-typescript/models/shared";
Quickstart
import { ConductoroneSDKTypescript } from "conductorone-sdk-typescript";
const conductoroneSDKTypescript = new ConductoroneSDKTypescript({
security: {
bearerAuth: process.env.CONDUCTORONE_BEARER_TOKEN ?? "",
oauth: process.env.CONDUCTORONE_OAUTH_TOKEN ?? "",
},
});
async function run() {
try {
const result = await conductoroneSDKTypescript.accessConflict.createMonitor();
console.log(result);
} catch (error) {
console.error("Error making API call:", error);
}
}
run();