5 endpoints.
| Method | Path | Summary |
|---|---|---|
GET | /api/event-categories | List event categories for a community |
POST | /api/event-categories | Create an event category |
DELETE | /api/event-categories/{id} | Delete an event category |
GET | /api/event-categories/{id} | Get an event category by ID |
PUT | /api/event-categories/{id} | Update an event category |
GET /api/event-categoriesoptionalAuth, readable exactly where the community's events are: by an APPROVED member, or by a guest of a PUBLIC community whose events are opted into guest preview on a plan that includes it. Anyone else gets 404. eventCount counts only events the caller may see.
Auth: optional — a token changes what you can see (see "Who may read what").
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
communityId | query | yes | string (uuid) | — |
q | query | no | string | Case-insensitive name search |
page | query | no | integer | — |
pageSize | query | no | integer | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | Paginated list of event categories | — |
404 | The caller may not read this community's events. | — |
POST /api/event-categoriesAn APPROVED member holding calendar:manage or calendar:create (the same set that shows «إدارة التصنيفات» in the web). communityId may be sent in the body or the query; when both are sent they must match (400 COMMUNITY_MISMATCH). Rate limit: 10 per burst, 1 per 10 seconds.
Auth: Bearer JWT required.
Request body (required) — application/json
| Field | Type | Required | Description |
|---|---|---|---|
communityId | string (uuid) | yes | — |
name | string | yes | — |
description | string | no | — |
Responses
| Status | Description | Body |
|---|---|---|
201 | Category created successfully | — |
401 | Authentication required | — |
403 | Missing calendar permission, or the events feature is disabled | — |
409 | An event category with this name already exists | — |
DELETE /api/event-categories/{id}Same access as POST. Removes the category from every event that carries it. Auth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string (uuid) | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | Category deleted successfully | — |
403 | Missing calendar permission | — |
404 | Event category not found | — |
GET /api/event-categories/{id}optionalAuth; the same read rule as the list (404 when events are not readable). Auth: optional — a token changes what you can see (see "Who may read what").
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string (uuid) | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | Category details | — |
404 | Event category not found | — |
PUT /api/event-categories/{id}Same access as POST. The category is shared by every event that uses it. Auth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string (uuid) | — |
Request body — application/json
| Field | Type | Required | Description |
|---|---|---|---|
name | string | no | — |
description | string | no | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | Category updated successfully | — |
403 | Missing calendar permission | — |
404 | Event category not found | — |