Installation
npm install @administrate.dev/sdk
Requires Node.js 18 or later. The package includes full TypeScript type definitions.
Authentication
Create an API key in Settings > Developers, then pass it when initializing the client:
import { Administrate } from "@administrate.dev/sdk"
const client = new Administrate({ apiKey: "sk_live_..." })
Quick start
// Get account info
const account = await client.account.get()
console.log(account.name, account.plan)
// List all clients
const clients = await client.clients.list()
for (const c of clients.data) {
console.log(c.name, c.code)
}
// Get failed executions
const executions = await client.executions.list({ errorsOnly: true })
for (const ex of executions.data) {
console.log(ex.workflowName, ex.errorCategory)
}
Common operations
Monitor failing workflows
const executions = await client.executions.list({
status: "failed",
startDate: "2026-01-01",
endDate: "2026-01-31",
})
for (const ex of executions.data) {
console.log(`${ex.workflowName}: ${ex.errorCategory}`)
}
Trigger a sync
await client.instances.sync("n8n_abc123", { syncType: "all" })
Check sync health
const health = await client.syncRuns.health()
for (const entry of health.data) {
console.log(`${entry.instanceName}: ${entry.syncStatus}`)
}
Pagination
List endpoints return paginated results. Pass page and perPage to control pagination:
const page1 = await client.executions.list({ page: 1, perPage: 50 })
console.log(page1.meta.total, page1.meta.totalPages)
Error handling
The SDK throws typed errors for API failures:
try {
await client.instances.get("n8n_nonexistent")
} catch (error) {
if (error.status === 404) {
console.log("Instance not found")
}
}