<!--
hoody-api Subskill (http)
Auto-generated by Hoody Skills Generator
Generated: 2026-05-06T18:28:22.015Z
Model: mimo-v2.5-pro + fixer:z-ai/glm-5.1
Mode: http


Tokens: 37967

DO NOT EDIT MANUALLY - Changes will be overwritten on next generation
-->

# hoody-api Subskill

## Overview

### What This Service Does

`hoody-api` is the core platform API for the Hoody ecosystem. It manages all foundational resources: user accounts, authentication, projects, containers, networking, firewall rules, storage sharing, billing, notifications, server rentals, and more. Every other Hoody service depends on `hoody-api` for identity, authorization, and resource management.

### When to Use It

Use `hoody-api` when you need to:

- **Authenticate users** — login, signup, OAuth, 2FA, token management
- **Manage projects** — create, update, delete projects and their permissions
- **Manage containers** — lifecycle operations, environment variables, snapshots, stats
- **Configure networking** — proxy settings, firewall rules, network configuration
- **Manage storage** — share directories between containers, mount incoming shares
- **Handle billing** — wallet balances, payment methods, invoices, transfers
- **Manage server rentals** — browse available servers, rent, extend, execute commands
- **Work with pools** — team collaboration, invitations, member management
- **Access the vault** — encrypted key-value storage for secrets
- **Monitor activity** — events, activity logs, notifications

### Authentication Model

All endpoints (except public ones) require authentication via one of:

1. **JWT Bearer Token** — obtained via `POST /api/v1/users/auth/login`, expires in 1 day
2. **Auth Token** — long-lived token created via `POST /api/v1/auth/tokens`
3. **Basic Auth** — username:password (limited use)

Include the token in the `Authorization` header:

```
Authorization: Bearer {token}
```

### How It Fits Into Hoody Philosophy

`hoody-api` embodies the Hoody principle of **unified infrastructure management**. Instead of separate tools for DNS, SSL, auth, billing, and container orchestration, `hoody-api` provides a single coherent API. The proxy routing system (`https://{projectId}-{containerId}-{serviceName}-{serviceId}.{node}.containers.hoody.icu`) eliminates manual DNS configuration. Built-in authentication, firewall rules, and storage sharing mean you never leave the platform.

### Base URL and Path Rules

```
Base URL: https://api.hoody.icu
All paths MUST start with: /api/v1/
```

**Never** use `/v1/` without the `/api` prefix.

---

## Core Resource Workflows

### 1. Authentication

#### 1.1 Signup and Email Verification

Create a new account and verify the email address.

```
# Step 1: Sign up
curl -s -X POST "https://api.hoody.icu/api/v1/auth/signup" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "user@example.com",
    "password": "SecureP@ss123"
  }'
```

```
{
  "success": true,
  "data": {
    "message": "Verification email sent"
  }
}
```

```
# Step 2: Verify email (token from email)
curl -s -X POST "https://api.hoody.icu/api/v1/auth/verify-email" \
  -H "Content-Type: application/json" \
  -d '{
    "token": "verification_token_from_email"
  }'
```

```
{
  "success": true,
  "data": {
    "accessToken": "eyJhbGciOi...",
    "refreshToken": "eyJhbGciOi...",
    "user": {
      "id": "abc123",
      "email": "user@example.com"
    }
  }
}
```

```
# Resend verification email if needed
curl -s -X POST "https://api.hoody.icu/api/v1/auth/resend-verification" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "user@example.com"
  }'
```

#### 1.2 Login and Token Refresh

```
# Login
curl -s -X POST "https://api.hoody.icu/api/v1/users/auth/login" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "user@example.com",
    "password": "SecureP@ss123"
  }'
```

```
{
  "success": true,
  "data": {
    "accessToken": "eyJhbGciOi...",
    "refreshToken": "eyJhbGciOi...",
    "user": {
      "id": "abc123",
      "email": "user@example.com"
    }
  }
}
```

```
# Refresh token (use refresh token in Authorization header)
curl -s -X POST "https://api.hoody.icu/api/v1/users/auth/refresh" \
  -H "Authorization: Bearer eyJhbGciOi...refresh_token..." \
  -H "Content-Type: application/json" \
  -d '{
    "refreshToken": "eyJhbGciOi...refresh_token..."
  }'
```

```
{
  "success": true,
  "data": {
    "accessToken": "eyJhbGciOi...new_access...",
    "refreshToken": "eyJhbGciOi...new_refresh..."
  }
}
```

```
# Get current user profile
curl -s "https://api.hoody.icu/api/v1/users/auth/me" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

```
# Logout
curl -s -X POST "https://api.hoody.icu/api/v1/users/auth/logout" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

#### 1.3 Password Reset

```
# Request password reset
curl -s -X POST "https://api.hoody.icu/api/v1/auth/forgot-password" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "user@example.com"
  }'
```

```
# Reset password with token from email
curl -s -X POST "https://api.hoody.icu/api/v1/auth/reset-password" \
  -H "Content-Type: application/json" \
  -d '{
    "token": "reset_token_from_email",
    "password": "NewSecureP@ss456"
  }'
```

#### 1.4 OAuth (GitHub and Google)

OAuth endpoints are browser-only redirects. Use them in web flows.

```
# GitHub OAuth — redirects browser to GitHub
# GET /api/v1/auth/github

# Google OAuth — redirects browser to Google
# GET /api/v1/auth/google
```

#### 1.5 Available Regions

```
# Public endpoint — no auth required
curl -s "https://api.hoody.icu/api/v1/auth/available-regions"
```

```
{
  "success": true,
  "data": [
    {
      "region": "us-east",
      "available": true
    },
    {
      "region": "eu-west",
      "available": false
    }
  ]
}
```

---

### 2. Two-Factor Authentication (2FA)

#### 2.1 Setup 2FA

```
# Step 1: Begin setup (returns QR code and backup codes)
curl -s -X POST "https://api.hoody.icu/api/v1/users/auth/2fa/setup" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "password": "SecureP@ss123"
  }'
```

```
{
  "success": true,
  "data": {
    "qrCode": "data:image/png;base64,...",
    "secret": "JBSWY3DPEHPK3PXP",
    "backupCodes": ["a1b2c3d4e5", "f6g7h8i9j0", "k1l2m3n4o5"]
  }
}
```

```
# Step 2: Verify setup with first OTP code
curl -s -X POST "https://api.hoody.icu/api/v1/users/auth/2fa/verify-setup" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "code": "123456"
  }'
```

#### 2.2 Verify 2FA During Login

When 2FA is enabled, login returns a `temp_token` instead of full credentials.

```
# Complete 2FA verification
curl -s -X POST "https://api.hoody.icu/api/v1/users/auth/2fa/verify" \
  -H "Content-Type: application/json" \
  -d '{
    "code": "123456"
  }'
```

```
{
  "success": true,
  "data": {
    "accessToken": "eyJhbGciOi...",
    "refreshToken": "eyJhbGciOi...",
    "user": {
      "id": "abc123"
    }
  }
}
```

#### 2.3 Check 2FA Status

```
curl -s "https://api.hoody.icu/api/v1/users/auth/2fa/status" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

```
{
  "success": true,
  "data": {
    "enabled": true,
    "backupCodesRemaining": 8
  }
}
```

#### 2.4 Regenerate Backup Codes

```
curl -s -X POST "https://api.hoody.icu/api/v1/users/auth/2fa/backup-codes/regenerate" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "password": "SecureP@ss123",
    "code": "123456"
  }'
```

#### 2.5 Disable 2FA

```
curl -s -X DELETE "https://api.hoody.icu/api/v1/users/auth/2fa" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "password": "SecureP@ss123",
    "code": "123456"
  }'
```

#### 2.6 Token Gate (OTP for Token Mutations)

```
# Enable token gate
curl -s -X PUT "https://api.hoody.icu/api/v1/users/auth/2fa/token-gate" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "enabled": true
  }'
