Welcome to the Afrinity SMS API Reference. Our endpoints are organized around REST, use predictable URLs, accept JSON or URL-encoded request bodies, return JSON responses, and use standard HTTP response codes.
Authentication
All API endpoints (except for login or public webhooks) require an authentication token. We use JWT (JSON Web Tokens) for securing our API.
To authenticate, include the JWT token in your Authorization header:
Authorization: Bearer <your-access-token>
Multi-Tenancy / Routing
Because the SMS system is fundamentally multi-tenant, your API base URL implicitly determines which database schema you are targeting.
https://app.sms.local/api/... -> Targets the public schema (Clients, Domains, Superusers).
https://school_a.sms.local/api/... -> Targets the specific school tenant’s schema (school_a).
Always ensure you are issuing requests against the correct tenant domain. A valid token for school_a will only grant access to data belonging to school_a.
Using the Endpoints
Navigate through the sidebar to explore endpoints for:
- Core Engine: Students, Academic Classes, Exams
- Authentication: JWT pairs, Role Assignments
- Chatbot Integrations: Sending/receiving WhatsApp templates
This API reference is auto-generated using drf-spectacular traversing the Django REST Framework Views.