Skip to main content
POST
/
api
/
v1
/
school
/
sessions
Create and activate academic session
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"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

Auto-populate created_by from request.user when available.

name
string
required
Required string length: 1 - 255
start_date
string<date-time>
required
end_date
string<date-time>
required
is_deleted
boolean
is_active
boolean

Response

{key}
any