```

```
# Disable token gate (requires password + OTP)
curl -s -X PATCH "https://api.hoody.icu/api/v1/users/auth/2fa/token-gate" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "enabled": false
  }'
```

---

### 3. Auth Tokens

Long-lived authentication tokens for programmatic access.

#### 3.1 List and Create Tokens

```
# List all tokens (token values not included)
curl -s "https://api.hoody.icu/api/v1/auth/tokens" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

```
{
  "success": true,
  "data": [
    {
      "id": "tok_abc123",
      "alias": "CI Pipeline",
      "enabled": true,
      "created_at": "2025-01-15T10:00:00Z"
    }
  ]
}
```

```
# Create a new auth token
curl -s -X POST "https://api.hoody.icu/api/v1/auth/tokens" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "alias": "CI Pipeline",
    "ip_whitelist": ["192.168.1.0/24"],
    "expires_at": "2026-01-01T00:00:00Z"
  }'
```

```
{
  "success": true,
  "data": {
    "id": "tok_abc123",
    "token": "hoody_tok_...",
    "alias": "CI Pipeline",
    "enabled": true
  }
}
```

#### 3.2 Get, Update, Delete Token

```
# Get token details
curl -s "https://api.hoody.icu/api/v1/auth/tokens/tok_abc123" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

```
# Update token
curl -s -X PUT "https://api.hoody.icu/api/v1/auth/tokens/tok_abc123" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "alias": "Updated CI Pipeline",
    "enabled": false
  }'
```

```
# Delete token
curl -s -X DELETE "https://api.hoody.icu/api/v1/auth/tokens/tok_abc123" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

#### 3.3 Copy Token

```
# Copy token configuration into a new token
curl -s -X POST "https://api.hoody.icu/api/v1/auth/tokens/tok_abc123/copy" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{}'
```

#### 3.4 Realm Management on Tokens

```
# Add realm to token
curl -s -X POST "https://api.hoody.icu/api/v1/auth/tokens/tok_abc123/add-realm" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "realm_id": "a1b2c3d4e5f6a1b2c3d4e5f6"
  }'
```

```
# Remove realm from token
curl -s -X POST "https://api.hoody.icu/api/v1/auth/tokens/tok_abc123/remove-realm" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "realm_id": "a1b2c3d4e5f6a1b2c3d4e5f6"
  }'
```

#### 3.5 Current Token Info and Public Profile

```
# Get current token metadata
curl -s "https://api.hoody.icu/api/v1/auth/tokens/me" \
  -H "Authorization: Bearer hoody_tok_..."
```

```
# Update current token public profile
curl -s -X PUT "https://api.hoody.icu/api/v1/auth/tokens/me/public-profile" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "public_key": "ed25519_public_key_hex",
    "public_storage": "{\"name\":\"My Agent\"}"
  }'
```

```
# Resolve public profile by public key
curl -s "https://api.hoody.icu/api/v1/auth/tokens/public-profiles/ed25519_public_key_hex" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

---

### 4. Users

#### 4.1 Get and Update User Profile

```
# Get user profile
curl -s "https://api.hoody.icu/api/v1/users/user_abc123" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

```
# Update user profile
curl -s -X PATCH "https://api.hoody.icu/api/v1/users/user_abc123" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "alias": "NewAlias"
  }'
```

#### 4.2 Retry Setup

Claim a free-tier server and create default project/container.

```
curl -s -X POST "https://api.hoody.icu/api/v1/users/me/retry-setup" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

---

### 5. Projects

#### 5.1 List and Create Projects

```
# List all projects
curl -s "https://api.hoody.icu/api/v1/projects/" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

```
{
  "success": true,
  "data": [
    {
      "id": "proj_abc123",
      "alias": "My Project",
      "color": "#3B82F6",
      "created_at": "2025-01-15T10:00:00Z"
    }
  ]
}
```

```
# Create a new project
curl -s -X POST "https://api.hoody.icu/api/v1/projects/" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "alias": "Production",
    "color": "#10B981"
  }'
```

#### 5.2 Get, Update, Delete Project

```
# Get project details
curl -s "https://api.hoody.icu/api/v1/projects/proj_abc123" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

```
# Update project
curl -s -X PATCH "https://api.hoody.icu/api/v1/projects/proj_abc123" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "alias": "Production v2",
    "color": "#EF4444"
  }'
```

```
# Delete project
curl -s -X DELETE "https://api.hoody.icu/api/v1/projects/proj_abc123" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

#### 5.3 Project Permissions

```
# List project permissions
curl -s "https://api.hoody.icu/api/v1/projects/proj_abc123/permissions" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

```
# Grant access to another user
curl -s -X POST "https://api.hoody.icu/api/v1/projects/proj_abc123/permissions" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "user_id": "user_xyz789",
    "level": "edit"
  }'
```

```
# Update permission level
curl -s -X PATCH "https://api.hoody.icu/api/v1/projects/proj_abc123/permissions/perm_abc123" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "level": "read"
  }'
```

```
# Revoke access
curl -s -X DELETE "https://api.hoody.icu/api/v1/projects/proj_abc123/permissions/perm_abc123" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

#### 5.4 Project Stats

```
curl -s "https://api.hoody.icu/api/v1/projects/proj_abc123/stats" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

---

### 6. Containers

#### 6.1 List and Create Containers

```
# List containers in a project
curl -s "https://api.hoody.icu/api/v1/projects/proj_abc123/containers" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

```
# List all containers across all projects
curl -s "https://api.hoody.icu/api/v1/containers/" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

```
# Create a container in a project
curl -s -X POST "https://api.hoody.icu/api/v1/projects/proj_abc123/containers" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "alias": "web-server",
    "image": "ubuntu:22.04"
  }'
```

#### 6.2 Get, Update, Delete Container

```
# Get container details
curl -s "https://api.hoody.icu/api/v1/containers/ctr_abc123" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

```
# Update container
curl -s -X PATCH "https://api.hoody.icu/api/v1/containers/ctr_abc123" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "alias": "web-server-v2"
  }'
```

```
# Delete container
curl -s -X DELETE "https://api.hoody.icu/api/v1/containers/ctr_abc123" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

#### 6.3 Container Operations

```
# Start container
curl -s -X POST "https://api.hoody.icu/api/v1/containers/ctr_abc123/start" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{}'
```

```
# Stop container
curl -s -X POST "https://api.hoody.icu/api/v1/containers/ctr_abc123/stop" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{}'
```

```
# Restart container
curl -s -X POST "https://api.hoody.icu/api/v1/containers/ctr_abc123/restart" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{}'
```

```
# Pause container
curl -s -X POST "https://api.hoody.icu/api/v1/containers/ctr_abc123/pause" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{}'
```

```
# Resume container
curl -s -X POST "https://api.hoody.icu/api/v1/containers/ctr_abc123/resume" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{}'
```

```
# Force stop container
curl -s -X POST "https://api.hoody.icu/api/v1/containers/ctr_abc123/force-stop" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{}'
```

#### 6.4 Copy and Sync Containers

```
# Copy a container (async)
curl -s -X POST "https://api.hoody.icu/api/v1/containers/ctr_abc123/copy" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{}'
```

```
# Sync from source container (only for copied containers)
curl -s -X POST "https://api.hoody.icu/api/v1/containers/ctr_copy456/sync" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{}'
```

#### 6.5 Container Authorization Claim

```
# Issue a signed container authorization claim
curl -s -X POST "https://api.hoody.icu/api/v1/containers/ctr_abc123/authorize" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{}'
```

#### 6.6 Container Status Logs

```
curl -s "https://api.hoody.icu/api/v1/containers/ctr_abc123/status-logs" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

#### 6.7 Container Stats

