Skip to content

Quickstart

This takes about five minutes and contacts nobody: a sandbox key only ever creates simulated requests.

Sign in to the dashboard, open API keys and create a key with the mode Sandbox. Copy it now: it is shown once.

Terminal window
export SUNNY_KEY="sk_…"
Terminal window
curl https://api-staging.sunnyhealthai.com/v1/scheduling/requests \
-H "Authorization: Bearer $SUNNY_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"patient": {
"first_name": "Alex", "last_name": "Sample", "date_of_birth": "1984-03-09", "sex": "female",
"phone": "+14155550123", "email": "alex.sample@example.com",
"address": { "line1": "1 Example St", "city": "San Francisco", "state": "CA", "zip": "94110" }
},
"insurance": { "payer_name": "Example Health Plan", "member_id": "XYZ123456789" },
"visit": { "reason": "Annual physical" },
"search_area": { "zip": "94110", "radius_miles": 15 },
"consent": { "obtained_at": "2026-11-19T17:00:00Z" },
"reference_id": "your-own-id-123"
}'

The answer comes at once:

{ "id": "req_…", "status": "received", "created_at": "…", "reference_id": "your-own-id-123", "sandbox": true }

The work continues in the background.

Terminal window
curl https://api-staging.sunnyhealthai.com/v1/scheduling/requests/req_… \
-H "Authorization: Bearer $SUNNY_KEY"

In the sandbox the status becomes planned after about 5 seconds and booked after about 30. The response then carries the confirmation:

{
"status": "booked",
"booked_via": "phone",
"confirmation": {
"time": "2026-12-02T09:40:00",
"timezone": "America/Los_Angeles",
"provider": { "first_name": "Sam", "last_name": "Example" },
"location_name": "Example Endocrine Associates",
"address": "100 Sample Ave, San Francisco, CA 94110",
"phone": "+14155550188",
"notes": "Arrive 15 minutes early. Bring insurance card."
}
}

Polling works for a first try. In your integration, add a webhook endpoint in the dashboard so that Sunny tells you when a request changes: request.planned, then request.booked.