Skip to content

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.

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.

On a booked sandbox request, each of these finishes after about 5 seconds:

Terminal window
# 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:

Terminal window
# Stop it. Result: request.stopped.
curl -X POST https://api-staging.sunnyhealthai.com/v1/scheduling/requests/$ID/stop \
-H "Authorization: Bearer $SUNNY_KEY"
  • It does not read visit.reason or provider_preference: the offices are fixed and fictional.
  • It checks lab results files and then discards them. document_delivery stays none.
  • 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.