PlaySpace

The Partner API

Everything your backend does for the integration: create the records a clinician works with, choose your organisation's settings, mint sign-in codes for the frame, and hand each patient their join link. Every call is made from your server with your organisation's access token; nothing on this page runs in a browser.

The complete list of operations, with the scope each needs, is the endpoint summary, and the request and response schemas are in the interactive reference. This page is the narrative around them.


What the API covers

  • Health — GET /v1/partner/health needs no scope and confirms the token is accepted, echoing your organisation identifier.
  • Clinics — the partition everything else belongs to. Create, read, update, soft-delete.
  • Practitioners — your clinicians, each in one clinic. Create, read, update, soft-delete. Setting status to disabled suspends one without losing anything.
  • Patients — per organisation, named against a clinic and the practitioner who created them. Create, read, update, soft-delete. Clients your clinicians create in the frame are listed too.
  • Appointments — list, get, create, update. Cancel by updating status; there is no delete. Appointments your clinicians create in the frame are listed too.
  • Settings — GET and PATCH /v1/partner/settings: frame origins, feature areas, patient contact, recording and video. Described in full under Settings.
  • Sign-in codes — POST /v1/partner/practitioners/{id}/sign-in-codes mints the one-time code that signs a clinician in to the frame. Described in full under the server half.
  • Patient links — POST /v1/partner/appointments/{id}/session-links returns the link a patient joins a session with. Below.
  • Webhooks and events — /v1/partner/webhook-endpoints registers the URLs PlaySpace calls when records change, and GET /v1/partner/events returns the same events for 30 days. Described in full in webhooks and events.

Clinics, practitioners and patients take an optional external_id, your own identifier for the record, and their lists filter on it. The rules are in core concepts.

What the API does not cover is as deliberate: clinical notes, form answers, storybooks, worksheets, saved scenes and exports stay in PlaySpace, where clinicians use them inside the frame, and no event carries them: webhooks send ids and a version only. See what you can build.


Two rules that catch most first integrations

Every write carries an Idempotency-Key header, except minting a sign-in code, creating a webhook endpoint and rotating its secret. POST, PATCH and DELETE all require one: an opaque string of your choosing, unique to one logical operation, kept across that operation's retries. Omit it and the request is refused with 422 and problem type idempotency-key-mismatch. Repeat it with the same payload and the original response is replayed rather than the operation repeated; repeat it with a different payload and you get the same 422; repeat it while the original is still in flight and you get 409 with idempotency-conflict.

When you are holding that 422, what you sent tells you which case it is. With no key, nothing ran: add one and send again. With a key you had already used for a different payload, the first request under that key ran to completion, so send the original payload under the same key and read the replay before you decide anything. Never mint a fresh key for that case: a fresh key is a new operation, and on POST /v1/partner/patients it creates a second patient unless the record carries an external_id.

Find records by your own identifier, not by name. No list on this API searches by name, and no person's name travels in a URL. Set external_id when you create a clinic, practitioner or patient, and look it up with ?external_id= later.


The worked flow

Everything below assumes an access token from get your credentials, and a clinic and practitioner already created as in the quickstart.

Create a patient

A patient names both the clinic it belongs to and the practitioner who created it. These records carry protected health information: PlaySpace asks for the minimum that lets a clinician recognise the right person in a list, and you should send no more than that.

POST /v1/partner/patients HTTP/1.1
Host: agentic-ps-dev.playspace.health
Authorization: Bearer <access token>
Idempotency-Key: 9d7e0c15-8f3a-4d6b-a2c9-5e1b4f8a7d20
Content-Type: application/json

{
  "partner_clinic_id": "<clinic id>",
  "created_by_partner_practitioner_id": "<practitioner id>",
  "first_name": "A.",
  "last_name": "R.",
  "date_of_birth": "2018-04-11",
  "timezone": "America/Toronto",
  "external_id": "MRN-0042"
}

The patient appears on that practitioner's client list in the dashboard straight away. No PlaySpace account or login is created for a patient.

Patients are per organisation. The same child may exist independently under another organisation and the two records never meet. Email is deliberately not unique, because families share an inbox, and while your organisation's patient_contact_enabled is off PlaySpace sends nothing to it.

Book an appointment

