Authentication
This API requires JWT token authentication. You'll need to include a bearer token in the Authorization header for all authenticated endpoints.
How to get your JWT token:
- Login to the dashboard at /login
- Use the "Copy JWT" button below to copy your token to clipboard
- Include the token in your API requests as a Bearer token in the Authorization header
✓ Copied to clipboard!
Include the following header in your requests:
Authorization: Bearer YOUR_JWT_TOKEN
Alternative: Generate a test token programmatically
python generate_test_token.py
Example request with curl:
curl -X GET "https://health-sync.replit.app/api/patients" \
-H "accept: application/json" \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
curl -X GET "https://health-sync.replit.app/api/patients" \
-H "accept: application/json" \
-H "Authorization: Bearer YOUR_TOKEN"
curl -X POST "https://health-sync.replit.app/api/patients" \
-H "accept: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"mrn": "MRN123",
"name": "John Smith",
"dob": "1980-01-01",
"gender": "male"
}'
curl -X POST "https://health-sync.replit.app/api/appointments" \
-H "accept: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "APT123",
"patient_id": "MRN123",
"start_time": "2023-05-01T10:00:00",
"status": "booked"
}'