xPlant Pro
FAQ
LoginSign Up
LoginSign Up
  • FAQ
All guides

Getting started

  • What xPlant is for
  • First plant and explant workflow

Tissue culture concepts

  • Plants, explants, and stages
  • Media recipes and additives
  • Contamination tracking basics
  • Intro to tissue culture
  • Tissue culture basics

App workflows

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

Protocols

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

Lab tools

  • QR labels and the in-app scanner

Developer tools

  • Developer SDK & API

Account and support

  • Privacy and data controls
  • AI features and smart suggestions

Developer tools

Developer SDK & API

xPlant exposes a versioned external API so you can connect your own devices, scripts, and automations. The official SDK wraps the API with typed helpers for TypeScript and JavaScript.

Packages and repositories

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

The main xPlant application — open source. Report bugs, follow development, or self-host.

What you can do with the API

Connect sensor devices

Register environment sensors and submit temperature, humidity, pH, and CO₂ readings. Live data appears on plant detail pages for any room your sensor is linked to.

Read and write lab records

Query plants, explants, contamination logs, tasks, and media recipes. Submit new records, update stages, or trigger SOP run events from external scripts and automations.

Automate workflows

Build pipelines that respond to lab events — auto-create tasks when contamination is flagged, push transfer records from a bench tablet, or sync counts from a spreadsheet on a schedule.

Integrate with your stack

The SDK wraps the xPlant external API with typed responses and built-in retry logic. Use it from Node.js, Deno, edge workers, or any TypeScript/JavaScript environment.

Quickstart

1Install the SDK

npm install @shmaplex/xplant-sdk

2Generate an API key

xPlant → Settings → Integrations → API Keys → New key

3Initialise the client

import { XPlantClient } from "@shmaplex/xplant-sdk";

const client = new XPlantClient({ apiKey: process.env.XPLANT_API_KEY });

4Make your first call

const plants = await client.plants.list();
console.log(plants.data);

Authentication and scopes

All API requests require a bearer token issued from Settings → Integrations → API Keys. Each key carries a set of scopes that control what it can read or write. Create separate keys for separate integrations — for example, a read-only key for a dashboard and a write key for a sensor device.

ScopeWhat it allows
read:plants / write:plantsList and update plant records
read:explants / write:explantsList and update explant records
read:devices / write:devicesRegister devices and send heartbeats
read:sensor_readings / write:sensor_readingsSubmit and query environment sensor data
write:device_eventsSend device status and event logs
read:contaminations / write:contaminationsLog and query contamination observations
read:tasks / write:tasksQuery and create scheduled tasks

Related guides

Batch TrackerQR labels and the in-app scannerAI features and smart suggestionsCreate and use SOPs