Events API
Manage and discover community events through the Ilmfun API.
All Events endpoints return JSON and use standard HTTP methods.
Listing Events
Retrieve a list of all upcoming events for a specific school. If authenticated, the response includes whether the current user is interested.
GET /api/schools/{school_id}/events
Response
[
{
"id": 1,
"owner_id": 42,
"school_id": 2,
"room_id": 5,
"title": "Weekly Math Study Session",
"description": "Join us to review algebra and calculus.",
"image_key": "events/42_12345.png",
"image_url": "https://storage.ilmfun.com/events/...",
"scheduled_at": "2026-07-05T18:00:00Z",
"created_at": "2026-07-02T10:00:00Z",
"interested": true,
"interest_count": 12
}
]
Getting an Event
Retrieve details for a specific event.
GET /api/events/{id}
Toggling Interest
Set whether the currently authenticated user is interested/attending the specified event. This is required for push notifications to trigger for the user.
POST /api/events/{id}/interest
Authorization: Bearer <token>
Content-Type: application/json
{
"interested": true
}
Response
{
"success": true
}