Categories

Category management for zones

List all categories

get
Responses
200

List of categories

application/json
get
GET /api/categories HTTP/1.1
Host: 
Accept: */*
[
  {
    "id": 1,
    "name": "text",
    "description": "text",
    "color": "text",
    "createdAt": "2025-10-09T00:01:24.851Z"
  }
]

Create a new category

post
Body
namestringRequired
descriptionstring | nullableOptional
colorstringOptionalDefault: #3B82F6
Responses
201

Category created

application/json
post
POST /api/categories HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 54

{
  "name": "text",
  "description": "text",
  "color": "#3B82F6"
}
{
  "id": 1,
  "name": "text",
  "description": "text",
  "color": "text",
  "createdAt": "2025-10-09T00:01:24.851Z"
}

Update a category

put
Body
idintegerRequired
namestringRequired
descriptionstring | nullableOptional
colorstringOptional
Responses
200

Category updated

application/json
put
PUT /api/categories HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 58

{
  "id": 1,
  "name": "text",
  "description": "text",
  "color": "text"
}
{
  "id": 1,
  "name": "text",
  "description": "text",
  "color": "text",
  "createdAt": "2025-10-09T00:01:24.851Z"
}

Delete a category

delete
Query parameters
idstringRequired
Responses
200

Category deleted

No content

delete
DELETE /api/categories?id=text HTTP/1.1
Host: 
Accept: */*

No content