```
curl -s "https://api.hoody.icu/api/v1/containers/ctr_abc123/stats" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

```
{
  "success": true,
  "data": {
    "cpu": {
      "usage_percent": 12.5
    },
    "memory": {
      "used_bytes": 536870912,
      "limit_bytes": 1073741824
    },
    "disk": {
      "used_bytes": 1073741824,
      "limit_bytes": 10737418240
    },
    "network": {
      "rx_bytes": 1048576,
      "tx_bytes": 524288
    }
  }
}
```

---

### 7. Container Environment Variables

#### 7.1 Get All Environment Variables

```
curl -s "https://api.hoody.icu/api/v1/containers/ctr_abc123/env" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

```
{
  "success": true,
  "data": {
    "DATABASE_URL": "postgres://...",
    "API_KEY": "sk-..."
  }
}
```

#### 7.2 Set Multiple Environment Variables (Merge)

```
curl -s -X PUT "https://api.hoody.icu/api/v1/containers/ctr_abc123/env" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "DATABASE_URL": "postgres://new-host/db",
    "NEW_VAR": "new_value"
  }'
```

#### 7.3 Set Single Environment Variable

```
curl -s -X PUT "https://api.hoody.icu/api/v1/containers/ctr_abc123/env/MY_VAR" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "value": "my_value"
  }'
```

#### 7.4 Delete Single Environment Variable

```
curl -s -X DELETE "https://api.hoody.icu/api/v1/containers/ctr_abc123/env/MY_VAR" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

**Note**: Keys starting with `HOODY_` are reserved and cannot be set or deleted.

---

### 8. Container Firewall

#### 8.1 Get All Firewall Rules

```
curl -s "https://api.hoody.icu/api/v1/containers/ctr_abc123/firewall/rules" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

#### 8.2 Add Ingress Rule

```
curl -s -X POST "https://api.hoody.icu/api/v1/containers/ctr_abc123/firewall/ingress" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "protocol": "tcp",
    "port": 443,
    "source": "0.0.0.0/0",
    "action": "allow",
    "state": "enabled"
  }'
```

#### 8.3 Add Egress Rule

```
curl -s -X POST "https://api.hoody.icu/api/v1/containers/ctr_abc123/firewall/egress" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "protocol": "tcp",
    "port": 5432,
    "destination": "10.0.0.0/8",
    "action": "allow",
    "state": "enabled"
  }'
```

#### 8.4 Toggle Firewall Rules

```
# Disable an ingress rule
curl -s -X PATCH "https://api.hoody.icu/api/v1/containers/ctr_abc123/firewall/ingress" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "protocol": "tcp",
    "port": 443,
    "state": "disabled"
  }'
```

#### 8.5 Delete Firewall Rules

```
# Delete specific ingress rule
curl -s -X DELETE "https://api.hoody.icu/api/v1/containers/ctr_abc123/firewall/ingress" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "protocol": "tcp",
    "port": 443
  }'
```

```
# Delete all egress rules
curl -s -X DELETE "https://api.hoody.icu/api/v1/containers/ctr_abc123/firewall/egress" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "all": true
  }'
```

#### 8.6 Reset Firewall

```
curl -s -X POST "https://api.hoody.icu/api/v1/containers/ctr_abc123/firewall/reset" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{}'
```

---

### 9. Container Network

#### 9.1 Get Network Configuration

```
curl -s "https://api.hoody.icu/api/v1/containers/ctr_abc123/network" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

#### 9.2 Configure Network

```
curl -s -X PUT "https://api.hoody.icu/api/v1/containers/ctr_abc123/network" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "mode": "proxy"
  }'
```

#### 9.3 Start and Stop Network Service

```
# Start network proxy
curl -s -X POST "https://api.hoody.icu/api/v1/containers/ctr_abc123/network/start" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{}'
```

```
# Stop network proxy
curl -s -X POST "https://api.hoody.icu/api/v1/containers/ctr_abc123/network/stop" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{}'
```

#### 9.4 Remove Network Configuration

```
curl -s -X DELETE "https://api.hoody.icu/api/v1/containers/ctr_abc123/network" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

---

### 10. Container Snapshots

#### 10.1 List and Create Snapshots

```
# List snapshots
curl -s "https://api.hoody.icu/api/v1/containers/ctr_abc123/snapshots" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

```
# Create a snapshot
curl -s -X POST "https://api.hoody.icu/api/v1/containers/ctr_abc123/snapshots" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "before-upgrade",
    "alias": "Pre-upgrade snapshot"
  }'
```

#### 10.2 Restore from Snapshot

```
curl -s -X PUT "https://api.hoody.icu/api/v1/containers/ctr_abc123/snapshots/before-upgrade" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{}'
```

#### 10.3 Update Snapshot Alias

```
curl -s -X PATCH "https://api.hoody.icu/api/v1/containers/ctr_abc123/snapshots/before-upgrade/alias" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "alias": "Renamed snapshot"
  }'
```

#### 10.4 Delete Snapshot

```
curl -s -X DELETE "https://api.hoody.icu/api/v1/containers/ctr_abc123/snapshots/before-upgrade" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

---

### 11. Container Images

#### 11.1 Browse Public Images

```
# List public images
curl -s "https://api.hoody.icu/api/v1/images/public" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

```
# Get specific public image
curl -s "https://api.hoody.icu/api/v1/images/public/img_abc123" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

```
# Get image icon
curl -s "https://api.hoody.icu/api/v1/images/img_abc123/icon" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

#### 11.2 User Images

```
# List user's imported/purchased images
curl -s "https://api.hoody.icu/api/v1/images/user" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

#### 11.3 Import and Purchase Images

```
# Import a free public image
curl -s -X POST "https://api.hoody.icu/api/v1/images/import/img_abc123" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{}'
```

```
# Purchase a paid image
curl -s -X POST "https://api.hoody.icu/api/v1/images/purchase/img_abc123" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{}'
```

#### 11.4 Rate an Image

```
curl -s -X POST "https://api.hoody.icu/api/v1/images/rate/img_abc123" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "rating": 5
  }'
```

---

### 12. Proxy Settings and Discovery

#### 12.1 Proxy Settings

```
# Get proxy settings
curl -s "https://api.hoody.icu/api/v1/containers/ctr_abc123/proxy/settings" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

```
{
  "success": true,
  "data": {
    "enable_proxy": true,
    "default": "allow"
  }
}
```

```
# Update proxy settings (requires If-Match header)
curl -s -X PATCH "https://api.hoody.icu/api/v1/containers/ctr_abc123/proxy/settings" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "If-Match: file:v1" \
  -H "Content-Type: application/json" \
  -d '{
    "enable_proxy": true,
    "default": "deny"
  }'
```

#### 12.2 Proxy Discovery

```
# List proxy groups
curl -s "https://api.hoody.icu/api/v1/containers/ctr_abc123/proxy/groups" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

```
# List proxy services
curl -s "https://api.hoody.icu/api/v1/containers/ctr_abc123/proxy/services" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

```
# Get service details
curl -s "https://api.hoody.icu/api/v1/containers/ctr_abc123/proxy/services/web" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

---

### 13. Proxy Permissions

#### 13.1 Project-Level Proxy Permissions

```
# Get project proxy permissions
curl -s "https://api.hoody.icu/api/v1/projects/proj_abc123/proxy/permissions" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

```
# Replace project proxy permissions
curl -s -X PUT "https://api.hoody.icu/api/v1/projects/proj_abc123/proxy/permissions" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "groups": {
      "admins": {
        "auth": {
          "type": "jwt",
          "secret": "my-secret"
        }
      }
    },
    "default": "deny",
    "enable_proxy": true
  }'
```

```
# Update default policy
curl -s -X PATCH "https://api.hoody.icu/api/v1/projects/proj_abc123/proxy/permissions/default" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "default": "allow"
  }'
```

```
# Enable/disable proxy state
curl -s -X PATCH "https://api.hoody.icu/api/v1/projects/proj_abc123/proxy/permissions/state" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "enable_proxy": false
  }'
```

```
# Delete all project proxy permissions
curl -s -X DELETE "https://api.hoody.icu/api/v1/projects/proj_abc123/proxy/permissions" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

#### 13.2 Project Proxy Permission Groups

