Partner Platform
Bring therapeutic play into your platform.
PlaySpace builds the interactive layer of child and family mental health care — a shared sandtray two people can move figures in from different cities, a dollhouse, a collaborative whiteboard, therapeutic games, and illustrated storybooks written for one child. The Partner Platform is how that layer reaches your product, on a ladder of four integration levels: the whole workspace framed in your page, that workspace with your own controls around it, one PlaySpace surface at a time, and the Partner API on its own.
The browser half of Level 1 — the whole PlaySpace workspace in your page — in full:
'use client'
import { ShellEmbed } from '@playspace-health/embed/react'
export function PlaySpaceWorkspace() {
return (
<div style={{ height: 820 }}>
<ShellEmbed
baseUrl="https://agentic-ps.playspace.health"
fetchToken={async () => {
const res = await fetch('/api/playspace/workspace-token', { method: 'POST' })
return ((await res.json()) as { token: string }).token
}}
/>
</div>
)
}The credential that can do everything stays on your server. fetchToken calls your own route, which exchanges it for a token scoped to one clinician, the capabilities that screen needs, and the origins you named — and re-mints into the running frame before it expires, so a long session never outlives its token.
Not a JavaScript stack? Nothing here requires one. The server half is a plain HTTPS call and the browser half is an iframe, so a page rendered by Python, PHP, Java, C# or Ruby mounts the same workspace. Using the API from other languages is that whole path.
Four integration levels
A ladder, not a menu. Each level is the one below it plus more of your own work, so pick the lowest that does the job and move up only for the thing it lacks.
Level 1 — the whole workspace
The real PlaySpace workspace inside your product, acting as one of your clinicians. One token route, one frame, nothing else.
Frame the workspace →Level 2 — plus host controls
The frame hands anything about one patient, or any live join credential, back to you. Answer the four requests from your own server.
Answer the requests →Level 3 — single surfaces
One PlaySpace thing at a time in your own layout: a storybook reader, a form, a worksheet editor, a two-seat sandtray or dollhouse.
Frame one surface →Level 4 — the Partner API
No frame. Create the records a session runs against, mint session links, read back what a clinician produced, generate a storybook overnight.
Call it directly →The surfaces, and how you reach them
Each framed surface has a reference page of its own: the identifier it needs, what every capability adds, the server and browser snippets, and every event it emits.
Sandtray
A shared three-dimensional tray and a figure library. A two-seat session you can frame, or open from a hosted session link.
Dollhouse
Rooms, furniture and family figures. A two-seat session you can frame, or open from a hosted session link.
Storybooks
Illustrated stories written for one child. Generated from your server, authored or read in a frame.
Worksheets
Multi-page worksheets a clinician uploads and annotates. Framed for reading or editing, and readable from your server.
Forms
Intake and assessment instruments a clinician authors. Built, listed and filled in a frame.
Playrooms and toolkits
The themed space a session runs in, and the named bundles of items inside it. Managed from your server.
Whiteboard
Collaborative drawing. Available inside a hosted session, not yet as a component.
Games
A catalogue of therapeutic games. Available inside a hosted session, not yet as a component.
How it fits together
- 1
You create the records
Clinics, practitioners, patients and appointments, through the Partner API, with an idempotency key on every write. PlaySpace assigns the identifiers and you keep them alongside your own.
- 2
You mint a credential for the moment
Session links for an appointment, or a short-lived embed token scoped to one clinician. Both are minted on your server from a credential that never reaches a browser.
- 3
You render, or you do not
Drop a component from @playspace-health/embed into your own page and hand it a token callback, or send the two links and let PlaySpace host the whole session.
Core concepts
The tenancy boundary, the two token shapes, and the retry contract
@playspace-health/embed
The one installable package: modes, capabilities and events
Endpoint summary
Every operation the Partner API serves, with the scope each needs
Security and compliance
What the platform enforces on itself, and what it asks of you