PlaySpace

Security and compliance

Written for the engineer implementing the integration and for the person who has to answer a security questionnaire about it. Both audiences need the same facts.


The trust boundary

Your backend  ──client credentials──▶  PlaySpace Partner API
     │                                          │
     │ mints a sign-in code                     │
     ▼                                          ▼
Your page ──code, once──▶ PlaySpace frame ──▶ an ordinary PlaySpace session

Client credentials never enter a browser. They authorise everything your organisation can do through the API. The only credential a browser holds is a sign-in code: one practitioner, single use, 60 seconds, and usable only as the first address of a frame inside your listed origins.

The frame is a real boundary. Nothing in the PlaySpace frame can read your page, and nothing in your page can read what is inside the frame. That is a property of the browser's origin model rather than a convention either side is asked to respect.

Your sign-in decision is the boundary we cannot see. PlaySpace verifies that a sign-in code names a practitioner in your organisation who is able to sign in. It cannot verify that this browser belongs to that practitioner. The check in your sign-in code route is the whole of that decision, and it deserves more tests than anything else you write.


Data we hold, and data we do not

We hold the records you send: clinics, practitioners, the name and date of birth of each patient, your identifier for each record, and appointments. We hold what your clinicians make in PlaySpace: clinical notes, form answers, storybooks, worksheets, saved sandtray and dollhouse scenes, playrooms, and, when a clinician records a session, the audio transcript its note was drafted from.

We do not hold your schedule beyond the appointments you send, your billing, your claims, your own clinical notes or any part of your record we did not produce. There is no import, no mirror and no nightly file.

What we hold stays here. The Partner API returns your patients and appointments, including the ones your clinicians create in the frame, not the clinical content your clinicians made. There is no export endpoint. Webhooks and the events feed tell you that a record changed, carrying ids and a version only: never a name, a date of birth, a time, a note, a form answer or a join link.

Send the minimum. A first initial and a last initial are a complete and acceptable name. Date of birth is optional and is used for age-appropriate content; omit it and a clinician sets the age band by hand.

Partner video links are credentials. When you supply appointment video, PlaySpace stores the role-specific pair encrypted and releases only the authenticated participant's URL at join or explicit reload. Provider URLs are excluded from appointment responses, notifications, logs, analytics and audit rows. Disabling URL delivery cannot revoke credentials already received or end your provider's call.


Two rules the platform enforces on itself

No name and no free-text search term in a URL. Not a query string, not a path segment, in either direction.

This is not fastidiousness. A platform's own request logs record path and query for every request, at a layer beneath any application-level redaction. The only durable answer is to keep it out of the URL, which makes it a routing decision rather than a scrubbing one.

Identifiers, not values, in every observable channel. Error documents, frame messages, audit rows and log lines carry identifiers, statuses, counts and enumerated values. Never a name, a date of birth, a form answer, a note body, or a line of session transcript.

Please hold the same line. An X-Request-Id in a support ticket is useful; a client's name in one is a disclosure, and we will ask you to redact it and resend.


Authentication and authorisation

Client credentials are machine-to-machine credentials issued on approval and exchanged for an access token that lives 24 hours. The secret is delivered once, by a link that opens once and expires 72 hours after approval.

Scopes are fixed on the credential at approval. A call outside them returns 403. Minting sign-in codes needs its own scope, sessions:write.

Sign-in codes are minted server-side for one practitioner. A code is single use, expires 60 seconds after it is minted, carries your organisation's frame origins, and is accepted only as the first address of a frame. It reaches a browser exactly once, in the frame's address or one message addressed to the PlaySpace origin, and PlaySpace removes it from the frame's address straight away.

A framed clinician is authorised like a direct one. Every page and request in the frame passes the same role checks, row-level data rules and feature entitlements as a clinician who signs in to PlaySpace directly. There is no partner copy of a feature and no partner-only data path.

Sessions are bounded. 24 hours from sign-in and 1 hour idle, the same as a direct clinician's. Disabling or deleting a practitioner through the API ends their session the next time the dashboard checks who is signed in, and refuses new codes for them.

Controls your product owns are absent from the frame. Sign-out, password changes and team invitations are hidden, and PlaySpace refuses password changes and invitations on the server for a framed session, so a clinician cannot create a second way in that your product does not know about.


Isolation

Tenancy is enforced in the database, not in application code. Partner API requests run under a dedicated database role whose row-level policies key on the organisation claim in the token. A framed clinician's requests run under the same per-clinician policies as every PlaySpace clinician. A missing filter in application code cannot expose another organisation's data, because the policy is beneath it.

404 is deliberately ambiguous. Absent, deleted and belonging to another organisation all return the same response. Distinguishing them is exactly the signal an enumeration attack needs.

Deletion is soft. Deleting makes a record unreadable to normal reads; nothing on the Partner API performs a hard delete.


Audit and rate limiting

Every Partner API request writes one audit row: the operation, the organisation, the resource identifiers touched, the outcome, and a request identifier. Rows are hash-chained, so a row cannot be altered or removed without breaking the chain. Audit rows carry identifiers only, never a sign-in code and never a patient's details.

Rate limiting is per organisation across two windows, and the remaining allowance is on every response. Read the headers rather than discovering the limit through 429s.

Every write requires an Idempotency-Key, and a repeated key replays the original response rather than acting twice. Minting a sign-in code is the exception, because a replay would hand back a spent code.


The frame

