Skip to main content

Admin SDK

The official Admin SDK for Replane. Manage projects, configs, environments, SDK keys, and members programmatically.

While the runtime SDK reads config values in your application, the Admin SDK gives you full control over the Replane management API — ideal for CI/CD pipelines, infrastructure-as-code workflows, migration scripts, and custom tooling.

Installation

npm install @replanejs/admin

Quick start

import { ReplaneAdmin } from '@replanejs/admin'

const admin = new ReplaneAdmin({
baseUrl: 'https://app.replane.dev',
apiKey: process.env.REPLANE_ADMIN_API_KEY, // starts with rpa_
})

// List all projects
const { projects } = await admin.projects.list()

// Create a config
await admin.configs.create({
projectId: projects[0].id,
name: 'api-rate-limit',
description: 'Maximum API requests per minute',
editors: [],
base: { value: 100, schema: null, overrides: [] },
variants: [],
})

// Read it back
const config = await admin.configs.get({
projectId: projects[0].id,
configName: 'api-rate-limit',
})

Features

  • Full CRUD — Create, read, update, and delete projects, configs, SDK keys, and more
  • Type safety — Full TypeScript types for every request and response
  • Resource modules — Organized API: admin.projects, admin.configs, admin.sdkKeys, etc.
  • Error handling — Typed ReplaneAdminError with HTTP status and response body
  • Zero dependencies — Pure JavaScript, works everywhere fetch is available

API modules

ModuleOperations
admin.projectslist, get, create, update, delete
admin.configslist, get, create, update, delete
admin.environmentslist
admin.sdkKeyslist, create, delete
admin.memberslist
admin.workspaceslist, get, create, delete

Authentication

The Admin SDK authenticates with admin API keys, which are different from SDK keys:

  • Admin API keys (rpa_...) grant access to the management API — creating, updating, and deleting resources. Generate them in the Replane dashboard under Workspace Settings > API Keys.
  • SDK keys (rp_...) are used by the runtime SDKs to read config values in your application. They are scoped to a single project and environment.
caution

Admin API keys have broad access to your workspace. Keep them secret and never expose them in client-side code.

Next steps

  • API Reference — Full API documentation for every module and type
  • Guide — Use cases, error handling, and best practices
  • Core Concepts — Workspaces, projects, environments, configs