Developer docs
MyAfya API
Build on MyAfya Profile with our REST API. Book appointments, manage pharmacy orders, access health records, and power mobile experiences — all over HTTPS with JSON.
https://myafyaprofile.com/api/v1
Authentication
Most patient and account routes require a Laravel Sanctum token. Send it on every request:
Authorization: Bearer {token}
Accept: application/json
Obtain a token via POST /login or POST /register. Public catalog routes (doctors, medicines, health tips) work without auth.
Request & response
- JSON request bodies for
POST,PUT,PATCH - JSON responses with standard HTTP status codes
- Paginated lists use Laravel pagination (
data,meta,links) - Validation errors return
422with field messages
{
"email": "patient@example.com",
"password": "••••••••"
}
Mobile app
The MyAfya mobile app uses the same API. Point your client at the base URL above and use Bearer auth after login.
Environment example
Common patient & app endpoints
High-traffic routes used by the mobile app. Explore every operation in the interactive reference.
| Method | Path | Auth | Description |
|---|---|---|---|
| POST | /api/v1/login |
Public | Sign in and receive a Bearer token |
| POST | /api/v1/register |
Public | Create a patient account |
| GET | /api/v1/user |
Bearer | Current authenticated user profile |
| GET | /api/v1/doctors |
Public | Browse doctors (paginated) |
| GET | /api/v1/doctors/{id}/schedule |
Public | Weekly availability for a doctor |
| POST | /api/v1/appointments-search-availability |
Bearer | Find open slots on a given date |
| POST | /api/v1/appointments-register-appointment |
Bearer | Book a video or in-person visit |
| GET | /api/v1/medicines |
Public | Pharmacy catalog |
| GET | /api/v1/cart |
Bearer | View cart and totals |
| POST | /api/v1/patient/pharmacy/orders |
Bearer | Place a pharmacy order |
| GET | /api/v1/patient/records/summary |
Bearer | Health records overview |
| GET | /api/v1/patient/video-call/{appointmentId} |
Bearer | Video consultation session details |
| POST | /api/v1/ai/symptom-triage |
Bearer | AI symptom guidance (not a diagnosis) |
API surface area
Grouped by OpenAPI tags from the live specification. Admin, clinical, and pharmacy staff routes are included.
User
18User
Doctor
17Doctor
Patient
15Patient
Appointments
10Booking, availability search, and appointment management
Articles
9Articles
Notifications
8Notifications
Department
7Department
Operation Reports
7Operation Reports
Order
7Order
Bed Allotments
6Bed Allotments
Birth Reports
6Birth Reports
Blood Bank
6Blood Bank
Blood Donors
6Blood Donors
Death Reports
6Death Reports
Medicines
6Medicines
Nurse
6Nurse
Offer
6Offer
Pharmacist
6Pharmacist
Service
6Service
Testimonials
6Testimonials
Vaccines
6Vaccines
AI Assistant
5AI-powered triage, summaries, and clinical drafting (informational only — not a substitute for licensed care)
Appointments Reservasion
5Appointments Reservasion
Banners
5Banners
Cart
5Authenticated shopping cart for pharmacy checkout
FAQs
5FAQs
Health Tips
5Health Tips
Laboratorist
5Laboratorist
Mobile Pharmacy
5Medicine catalog, pharmacies, and featured listings
App Settings
4App Settings
Authentication
4Login, register, password reset, and session tokens
Mobile Doctors
4Public doctor directory and schedules for the mobile app
Patient Records
4Patient health records summary, visits, labs, and prescriptions
Patient Video
3Video consultation join, start, and end
Checkout
2Checkout
Admin
1Admin
Auth
1Auth
Offers
1Offers
Password
1Password
Try endpoints live
Use the Swagger UI explorer to send requests, inspect schemas, and authorize with your Bearer token — the same workflow as Stripe, Twilio, or any modern API platform.
Launch interactive reference