name field, keeping the resource lightweight and easy to manage. Events reference a category via their category_id foreign key, and the category object is included as an eager-loaded relation whenever you fetch event data through the Events API. Use the five endpoints below to list, retrieve, create, update, and delete categories.
The category object
integer
Auto-incremented primary key uniquely identifying the category.
string
Human-readable display name for the category (e.g.
"Technology", "Music", "Sports").datetime
ISO 8601 datetime string set automatically when the record is first created.
datetime
ISO 8601 datetime string updated automatically whenever the record is modified.
GET /api/category
Returns an array of all category records in the database. No filtering, pagination, or sorting parameters are supported — the full collection is always returned.[] with status 200 when no categories exist.
GET /api/category/{id}
Returns a single category identified by its integerid.
Path parameter
integer
required
The unique identifier of the category to retrieve.
POST /api/category
Creates a new category. The only required field isname. Returns the created category object with HTTP 201 Created.
Request body
string
required
Display name for the new category. Maximum 255 characters. Must be a non-empty string.
PUT /api/category/{id}
Updates an existing category. Thename field is optional — if omitted, the existing value is preserved. The record is located by id before any update is applied.
Path parameter
integer
required
The unique identifier of the category to update.
string
New display name for the category. Maximum 255 characters. If provided, must be a non-empty string.
DELETE /api/category/{id}
Permanently deletes the category with the given ID. Path parameterinteger
required
The unique identifier of the category to delete.