```
# Update group IP auth
curl -s -X PATCH "https://api.hoody.icu/api/v1/projects/proj_abc123/proxy/permissions/groups/admins/ip" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "allowed_ips": ["192.168.1.0/24"]
  }'
```

```
# Update group JWT auth
curl -s -X PATCH "https://api.hoody.icu/api/v1/projects/proj_abc123/proxy/permissions/groups/admins/jwt" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "secret": "jwt-secret-key"
  }'
```

```
# Update group password auth
curl -s -X PATCH "https://api.hoody.icu/api/v1/projects/proj_abc123/proxy/permissions/groups/admins/password" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "password": "access-password"
  }'
```

```
# Update group token auth
curl -s -X PATCH "https://api.hoody.icu/api/v1/projects/proj_abc123/proxy/permissions/groups/admins/token" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "tokens": ["token1", "token2"]
  }'
```

```
# Delete a group
curl -s -X DELETE "https://api.hoody.icu/api/v1/projects/proj_abc123/proxy/permissions/groups/admins" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

#### 13.3 Project Proxy Program Permissions

```
# Update program permissions for a group
curl -s -X PATCH "https://api.hoody.icu/api/v1/projects/proj_abc123/proxy/permissions/permissions/admins" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "programs": {
      "web": "allow",
      "api": "deny"
    }
  }'
```

```
# Delete program permission
curl -s -X DELETE "https://api.hoody.icu/api/v1/projects/proj_abc123/proxy/permissions/permissions/admins/web" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

#### 13.4 Container-Level Proxy Permissions

Container proxy permissions mirror project-level but require `If-Match` headers.

```
# Get container proxy permissions
curl -s "https://api.hoody.icu/api/v1/containers/ctr_abc123/proxy/permissions" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

```
# Replace container proxy permissions (requires If-Match)
curl -s -X PUT "https://api.hoody.icu/api/v1/containers/ctr_abc123/proxy/permissions" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "If-Match: file:v1" \
  -H "Content-Type: application/json" \
  -d '{
    "groups": {},
    "default": "allow",
    "enable_proxy": true
  }'
```

---

### 14. Proxy Hooks

#### 14.1 List Hooks

```
# List all hooks grouped by service
curl -s "https://api.hoody.icu/api/v1/containers/ctr_abc123/proxy/hooks" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

```
# List hooks for a specific service
curl -s "https://api.hoody.icu/api/v1/containers/ctr_abc123/proxy/hooks/web" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

#### 14.2 Create Hook

```
curl -s -X POST "https://api.hoody.icu/api/v1/containers/ctr_abc123/proxy/hooks/web" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "If-Match: file:v1" \
  -H "Content-Type: application/json" \
  -d '{
    "match": {
      "path": "/api/*"
    },
    "script": "return { headers: { \"X-Custom\": \"value\" } }",
    "timeout": 5000
  }'
```

#### 14.3 Update Hook

```
curl -s -X PUT "https://api.hoody.icu/api/v1/containers/ctr_abc123/proxy/hooks/web/hook_abc123" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "If-Match: file:v2" \
  -H "Content-Type: application/json" \
  -d '{
    "match": {
      "path": "/api/v2/*"
    },
    "script": "return { headers: { \"X-Custom\": \"updated\" } }",
    "timeout": 10000
  }'
```

#### 14.4 Move Hook Position

```
curl -s -X PATCH "https://api.hoody.icu/api/v1/containers/ctr_abc123/proxy/hooks/web/hook_abc123/position" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "If-Match: file:v2" \
  -H "Content-Type: application/json" \
  -d '{
    "position": 0
  }'
```

#### 14.5 Delete Hooks

```
# Delete single hook
curl -s -X DELETE "https://api.hoody.icu/api/v1/containers/ctr_abc123/proxy/hooks/web/hook_abc123" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "If-Match: file:v2"
```

```
# Delete all hooks for a service
curl -s -X DELETE "https://api.hoody.icu/api/v1/containers/ctr_abc123/proxy/hooks/web" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "If-Match: file:v2"
```

---

### 15. Proxy Aliases

Custom domain aliases that mask real container URLs.

#### 15.1 List and Create Aliases

```
# List all aliases
curl -s "https://api.hoody.icu/api/v1/proxy/aliases" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

```
# Create a custom domain alias
curl -s -X POST "https://api.hoody.icu/api/v1/proxy/aliases" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "alias": "myapp.example.com",
    "container_id": "ctr_abc123",
    "project_id": "proj_abc123"
  }'
```

#### 15.2 Get, Update, Delete Alias

```
# Get alias details
curl -s "https://api.hoody.icu/api/v1/proxy/aliases/alias_abc123" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

```
# Update alias
curl -s -X PATCH "https://api.hoody.icu/api/v1/proxy/aliases/alias_abc123" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "alias": "newapp.example.com"
  }'
```

```
# Delete alias
curl -s -X DELETE "https://api.hoody.icu/api/v1/proxy/aliases/alias_abc123" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

#### 15.3 Enable/Disable Alias

```
# Disable alias
curl -s -X PATCH "https://api.hoody.icu/api/v1/proxy/aliases/alias_abc123/state" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "enabled": false
  }'
```

---

### 16. Storage Shares

#### 16.1 Create and List Shares

```
# List shares from a container
curl -s "https://api.hoody.icu/api/v1/containers/ctr_abc123/storage/shares" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

```
# Share a directory to another container
curl -s -X POST "https://api.hoody.icu/api/v1/containers/ctr_abc123/storage/shares" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "path": "/data/shared",
    "target_container_id": "ctr_xyz789",
    "mode": "rw",
    "mount_path": "/mnt/shared"
  }'
```

#### 16.2 Get Share Details

```
curl -s "https://api.hoody.icu/api/v1/containers/ctr_abc123/storage/shares/share_abc123" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

#### 16.3 Update Share

```
curl -s -X PATCH "https://api.hoody.icu/api/v1/containers/ctr_abc123/storage/shares/share_abc123" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "mode": "ro"
  }'
```

#### 16.4 Delete Share

```
curl -s -X DELETE "https://api.hoody.icu/api/v1/storage/shares/share_abc123" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

#### 16.5 Incoming Shares

```
# Get incoming shares for a container
curl -s "https://api.hoody.icu/api/v1/containers/ctr_xyz789/storage/incoming" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

```
# Get all incoming shares across all containers
curl -s "https://api.hoody.icu/api/v1/storage/incoming" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

```
# Get all shares you created
curl -s "https://api.hoody.icu/api/v1/storage/shares" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

#### 16.6 Mount/Unmount Incoming Share

```
# Enable mounting of incoming share
curl -s -X PATCH "https://api.hoody.icu/api/v1/containers/ctr_xyz789/storage/incoming/share_abc123/mount" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "enabled": true
  }'
```

---

### 17. User Vault

Encrypted key-value storage for secrets.

#### 17.1 Vault Statistics

```
curl -s "https://api.hoody.icu/api/v1/vault/stats" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

```
{
  "success": true,
  "data": {
    "total_keys": 5,
    "total_size_bytes": 1024,
    "limit_mb": 10,
    "remaining_mb": 9.99,
    "used_percentage": 0.01
  }
}
```

#### 17.2 List and Get Keys

```
# List all keys (values not included)
curl -s "https://api.hoody.icu/api/v1/vault/keys" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

```
# Get specific key value
curl -s "https://api.hoody.icu/api/v1/vault/keys/my-secret" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

#### 17.3 Set and Delete Keys

```
# Set a key
curl -s -X PUT "https://api.hoody.icu/api/v1/vault/keys/my-secret" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "value": "{\"apiKey\":\"sk-123\",\"secret\":\"s3cr3t\"}"
  }'
```

```
# Delete a key
curl -s -X DELETE "https://api.hoody.icu/api/v1/vault/keys/my-secret" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

#### 17.4 Clear Entire Vault

