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

# Plans API (provisional)

> Plan CRUD routes with typed DTO fields

<Note>
  This module has typed DTOs and database-backed behavior, but treat the public contract as provisional while the API surface is being stabilized.
</Note>

## Endpoints

* `POST /plans`
* `GET /plans`
* `GET /plans/:id`
* `PATCH /plans/:id`
* `DELETE /plans/:id`

## Request contract

### Create body

* `name` (string)
* `tier` (`FREE`, `STARTER`, `PRO`, `ENTERPRISE`)
* `maxProjects` (int)
* `maxDeployments` (int)
* `maxMemoryMi` (int)
* `maxCpuM` (int)
* `maxStorageGi` (int)
* `maxBandwidthGb` (int)
* `buildTimeoutMins` (int)
* `customDomains`, `teamMembers`, `priorityBuilds` (optional boolean)

### Update body

`PATCH /plans/:id` accepts a partial subset of create fields.

## Response contract

The service uses Prisma-backed entities for list, read, create, update, and delete.

```bash theme={null}
curl -X POST http://localhost:3000/plans \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Free",
    "tier": "FREE",
    "maxProjects": 3,
    "maxDeployments": 10,
    "maxMemoryMi": 512,
    "maxCpuM": 500,
    "maxStorageGi": 1,
    "maxBandwidthGb": 10,
    "buildTimeoutMins": 15
  }'
```