An appointment links one practitioner and one patient who belong to the same clinic. session_type is virtual for a video session or in_person for a session in the same room.

POST /v1/partner/appointments HTTP/1.1
Host: agentic-ps-dev.playspace.health
Authorization: Bearer <access token>
Idempotency-Key: 2b5c8e31-7a04-4f9d-b1e6-3c7d9a0f5b84
Content-Type: application/json

{
  "partner_clinic_id": "<clinic id>",
  "partner_practitioner_id": "<practitioner id>",
  "partner_patient_id": "<patient id>",
  "start_at": "2026-11-02T15:00:00.000Z",
  "end_at": "2026-11-02T15:50:00.000Z",
  "session_type": "virtual",
  "timezone": "America/Toronto",
  "notify_patient": false
}

The appointment appears on the practitioner's calendar in the dashboard, where they start the session from. There is no delete: cancel by sending PATCH with "status": "cancelled".

Telling the patient is opt-in twice. notify_patient defaults to false on a create and on an update, and it decides only what that one request does. It has an effect only while your organisation's patient_contact_enabled is on; while it is off, which is the default, PlaySpace emails your patients nothing whatever the flag says. A body carrying notify_patient alone is a 422, because it is not a change on its own. Appointment reminders do not depend on the flag: Patient contact says when they go. With patient contact off, the message PlaySpace would have sent is recorded as a patient_message.due event, so you can send it yourself: a request with notify_patient false records nothing.

Notes belong to the clinician on an appointment they created in the frame. notes reads null there, and a notes you send on a PATCH to such an appointment is accepted and ignored, with no error. On appointments you booked through the API, notes work as described above.

Every patient and appointment read carries version and changed_at, and both lists take changed_since, so you can find what changed since your last read. Webhooks and events covers how to use them.

If your organisation supplies its own video, you send a video object with your provider's room for each participant when you book a virtual appointment: see use your own video.

A virtual appointment's response carries the patient's join link on patient_video_url, the same link the call below returns. There is no clinician link on an appointment.

The clinician joins from inside the frame. The patient joins from a link, which you request per appointment with appointments:read and deliver yourself. The call is a POST and takes an Idempotency-Key like every other write; repeating a key replays the first response.

POST /v1/partner/appointments/<appointment id>/session-links HTTP/1.1
Host: agentic-ps-dev.playspace.health
Authorization: Bearer <access token>
Idempotency-Key: 8c0b1e77-2d44-4a19-9f31-6a5c4d2e7b90
{
  "data": {
    "patient_url": "https://agentic-ps-dev.playspace.health/join/aB3dE6fG9hJ2kL5mN8pQ1r",
    "expires_at": "2026-11-03T14:30:00.000Z"
  }
}

patient_url is the patient's ordinary PlaySpace join link, the same one a clinician gets from "Copy client link" in the dashboard. It opens PlaySpace's session page on the PlaySpace origin. Every call returns the same link for the same appointment, and a reschedule keeps it.

expires_at is when the link stops opening the session. The session's join window opens 30 minutes before start_at and lasts 24 hours, so for the appointment booked above, starting at 15:00 UTC, the link stops working at 14:30 UTC the next day. A patient who opens it before the window sees a countdown until it opens. PlaySpace works the window out from the appointment's current start each time the link is opened, so after a reschedule call again to read the new expires_at.

Both fields are null, still with a 200, when PlaySpace creates no link: for an in-person appointment, or when the link could not be created. An appointment that is not yours, was deleted, or was cancelled answers 404, and the link stops working once the appointment is cancelled. The response is sent with Cache-Control: no-store.

The link is a credential. Anyone who opens it joins as the patient. Deliver it to the patient over your own secure channel, keep it out of your logs, and fetch it when you need it rather than storing it. Do not send it through an email provider's click tracking: a tracked link is a plain redirect that link scanners open in advance.


Suspending and removing a clinician

Set a practitioner's status to disabled with PATCH /v1/partner/practitioners/{id} to suspend them. Their open session in the frame ends the next time the dashboard checks who is signed in, and no sign-in code can be minted for them until you set status back to active. Nothing is deleted, so disabling is the right tool for a leave of absence or an investigation.

DELETE /v1/partner/practitioners/{id} is for off-boarding. It soft-deletes the practitioner, ends their session the same way, and answers 404 from then on.


Where to go next