The session is a partitioned cookie. PlaySpace sets its session cookies in the frame with SameSite=None; Secure; Partitioned, so they are keyed to your site and never shared with a PlaySpace tab the same person has open elsewhere, or with another partner's site. A browser that refuses the cookie gets the window fallback instead of a half-working frame.

frame-ancestors is set from your origins, on every PlaySpace page in the session, so the browser refuses to render PlaySpace anywhere you did not list. Allow the PlaySpace origin in your own Content Security Policy's frame-src and both directions are explicit.

Messages are verified in both directions. The frame accepts a code only from its parent window, only from an origin in the session's frame origins, and only with the nonce of a request it made. @playspace-health/embed acts on a message only when it comes from the PlaySpace origin and from its own iframe, and posts codes only to the PlaySpace origin.

Camera and microphone need a matching Permissions-Policy if your page or a proxy in front of it sends one. The package sets the iframe's allow attribute for live sessions, and a header your page sends wins over it.

Help and chat are not loaded in the frame. PlaySpace's Intercom chat and help centre are absent from a framed session.


Generation and third-party models

Clinicians in the frame can generate storybooks, worksheet artwork, playrooms and PlayStudio games, and the note-taker drafts notes from recorded session audio. Three things are true of each.

A business associate agreement is in place with every provider in the generation path, covering the specific data flow, including the model provider and the build sandbox a PlayStudio game is generated in.

Prompts carry what the clinician wrote. A clinician describing a child's situation to generate a storybook or a game is sending that description to a model provider. That is inherent in the capability, it is covered by agreement, and it is worth your clinicians understanding.

Nothing you or your clinicians send is used to train a model.

You can switch generation off for your clinicians with enabled_features, and recording with recording_enabled, which is on until you turn it off.


Webhooks

Webhook deliveries leave PlaySpace for a URL you register, so they are built to carry nothing sensitive and to be checked.

  • Events carry ids and a version only. No client name, date of birth, contact detail, time, note, form answer or join link travels in an event. You fetch the record through the authenticated API.
  • Every delivery is signed to the Standard Webhooks specification with a secret that is shown once, stored encrypted and bound to its endpoint, and that you can rotate with a 24-hour overlap. Verify the signature on the raw body before you trust it.
  • PlaySpace only calls public HTTPS addresses. It refuses a URL with credentials in it or one that resolves to a private, loopback or internal address, checks again before every delivery, connects only to the address it checked and never follows a redirect. Keep your endpoint URL free of secrets anyway: PlaySpace keeps it out of its logs and error reports, but it is yours to protect.
  • Events are kept for 30 days. The events feed returns them to your organisation only.

Data handling and portability

There is no partner-facing export. No export endpoint, no bundle format and no authorisation model for a disclosure. What exists instead:

  • A clinician can export their own PlaySpace data from inside the product. It is a clinician-facing feature, not an API, so a partner application cannot trigger or schedule it.
  • A records request is handled out of band. Ask partner engineering. There is no self-serve path.

Your record of a PlaySpace identifier is the join between the two systems. Store the identifier each create returns, or set external_id, so a record can always be found again.


Regional handling

Data residency follows the clinic's country. A clinic in Canada has its data held in Canada; a clinic in the United States, in the United States. Some features are regionally gated and fail closed where availability is not established, which is why country on a practitioner matters: omit it and those features do not appear.

Cross-region access does not happen implicitly. An organisation operating in two regions holds two sets of data.


What we ask of you

  • Store client credentials in a secret manager, not in a repository or an environment file that travels with one.
  • Never ship a partner secret to a browser. Search your built assets and confirm zero hits before going live.
  • Authorise the caller in your sign-in code route before minting, and derive the practitioner from your own record of who is signed in, never from a client-supplied parameter.
  • Rate-limit your sign-in code route, and send its response with Cache-Control: no-store.
  • Call signOut() on the frame when your user signs out, and disable a practitioner through the API when they leave.
  • Deliver patient links over a secure channel, never through email click tracking.
  • Verify every webhook signature on the raw body, store the endpoint secret like any credential, and acknowledge a delivery before you process it.
  • Keep client names and patient links out of your logs, your analytics and your support tickets. Send the X-Request-Id.

Questionnaire answers

Short answers to what gets asked most.

Is PlaySpace HIPAA compliant? There is no such thing as HIPAA certification — no accreditation body issues one. The procurement-relevant fact is that PlaySpace executes a business associate agreement covering the data flows described here, and does so with every subprocessor in the generation path.

Where is data held? In the clinic's region. Canada and the United States today.

Is data encrypted? In transit with modern transport security, and at rest.

Do you train models on our data? No.

Can a partner read another partner's data? No, and the enforcement is in the database rather than in application code, so it does not depend on a query being written correctly.

Can one clinician read another clinician's content? Only as PlaySpace's own rules allow for any clinician, enforced in the database. A framed clinician has exactly the access a direct clinician in the same role has.

What reaches the browser? A sign-in code that works once and lasts 60 seconds, then a partitioned session cookie scoped to your site. Never your client credentials or access token.

Is there an audit trail? Yes, one hash-chained row per Partner API request, identifiers only.

What happens when we leave? There is no export endpoint, and a records request is handled by partner engineering rather than by an API. If a bulk extraction path is part of your agreement, agree it explicitly rather than assuming this page describes one.

Do you have a penetration test report / audit report? Available under a mutual non-disclosure agreement from partner engineering.

How do we report a vulnerability? security@playspace.health. We acknowledge within one business day and will not pursue a good-faith reporter.