5-Minute Quickstart
Send your first patient referral using the Rehabify Partner API.
Quickstart Guide
In this guide, you will send a patient referral to Rehabify via the REST API and observe how Joy automatically initiates the WhatsApp intake.
Step 1: Set Your Secret Key
Include your API secret key in the Authorization header of every HTTP request:
Code
export REHABIFY_SECRET_KEY="sk_test_rehab_demo_key_99182"Step 2: Create a Patient Referral
Send a POST request to /api/v1/partners/referrals:
Code
curl -X POST https://api.physioaroundme.com/api/v1/partners/referrals \
-H "Authorization: Bearer $REHABIFY_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"patient": {
"first_name": "Tunde",
"last_name": "Adeleke",
"phone": "+2348031234567",
"email": "tunde.adeleke@example.com",
"city": "Lagos",
"area": "Ikeja"
},
"clinical_notes": {
"diagnosis": "L4-L5 Lumbar Disc Herniation",
"recommended_sessions": 6,
"priority": "high",
"referring_doctor": "Dr. Sarah Johnson (General Hospital)"
},
"billing_mode": "hmo_direct_billing",
"callback_url": "https://api.yourdomain.com/webhooks/rehabify"
}'Code
import axios from 'axios';
const response = await axios.post(
'https://api.physioaroundme.com/api/v1/partners/referrals',
{
patient: {
first_name: 'Tunde',
last_name: 'Adeleke',
phone: '+2348031234567',
email: 'tunde.adeleke@example.com',
city: 'Lagos',
area: 'Ikeja',
},
clinical_notes: {
diagnosis: 'L4-L5 Lumbar Disc Herniation',
recommended_sessions: 6,
priority: 'high',
referring_doctor: 'Dr. Sarah Johnson',
},
billing_mode: 'hmo_direct_billing',
callback_url: 'https://api.yourdomain.com/webhooks/rehabify',
},
{
headers: {
Authorization: `Bearer ${process.env.REHABIFY_SECRET_KEY}`,
'Content-Type': 'application/json',
},
}
);
console.log('Referral Created:', response.data);Code
import requests
import os
url = "https://api.physioaroundme.com/api/v1/partners/referrals"
headers = {
"Authorization": f"Bearer {os.getenv('REHABIFY_SECRET_KEY')}",
"Content-Type": "application/json"
}
payload = {
"patient": {
"first_name": "Tunde",
"last_name": "Adeleke",
"phone": "+2348031234567",
"city": "Lagos",
"area": "Ikeja"
},
"clinical_notes": {
"diagnosis": "L4-L5 Lumbar Disc Herniation",
"recommended_sessions": 6,
"priority": "high"
},
"billing_mode": "patient_self_pay"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())Step 3: Inspect the Response
If successful, Rehabify responds with a 201 Created status code and a tracking reference:
Code
{
"status": "success",
"referral_id": "ref_982b18aa21",
"tracking_url": "https://physioaroundme.com/track/ref_982b18aa21",
"whatsapp_intake": {
"dispatched": true,
"recipient": "+2348031234567",
"intake_token": "tok_99182_a81",
"deep_link": "https://wa.me/2348061525811?text=REHAB_REF_PARTNER_tok_99182_a81"
},
"created_at": "2026-08-16T08:00:00.000Z"
}What Happens Next?
- WhatsApp Message: Joy sends a customized welcome message to
+2348031234567. - Intake Triage: Joy collects the patient's availability and confirms their preferred session modality (In-Clinic or Home Visit).
- Physiotherapist Match: The patient is matched with an MRTBN-certified physiotherapist within 15 minutes.
- Webhook Notification: When the intake is completed, Rehabify fires a
patient.intake_completedwebhook to yourcallback_url.