Sandbox
A sandbox key creates sandbox requests ("sandbox": true). They are fully simulated: no office is contacted, nothing is faxed, and the offices and clinicians are fictional. Real signed webhooks are sent to your sandbox endpoint.
Choose the outcome
Section titled “Choose the outcome”Add "simulate" to the body of POST /v1/scheduling/requests:
simulate |
What happens |
|---|---|
absent or "booked" |
request.planned after about 5 seconds, then request.booked after about 30 seconds. |
"unable_to_schedule" |
request.planned, then request.unable_to_schedule after about 20 seconds. |
"no_providers_found" |
request.unable_to_schedule with reason: "no_providers_found" after about 5 seconds, with no request.planned. |
simulate with a live key answers 403 sandbox_key_required.
Then try the actions
Section titled “Then try the actions”On a booked sandbox request, each of these finishes after about 5 seconds:
# Move the visit. Result: request.rescheduled, with the new confirmation.curl -X POST https://api-staging.sunnyhealthai.com/v1/scheduling/requests/$ID/reschedule \ -H "Authorization: Bearer $SUNNY_KEY" -H "Content-Type: application/json" \ -d '{ "earliest": "2026-12-08", "latest": "2026-12-20" }'
# Cancel it. Result: request.cancelled.curl -X POST https://api-staging.sunnyhealthai.com/v1/scheduling/requests/$ID/cancel \ -H "Authorization: Bearer $SUNNY_KEY"And on one that has not booked yet:
# Stop it. Result: request.stopped.curl -X POST https://api-staging.sunnyhealthai.com/v1/scheduling/requests/$ID/stop \ -H "Authorization: Bearer $SUNNY_KEY"What the sandbox does not do
Section titled “What the sandbox does not do”- It does not read
visit.reasonorprovider_preference: the offices are fixed and fictional. - It checks lab results files and then discards them.
document_deliverystaysnone. - It does not wait for office hours.
Validation is the same as for a live request, so the sandbox is the place to find every 422 before you go live.
Sandbox requests are deleted after 7 days.