> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zeus.ttr.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# Categories API

> Category management endpoints

## Endpoints

| Method | Endpoint          | Description         |
| ------ | ----------------- | ------------------- |
| GET    | `/categories`     | List all categories |
| POST   | `/categories`     | Create new category |
| GET    | `/categories/:id` | Get category by ID  |
| PUT    | `/categories/:id` | Update category     |
| DELETE | `/categories/:id` | Delete category     |

## List Categories

```http theme={null}
GET /categories
Authorization: Bearer <token>
```

**Response:**

```json theme={null}
[
  {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "Food & Dining",
    "type": "expense",
    "color": 4294942720,
    "icon": "restaurant",
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z"
  }
]
```

## Create Category

```http theme={null}
POST /categories
Authorization: Bearer <token>
Content-Type: application/json

{
  "name": "Salary",
  "type": "income",
  "color": 4283215696,
  "icon": "attach_money"
}
```

**Response (201):**

```json theme={null}
{
  "id": "550e8400-e29b-41d4-a716-446655440001",
  "name": "Salary",
  "type": "income",
  "color": 4283215696,
  "icon": "attach_money",
  "created_at": "2024-01-15T12:00:00Z",
  "updated_at": "2024-01-15T12:00:00Z"
}
```

## Category Schema

| Field        | Type     | Required | Description           |
| ------------ | -------- | -------- | --------------------- |
| `id`         | UUID     | Auto     | Unique identifier     |
| `name`       | String   | Yes      | Category name         |
| `type`       | Enum     | Yes      | `income` or `expense` |
| `color`      | Integer  | No       | ARGB color value      |
| `icon`       | String   | No       | Icon identifier       |
| `created_at` | DateTime | Auto     | Creation timestamp    |
| `updated_at` | DateTime | Auto     | Last update timestamp |
