cURL
curl --request POST \ --url https://test-api.afrainity.com/api/v1/school/sessions/ \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "name": "<string>", "start_date": "2023-11-07T05:31:56Z", "end_date": "2023-11-07T05:31:56Z", "is_deleted": true, "is_active": true } '
{ "created": true, "data": { "id": 1, "name": "2024 Academic Year", "start_date": "2024-01-15", "end_date": "2024-12-15", "is_active": "True", "created_at": "2024-01-01T10:00:00Z", "updated_at": "2024-01-01T10:00:00Z" } }
Create a new academic session and automatically set it as the active session. This will deactivate all other sessions in the system.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
Auto-populate created_by from request.user when available.
1 - 255