xPlant Pro
Recipes
FAQ
LoginSign Up
LoginSign Up
  • Recipes
  • FAQ
All guides

Getting started

  • What xPlant is for
  • Organizing Your First Tissue Culture

Tissue culture concepts

  • Plants, explants, and stages
  • Media recipes and additives
  • Contamination tracking basics
  • Intro to Plant Tissue Culture
  • Tissue Culture Basics

Lab workflows

  • Record a transfer
  • Batch Tracker
  • Create and use SOPs
  • Comments and team context
  • Lab rooms
  • Managing tasks

Protocols

  • Protocols and SOPs — what's the difference?
  • Sterilization and aseptic technique
  • Media preparation protocol

Lab tools

  • QR labels and scanner

Developer tools

  • Developer API & JavaScript SDK

Account and support

  • Privacy and data controls
  • AI features and smart suggestions

Developer tools

Developer API & JavaScript SDK

Connect external tools, scripts, and lab systems to xPlant through its versioned API. Use the official JavaScript/TypeScript SDK to work with supported Plant, Explant, task, contamination, comment, Media Recipe, Transfer, SOP run, label, device, and sensor workflows.

Packages and repositories

@shmaplex/xplant-sdk on npm

Published package with versioned releases and changelog.

shmaplex/xplant-sdk on GitHub

Source code, open issues, contribution guide, and release notes.

shmaplex/xplant on GitHub

Explore the open-source xPlant application, report issues, and follow development.

What you can do with the API

Connect devices and sensor data

Register supported devices and submit environmental sensor readings so external hardware can contribute data to your xPlant workspace.

Work with lab records

Read supported plant, explant, task, contamination, and related workflow data from external tools. Supported resources also expose write operations for automations and integrations.

Build lab integrations

Connect xPlant with scripts, dashboards, data pipelines, and other lab systems using the versioned API or the JavaScript/TypeScript SDK.

Quickstart

  1. 1
    Install the SDK
    npm install @shmaplex/xplant-sdk
  2. 2
    Create an API key
    xPlant → Settings → Integrations → API Keys → New key
  3. 3
    Initialise the client
    import { XPlantClient } from "@shmaplex/xplant-sdk";
    
    const client = new XPlantClient({ apiKey: process.env.XPLANT_API_KEY! });
  4. 4
    Make your first request
    const plants = await client.plants.list();
    
    console.log(plants);

Authentication and scopes

All API requests require a bearer token issued from Settings → Integrations → API Keys. Each key has a set of scopes that controls what it can read or write. Create separate keys for separate integrations and grant only the permissions each integration needs.

ScopeWhat it allows
read:workspaceRead workspace and lab settings
read:plants / write:plantsRead, create, and update Plant records
read:explants / write:explantsRead, create, and update Explant records
read:contaminations / write:contaminationsRead contamination logs and submit contamination observations
read:tasks / write:tasksRead, create, update, complete, and reopen tasks
write:demandPush genus-level demand signals for task prioritization
read:comments / write:commentsRead and add comments on lab records
read:assets / write:assetsRead and attach photos or other media
read:media_recipes / write:media_recipesRead, create, and update Media Recipes
read:transfers / write:transfersRead Transfer and Stage history and record Transfers or Stage progression
read:sopsRead SOP templates and steps
read:sop_runs / write:sop_runsRead SOP run history and create or advance SOP run sessions
read:labels / write:label_scansResolve supported QR or barcode labels and submit scan events
read:devices / write:devicesList or register devices and send heartbeats
read:sensor_readings / write:sensor_readingsQuery and submit environmental sensor readings
write:device_eventsSubmit device heartbeat and status events
read:pricingRead culture-line prices, pricing tiers, and price history
read:commerceRead store order lines and sell-through summaries
read:eventsRead Plant and Explant change history

Keep API keys secure: Store keys in environment variables or another secure server-side location. Never expose them in client-side code or public repositories.

Available scopes may expand as the API evolves. Check the current SDK and API documentation when configuring an integration.

Related guides

Plants, explants, and stagesBatch TrackerQR labels and the in-app scannerCreate and use SOPs