```
# DANGER: Deletes ALL keys
curl -s -X DELETE "https://api.hoody.icu/api/v1/vault" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

---

### 18. Wallet and Billing

#### 18.1 Balances

```
# Get all balances
curl -s "https://api.hoody.icu/api/v1/wallet/balances" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

```
# Get AI credit balance
curl -s "https://api.hoody.icu/api/v1/wallet/balances/ai" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

```
# Get general balance
curl -s "https://api.hoody.icu/api/v1/wallet/balances/general" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

#### 18.2 Transfer to AI Credits

```
curl -s -X POST "https://api.hoody.icu/api/v1/wallet/transfers" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "amount": "10.00"
  }'
```

#### 18.3 AI Fee History

```
curl -s "https://api.hoody.icu/api/v1/wallet/ai-fee-history" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

#### 18.4 Payment Methods

```
# List payment methods
curl -s "https://api.hoody.icu/api/v1/wallet/payment-methods/" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

```
# Add payment method
curl -s -X POST "https://api.hoody.icu/api/v1/wallet/payment-methods/" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "type": "card",
    "token": "tok_visa_123"
  }'
```

```
# Get specific payment method
curl -s "https://api.hoody.icu/api/v1/wallet/payment-methods/pm_abc123" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

```
# Update payment method
curl -s -X PATCH "https://api.hoody.icu/api/v1/wallet/payment-methods/pm_abc123" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "is_default": true
  }'
```

```
# Set as default
curl -s -X PUT "https://api.hoody.icu/api/v1/wallet/payment-methods/pm_abc123/default" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{}'
```

```
# Delete payment method
curl -s -X DELETE "https://api.hoody.icu/api/v1/wallet/payment-methods/pm_abc123" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

#### 18.5 Payments

```
# Process a payment
curl -s -X POST "https://api.hoody.icu/api/v1/wallet/payments/" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "amount": "25.00",
    "payment_method_id": "pm_abc123"
  }'
```

```
# Get payment status
curl -s "https://api.hoody.icu/api/v1/wallet/payments/pay_abc123" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

#### 18.6 Invoices

```
# List invoices
curl -s "https://api.hoody.icu/api/v1/wallet/invoices/" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

```
# Get specific invoice
curl -s "https://api.hoody.icu/api/v1/wallet/invoices/inv_abc123" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

```
# Download invoice PDF
curl -s "https://api.hoody.icu/api/v1/wallet/invoices/inv_abc123/pdf" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -o invoice.pdf
```

```
# Generate invoice for a transaction
curl -s -X POST "https://api.hoody.icu/api/v1/wallet/invoices/generate/txn_abc123" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{}'
```

#### 18.7 Transactions

```
# List transactions
curl -s "https://api.hoody.icu/api/v1/wallet/transactions" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

```
# Get specific transaction
curl -s "https://api.hoody.icu/api/v1/wallet/transactions/txn_abc123" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

---

### 19. Notifications

#### 19.1 List Notifications

```
# Public notifications (no auth)
curl -s "https://api.hoody.icu/api/v1/notifications/public"
```

```
# User notifications
curl -s "https://api.hoody.icu/api/v1/notifications/" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

#### 19.2 Mark as Read

```
# Mark single notification as read
curl -s -X PATCH "https://api.hoody.icu/api/v1/notifications/notif_abc123/read" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{}'
```

```
# Mark all as read
curl -s -X PATCH "https://api.hoody.icu/api/v1/notifications/read-all" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{}'
```

---

### 20. Events

#### 20.1 Query Events

```
# List events with filtering
curl -s "https://api.hoody.icu/api/v1/events" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

```
# Get event stats
curl -s "https://api.hoody.icu/api/v1/events/stats" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

```
# Get specific event
curl -s "https://api.hoody.icu/api/v1/events/evt_abc123" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

#### 20.2 Delete Events

```
# Delete specific event
curl -s -X DELETE "https://api.hoody.icu/api/v1/events/evt_abc123" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

```
# Delete multiple events by filter
curl -s -X DELETE "https://api.hoody.icu/api/v1/events" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "before": "2025-01-01T00:00:00Z"
  }'
```

#### 20.3 Cleanup Old Events

```
curl -s -X POST "https://api.hoody.icu/api/v1/events/cleanup" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "retention_days": 30
  }'
```

---

### 21. Activity Logs

```
# Get activity logs
curl -s "https://api.hoody.icu/api/v1/users/auth/activity" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

```
# Get activity stats
curl -s "https://api.hoody.icu/api/v1/users/auth/activity/stats" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

---

### 22. AI Models

```
curl -s "https://api.hoody.icu/api/v1/ai/models" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

```
{
  "success": true,
  "data": [
    {
      "id": "gpt-4o",
      "name": "GPT-4o",
      "pricing": {
        "input_per_1k": 0.005,
        "output_per_1k": 0.015
      }
    }
  ]
}
```

---

### 23. Meta

```
# Get public key for signature verification
curl -s "https://api.hoody.icu/api/v1/meta/public-key"
```

```
# Get social stats
curl -s "https://api.hoody.icu/api/v1/meta/social-stats"
```

---

### 24. Realms

```
# List all unique realm IDs
curl -s "https://api.hoody.icu/api/v1/realms/" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

```
{
  "success": true,
  "data": [
    "a1b2c3d4e5f6a1b2c3d4e5f6",
    "f6e5d4c3b2a1f6e5d4c3b2a1"
  ]
}
```

---

### 25. Pools (Team Collaboration)

#### 25.1 List and Create Pools

```
# List pools
curl -s "https://api.hoody.icu/api/v1/pools" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

```
# Create a pool
curl -s -X POST "https://api.hoody.icu/api/v1/pools" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Engineering Team"
  }'
```

#### 25.2 Get, Update, Delete Pool

```
# Get pool details
curl -s "https://api.hoody.icu/api/v1/pools/pool_abc123" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

```
# Update pool
curl -s -X PATCH "https://api.hoody.icu/api/v1/pools/pool_abc123" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Updated Team Name"
  }'
```

```
# Delete pool
curl -s -X DELETE "https://api.hoody.icu/api/v1/pools/pool_abc123" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

#### 25.3 Pool Members

```
# Invite a member
curl -s -X POST "https://api.hoody.icu/api/v1/pools/pool_abc123/members" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "user_id": "user_xyz789",
    "role": "member"
  }'
```

```
# Update member role
curl -s -X PATCH "https://api.hoody.icu/api/v1/pools/pool_abc123/members/user_xyz789" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "role": "admin"
  }'
```

```
# Remove member
curl -s -X DELETE "https://api.hoody.icu/api/v1/pools/pool_abc123/members/user_xyz789" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

#### 25.4 Pool Invitations

```
# Get pending invitations
curl -s "https://api.hoody.icu/api/v1/pools/invitations/pending" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

```
# Accept invitation
curl -s -X POST "https://api.hoody.icu/api/v1/pools/pool_abc123/accept" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{}'
```

```
# Reject invitation
curl -s -X POST "https://api.hoody.icu/api/v1/pools/pool_abc123/reject" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{}'
```

---

### 26. Servers and Rentals

#### 26.1 Browse and Rent Servers

```
# List available servers
curl -s "https://api.hoody.icu/api/v1/servers/available" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

```
# Rent a server
curl -s -X POST "https://api.hoody.icu/api/v1/servers/srv_abc123/rent" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "days": 30
  }'
```

#### 26.2 Manage Rentals

```
# List all rentals
curl -s "https://api.hoody.icu/api/v1/rentals" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

```
# Get rental details
curl -s "https://api.hoody.icu/api/v1/rentals/rent_abc123" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

```
# Extend rental
curl -s -X POST "https://api.hoody.icu/api/v1/rentals/rent_abc123/extend" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "days": 7
  }'
```

#### 26.3 Server Commands

```
# List available commands
curl -s "https://api.hoody.icu/api/v1/servers/srv_abc123/available-commands" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

```
# Execute a command
curl -s -X POST "https://api.hoody.icu/api/v1/servers/srv_abc123/execute-command" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{
    "command": "restart"
  }'
```

---

### 27. Utilities

```
# Get caller IP information
curl -s "https://api.hoody.icu/api/v1/ip"
```

```
{
  "success": true,
  "data": {
    "ip": "203.0.113.42",
    "country": "US",
    "city": "San Francisco",
    "org": "Example ISP"
  }
}
```

---

## Advanced Operations

### Full Container Lifecycle

Complete workflow from project creation to running container with firewall, env vars, and proxy.

```
# Step 1: Create project
PROJECT=$(curl -s -X POST "https://api.hoody.icu/api/v1/projects/" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{"alias": "My App", "color": "#3B82F6"}')
PROJECT_ID=$(echo "$PROJECT" | jq -r '.data.id')

# Step 2: Create container
CONTAINER=$(curl -s -X POST "https://api.hoody.icu/api/v1/projects/$PROJECT_ID/containers" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{"alias": "web", "image": "ubuntu:22.04"}')
CONTAINER_ID=$(echo "$CONTAINER" | jq -r '.data.id')

# Step 3: Set environment variables
curl -s -X PUT "https://api.hoody.icu/api/v1/containers/$CONTAINER_ID/env" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{"APP_ENV": "production", "PORT": "8080"}'

# Step 4: Configure firewall — allow HTTPS inbound
curl -s -X POST "https://api.hoody.icu/api/v1/containers/$CONTAINER_ID/firewall/ingress" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{"protocol": "tcp", "port": 443, "source": "0.0.0.0/0", "action": "allow"}'

# Step 5: Start the container
curl -s -X POST "https://api.hoody.icu/api/v1/containers/$CONTAINER_ID/start" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{}'

# Step 6: Verify container is running
curl -s "https://api.hoody.icu/api/v1/containers/$CONTAINER_ID/stats" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

### Server Provisioning with Pool

Rent a server and set up team access.

```
# Step 1: Create a pool
POOL=$(curl -s -X POST "https://api.hoody.icu/api/v1/pools" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{"name": "DevOps Team"}')
POOL_ID=$(echo "$POOL" | jq -r '.data.id')

# Step 2: Invite team members
curl -s -X POST "https://api.hoody.icu/api/v1/pools/$POOL_ID/members" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{"user_id": "user_xyz789", "role": "admin"}'

# Step 3: Browse available servers
curl -s "https://api.hoody.icu/api/v1/servers/available" \
  -H "Authorization: Bearer eyJhbGciOi..."

# Step 4: Rent a server
curl -s -X POST "https://api.hoody.icu/api/v1/servers/srv_abc123/rent" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{"days": 30}'

# Step 5: Verify rental
curl -s "https://api.hoody.icu/api/v1/rentals" \
  -H "Authorization: Bearer eyJhbGciOi..."
```

### Network and Proxy Setup

Configure a container with proxy, hooks, and custom alias.

```
CONTAINER_ID="ctr_abc123"

# Step 1: Enable proxy
curl -s -X PATCH "https://api.hoody.icu/api/v1/containers/$CONTAINER_ID/proxy/settings" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "If-Match: file:v1" \
  -H "Content-Type: application/json" \
  -d '{"enable_proxy": true, "default": "deny"}'

# Step 2: Add a proxy hook for authentication
curl -s -X POST "https://api.hoody.icu/api/v1/containers/$CONTAINER_ID/proxy/hooks/web" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "If-Match: file:v2" \
  -H "Content-Type: application/json" \
  -d '{"match": {"path": "/api/*"}, "script": "return { status: 200 }", "timeout": 5000}'

# Step 3: Create a custom domain alias
curl -s -X POST "https://api.hoody.icu/api/v1/proxy/aliases" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{"alias": "myapp.example.com", "container_id": "'$CONTAINER_ID'", "project_id": "proj_abc123"}'

# Step 4: Start network service
curl -s -X POST "https://api.hoody.icu/api/v1/containers/$CONTAINER_ID/network/start" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Storage Sharing Between Containers

Share data between containers in the same project.

```
SOURCE_ID="ctr_source123"
TARGET_ID="ctr_target456"

# Step 1: Create a share from source to target
SHARE=$(curl -s -X POST "https://api.hoody.icu/api/v1/containers/$SOURCE_ID/storage/shares" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{"path": "/data/shared", "target_container_id": "'$TARGET_ID'", "mode": "rw", "mount_path": "/mnt/shared"}')
SHARE_ID=$(echo "$SHARE" | jq -r '.data.id')

# Step 2: Verify incoming share on target
curl -s "https://api.hoody.icu/api/v1/containers/$TARGET_ID/storage/incoming" \
  -H "Authorization: Bearer eyJhbGciOi..."

# Step 3: Enable mounting on target
curl -s -X PATCH "https://api.hoody.icu/api/v1/containers/$TARGET_ID/storage/incoming/$SHARE_ID/mount" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{"enabled": true}'
```

### Snapshot and Recovery Workflow

Create snapshots before changes and restore if needed.

```
CONTAINER_ID="ctr_abc123"

# Step 1: Create snapshot before upgrade
curl -s -X POST "https://api.hoody.icu/api/v1/containers/$CONTAINER_ID/snapshots" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{"name": "pre-upgrade", "alias": "Before v2 upgrade"}'

# Step 2: Perform upgrade (update env, restart)
curl -s -X PUT "https://api.hoody.icu/api/v1/containers/$CONTAINER_ID/env/APP_VERSION" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{"value": "2.0.0"}'

curl -s -X POST "https://api.hoody.icu/api/v1/containers/$CONTAINER_ID/restart" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{}'

# Step 3: If something breaks, restore from snapshot
curl -s -X PUT "https://api.hoody.icu/api/v1/containers/$CONTAINER_ID/snapshots/pre-upgrade" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Error Recovery Patterns

When a container operation fails, check status and retry.

```
# Check container status logs for errors
curl -s "https://api.hoody.icu/api/v1/containers/ctr_abc123/status-logs" \
  -H "Authorization: Bearer eyJhbGciOi..."

# Check container stats for resource issues
curl -s "https://api.hoody.icu/api/v1/containers/ctr_abc123/stats" \
  -H "Authorization: Bearer eyJhbGciOi..."

# Force stop if container is stuck
curl -s -X POST "https://api.hoody.icu/api/v1/containers/ctr_abc123/force-stop" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{}'

# Restart after force stop
curl -s -X POST "https://api.hoody.icu/api/v1/containers/ctr_abc123/start" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Multi-Resource Orchestration

Manage billing alongside infrastructure.

```
# Step 1: Check wallet balance before provisioning
curl -s "https://api.hoody.icu/api/v1/wallet/balances/general" \
  -H "Authorization: Bearer eyJhbGciOi..."

# Step 2: Add funds if needed
curl -s -X POST "https://api.hoody.icu/api/v1/wallet/payments/" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{"amount": "50.00", "payment_method_id": "pm_abc123"}'

# Step 3: Transfer to AI credits
curl -s -X POST "https://api.hoody.icu/api/v1/wallet/transfers" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{"amount": "25.00"}'

# Step 4: Rent server
curl -s -X POST "https://api.hoody.icu/api/v1/servers/srv_abc123/rent" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{"days": 30}'

# Step 5: Generate invoice
curl -s -X POST "https://api.hoody.icu/api/v1/wallet/invoices/generate/txn_abc123" \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{}'
```

---

## Quick Reference

### Endpoint Groups

| Group | Base Path | Methods |
|-------|-----------|---------|
| **Auth - Login** | `/api/v1/users/auth/login` | POST |
| **Auth - Refresh** | `/api/v1/users/auth/refresh` | POST |
| **Auth - Me** | `/api/v1/users/auth/me` | GET |
| **Auth - Logout** | `/api/v1/users/auth/logout` | POST |
| **Auth - Signup** | `/api/v1/auth/signup` | POST |
| **Auth - Verify Email** | `/api/v1/auth/verify-email` | POST |
| **Auth - Resend Verification** | `/api/v1/auth/resend-verification` | POST |
| **Auth - Forgot Password** | `/api/v1/auth/forgot-password` | POST |
| **Auth - Reset Password** | `/api/v1/auth/reset-password` | POST |
| **Auth - Regions** | `/api/v1/auth/available-regions` | GET |
| **Auth - GitHub OAuth** | `/api/v1/auth/github` | GET |
| **Auth - Google OAuth** | `/api/v1/auth/google` | GET |
| **Auth - Intent Cancel** | `/api/v1/auth/intent/cancel` | POST |
| **2FA - Verify** | `/api/v1/users/auth/2fa/verify` | POST |
| **2FA - Setup** | `/api/v1/users/auth/2fa/setup` | POST |
| **2FA - Verify Setup** | `/api/v1/users/auth/2fa/verify-setup` | POST |
| **2FA - Status** | `/api/v1/users/auth/2fa/status` | GET |
| **2FA - Disable** | `/api/v1/users/auth/2fa` | DELETE |
| **2FA - Backup Codes** | `/api/v1/users/auth/2fa/backup-codes/regenerate` | POST |
| **2FA - Token Gate** | `/api/v1/users/auth/2fa/token-gate` | PUT, PATCH |
| **Auth Tokens** | `/api/v1/auth/tokens` | GET, POST |
| **Auth Token** | `/api/v1/auth/tokens/{id}` | GET, PUT, PATCH, DELETE |
| **Auth Token Copy** | `/api/v1/auth/tokens/{id}/copy` | POST |
| **Auth Token Realms** | `/api/v1/auth/tokens/{id}/add-realm` | POST |
| **Auth Token Realms** | `/api/v1/auth/tokens/{id}/remove-realm` | POST |
| **Auth Token Me** | `/api/v1/auth/tokens/me` | GET |
| **Auth Token Profile** | `/api/v1/auth/tokens/me/public-profile` | PUT, PATCH |
| **Auth Token Public** | `/api/v1/auth/tokens/public-profiles/{public_key}` | GET |
| **Users** | `/api/v1/users/{id}` | GET, PUT, PATCH |
| **User Retry Setup** | `/api/v1/users/me/retry-setup` | POST |
| **Projects** | `/api/v1/projects/` | GET, POST |
| **Project** | `/api/v1/projects/{id}` | GET, PUT, PATCH, DELETE |
| **Project Permissions** | `/api/v1/projects/{id}/permissions` | GET, POST |
| **Project Permission** | `/api/v1/projects/{id}/permissions/{permissionId}` | PUT, PATCH, DELETE |
| **Project Stats** | `/api/v1/projects/{id}/stats` | GET |
| **Project Containers** | `/api/v1/projects/{id}/containers` | GET, POST |
| **Containers** | `/api/v1/containers/` | GET |
| **Container** | `/api/v1/containers/{id}` | GET, PUT, PATCH, DELETE |
| **Container Ops** | `/api/v1/containers/{id}/{operation}` | POST |
| **Container Copy** | `/api/v1/containers/{id}/copy` | POST |
| **Container Sync** | `/api/v1/containers/{id}/sync` | POST |
| **Container Authorize** | `/api/v1/containers/{id}/authorize` | POST |
| **Container Status Logs** | `/api/v1/containers/{id}/status-logs` | GET |
| **Container Stats** | `/api/v1/containers/{id}/stats` | GET |
| **Container Env** | `/api/v1/containers/{id}/env` | GET, PUT, PATCH |
| **Container Env Key** | `/api/v1/containers/{id}/env/{key}` | PUT, PATCH, DELETE |
| **Container Network** | `/api/v1/containers/{id}/network` | GET, PUT, PATCH, DELETE |
| **Container Network Start** | `/api/v1/containers/{id}/network/start` | POST |
| **Container Network Stop** | `/api/v1/containers/{id}/network/stop` | POST |
| **Container Firewall Rules** | `/api/v1/containers/{id}/firewall/rules` | GET |
| **Container Firewall Reset** | `/api/v1/containers/{id}/firewall/reset` | POST |
| **Container Firewall Ingress** | `/api/v1/containers/{id}/firewall/ingress` | POST, PATCH, DELETE |
| **Container Firewall Egress** | `/api/v1/containers/{id}/firewall/egress` | POST, PATCH, DELETE |
| **Container Snapshots** | `/api/v1/containers/{id}/snapshots` | GET, POST |
| **Container Snapshot** | `/api/v1/containers/{id}/snapshots/{name}` | PUT, PATCH, DELETE |
| **Container Snapshot Alias** | `/api/v1/containers/{id}/snapshots/{name}/alias` | PUT, PATCH |
| **Images Public** | `/api/v1/images/public` | GET |
| **Image Public** | `/api/v1/images/public/{id}` | GET |
| **Image Icon** | `/api/v1/images/{id}/icon` | GET |
| **Images User** | `/api/v1/images/user` | GET |
| **Image Import** | `/api/v1/images/import/{id}` | POST |
| **Image Purchase** | `/api/v1/images/purchase/{id}` | POST |
| **Image Rate** | `/api/v1/images/rate/{id}` | POST |
| **Proxy Settings** | `/api/v1/containers/{id}/proxy/settings` | GET, PUT, PATCH |
| **Proxy Groups** | `/api/v1/containers/{id}/proxy/groups` | GET |
| **Proxy Services** | `/api/v1/containers/{id}/proxy/services` | GET |
| **Proxy Service** | `/api/v1/containers/{id}/proxy/services/{service}` | GET |
| **Proxy Permissions (Container)** | `/api/v1/containers/{id}/proxy/permissions` | GET, PUT, PATCH, DELETE |
| **Proxy Permissions Default** | `/api/v1/containers/{id}/proxy/permissions/default` | PATCH |
| **Proxy Permissions State** | `/api/v1/containers/{id}/proxy/permissions/state` | PATCH |
| **Proxy Permissions Groups** | `/api/v1/containers/{id}/proxy/permissions/groups/{groupName}` | DELETE |
| **Proxy Permissions Group IP** | `/api/v1/containers/{id}/proxy/permissions/groups/{groupName}/ip` | PUT, PATCH |
| **Proxy Permissions Group JWT** | `/api/v1/containers/{id}/proxy/permissions/groups/{groupName}/jwt` | PUT, PATCH |
| **Proxy Permissions Group Password** | `/api/v1/containers/{id}/proxy/permissions/groups/{groupName}/password` | PUT, PATCH |
| **Proxy Permissions Group Token** | `/api/v1/containers/{id}/proxy/permissions/groups/{groupName}/token` | PUT, PATCH |
| **Proxy Permissions Programs** | `/api/v1/containers/{id}/proxy/permissions/permissions/{groupName}` | DELETE, PUT, PATCH |
| **Proxy Permissions Program** | `/api/v1/containers/{id}/proxy/permissions/permissions/{groupName}/{program}` | DELETE |
| **Proxy Hooks** | `/api/v1/containers/{id}/proxy/hooks` | GET |
| **Proxy Hooks Service** | `/api/v1/containers/{id}/proxy/hooks/{service}` | GET, POST, DELETE |
| **Proxy Hook** | `/api/v1/containers/{id}/proxy/hooks/{service}/{hookId}` | GET, PUT, PATCH, DELETE |
| **Proxy Hook Position** | `/api/v1/containers/{id}/proxy/hooks/{service}/{hookId}/position` | PATCH |
| **Proxy Permissions (Project)** | `/api/v1/projects/{id}/proxy/permissions` | GET, PUT, PATCH, DELETE |
| **Proxy Permissions Default (Project)** | `/api/v1/projects/{id}/proxy/permissions/default` | PATCH |
| **Proxy Permissions State (Project)** | `/api/v1/projects/{id}/proxy/permissions/state` | PATCH |
| **Proxy Permissions Groups (Project)** | `/api/v1/projects/{id}/proxy/permissions/groups/{groupName}` | DELETE |
| **Proxy Permissions Group IP (Project)** | `/api/v1/projects/{id}/proxy/permissions/groups/{groupName}/ip` | PUT, PATCH |
| **Proxy Permissions Group JWT (Project)** | `/api/v1/projects/{id}/proxy/permissions/groups/{groupName}/jwt` | PUT, PATCH |
| **Proxy Permissions Group Password (Project)** | `/api/v1/projects/{id}/proxy/permissions/groups/{groupName}/password` | PUT, PATCH |
| **Proxy Permissions Group Token (Project)** | `/api/v1/projects/{id}/proxy/permissions/groups/{groupName}/token` | PUT, PATCH |
| **Proxy Permissions Programs (Project)** | `/api/v1/projects/{id}/proxy/permissions/permissions/{groupName}` | DELETE, PUT, PATCH |
| **Proxy Permissions Program (Project)** | `/api/v1/projects/{id}/proxy/permissions/permissions/{groupName}/{program}` | DELETE |
| **Proxy Aliases** | `/api/v1/proxy/aliases` | GET, POST |
| **Proxy Alias** | `/api/v1/proxy/aliases/{id}` | GET, PATCH, DELETE |
| **Proxy Alias State** | `/api/v1/proxy/aliases/{id}/state` | PATCH |
| **Storage Shares (Container)** | `/api/v1/containers/{id}/storage/shares` | GET, POST |
| **Storage Share** | `/api/v1/containers/{id}/storage/shares/{shareId}` | GET, PATCH |
| **Storage Incoming (Container)** | `/api/v1/containers/{id}/storage/incoming` | GET |
| **Storage Incoming Mount** | `/api/v1/containers/{id}/storage/incoming/{shareId}/mount` | PATCH |
| **Storage Shares (Global)** | `/api/v1/storage/shares` | GET |
| **Storage Share Delete** | `/api/v1/storage/shares/{shareId}` | DELETE |
| **Storage Incoming (Global)** | `/api/v1/storage/incoming` | GET |
| **Vault Stats** | `/api/v1/vault/stats` | GET |
| **Vault Keys** | `/api/v1/vault/keys` | GET |
| **Vault Key** | `/api/v1/vault/keys/{key}` | GET, PUT, PATCH, DELETE |
| **Vault Clear** | `/api/v1/vault` | DELETE |
| **Wallet Balances** | `/api/v1/wallet/balances` | GET |
| **Wallet AI Balance** | `/api/v1/wallet/balances/ai` | GET |
| **Wallet General Balance** | `/api/v1/wallet/balances/general` | GET |
| **Wallet Transfers** | `/api/v1/wallet/transfers` | POST |
| **Wallet AI Fee History** | `/api/v1/wallet/ai-fee-history` | GET |
| **Wallet Payment Methods** | `/api/v1/wallet/payment-methods/` | GET, POST |
| **Wallet Payment Method** | `/api/v1/wallet/payment-methods/{id}` | GET, PUT, PATCH, DELETE |
| **Wallet Payment Method Default** | `/api/v1/wallet/payment-methods/{id}/default` | PUT, PATCH |
| **Wallet Payments** | `/api/v1/wallet/payments/` | POST |
| **Wallet Payment** | `/api/v1/wallet/payments/{id}` | GET |
| **Wallet Invoices** | `/api/v1/wallet/invoices/` | GET |
| **Wallet Invoice** | `/api/v1/wallet/invoices/{id}` | GET |
| **Wallet Invoice PDF** | `/api/v1/wallet/invoices/{id}/pdf` | GET |
| **Wallet Invoice Generate** | `/api/v1/wallet/invoices/generate/{id}` | POST |
| **Wallet Transactions** | `/api/v1/wallet/transactions` | GET |
| **Wallet Transaction** | `/api/v1/wallet/transactions/{id}` | GET |
| **Notifications** | `/api/v1/notifications/` | GET |
| **Notifications Public** | `/api/v1/notifications/public` | GET |
| **Notification Read** | `/api/v1/notifications/{id}/read` | PUT, PATCH |
| **Notifications Read All** | `/api/v1/notifications/read-all` | PUT, PATCH |
| **Events** | `/api/v1/events` | GET, DELETE |
| **Event** | `/api/v1/events/{id}` | GET, DELETE |
| **Event Stats** | `/api/v1/events/stats` | GET |
| **Event Cleanup** | `/api/v1/events/cleanup` | POST |
| **Activity Logs** | `/api/v1/users/auth/activity` | GET |
| **Activity Stats** | `/api/v1/users/auth/activity/stats` | GET |
| **AI Models** | `/api/v1/ai/models` | GET |
| **Meta Public Key** | `/api/v1/meta/public-key` | GET |
| **Meta Social Stats** | `/api/v1/meta/social-stats` | GET |
| **Realms** | `/api/v1/realms/` | GET |
| **Pools** | `/api/v1/pools` | GET, POST |
| **Pool** | `/api/v1/pools/{id}` | GET, PUT, PATCH, DELETE |
| **Pool Members** | `/api/v1/pools/{id}/members` | POST |
| **Pool Member** | `/api/v1/pools/{id}/members/{userId}` | PUT, PATCH, DELETE |
| **Pool Accept** | `/api/v1/pools/{id}/accept` | POST |
| **Pool Reject** | `/api/v1/pools/{id}/reject` | POST |
| **Pool Invitations** | `/api/v1/pools/invitations/pending` | GET |
| **Servers Available** | `/api/v1/servers/available` | GET |
| **Servers** | `/api/v1/servers` | GET |
| **Server** | `/api/v1/servers/{id}` | GET |
| **Server Rent** | `/api/v1/servers/{id}/rent` | POST |
| **Server Commands** | `/api/v1/servers/{id}/available-commands` | GET |
| **Server Execute** | `/api/v1/servers/{id}/execute-command` | POST |
| **Rentals** | `/api/v1/rentals` | GET |
| **Rental** | `/api/v1/rentals/{id}` | GET |
| **Rental Extend** | `/api/v1/rentals/{id}/extend` | POST |
| **IP Info** | `/api/v1/ip` | GET |

### Essential Parameters

| Resource | Key Parameters |
|----------|---------------|
| **Containers** | `id` (path), `operation` (path: start/stop/restart/pause/resume/force-stop) |
| **Firewall** | `id` (path), `protocol`, `port`, `source`/`destination`, `action`, `state` |
| **Env Vars** | `id` (path), `key` (path), `value` (body) |
| **Snapshots** | `id` (path), `name` (path), `alias` (body) |
| **Proxy Hooks** | `id` (path), `service` (path), `hookId` (path), `If-Match` (header) |
| **Proxy Permissions** | `groupName` (path), `program` (path), `If-Match` (header) |
| **Storage Shares** | `id` (path), `shareId` (path), `path`, `target_container_id`, `mode`, `mount_path` |
| **Vault** | `key` (path), `value` (body) |
| **Wallet** | `amount` (string, USD), `payment_method_id` |
| **Pools** | `id` (path), `userId` (path), `role` |
| **Servers** | `id` (path), `days` (body) |
| **Events** | `before` (filter), `retention_days` |

### Typical Response Format

All endpoints return a consistent response structure:

```
{
  "success": true,
  "data": {}
}
```

Paginated responses include:

```
{
  "success": true,
  "data": [],
  "pagination": {
    "page": 1,
    "per_page": 20,
    "total": 100,
    "total_pages": 5
  }
}
```

Error responses:

```
{
  "success": false,
  "error": {
    "code": "NOT_FOUND",
    "message": "Resource not found"
  }
}
```

### Proxy URL Pattern

All Hoody Kit services (except Hoody API) use:

```
https://{projectId}-{containerId}-{serviceName}-{serviceId}.{node}.containers.hoody.icu
```

### Key Headers

| Header | Purpose |
|--------|---------|
| `Authorization: Bearer {token}` | Authentication (JWT or auth token) |
| `If-Match: file:v{N}` | Optimistic concurrency for proxy config |
| `Content-Type: application/json` | Request body format |