Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Greens-Organization/pz-packs/llms.txt
Use this file to discover all available pages before exploring further.
Introduction
The PZ Packs API is a RESTful API built with Elysia that enables programmatic access to manage Project Zomboid mod collections (modpacks), mods, members, and notifications.Base URL
The API is available at:In production, the base URL will be your deployed API endpoint. Replace
localhost:3001 with your production domain.API Structure
The API is organized into the following resource groups:- Modpacks (
/modpacks) - Create and manage mod collections - Mods (
/mods) - Browse and manage individual mods - Members (
/modpacks/:id/members) - Manage modpack collaborators - Notifications (
/notifications) - User notification management - Admin (
/admin) - Administrative endpoints - Auth (
/auth) - Authentication endpoints (Better Auth)
Request Format
All API requests use JSON format. Include the appropriateContent-Type header:
Example Request
Response Format
All API responses return JSON with appropriate HTTP status codes.Success Response
Error Response
Error responses include anerror object with a descriptive message:
HTTP Status Codes
The API uses standard HTTP status codes:| Status Code | Description |
|---|---|
200 | Success |
201 | Resource created successfully |
204 | Success with no content |
400 | Bad request (validation error) |
401 | Unauthorized (not authenticated) |
403 | Forbidden (authenticated but not authorized) |
404 | Resource not found |
422 | Unprocessable entity (validation failed) |
500 | Internal server error |
Pagination
List endpoints support pagination through query parameters:page- Page number (default: 1)limit- Items per page (default: 20)
Filtering and Searching
Many list endpoints support filtering:search- Text search across relevant fieldstags- Filter by tags (comma-separated)modpackId- Filter by modpack ID
Public vs Authenticated Endpoints
Some endpoints are publicly accessible without authentication:GET /modpacks/public- List public modpacksGET /modpacks/public/:id- Get public modpack detailsGET /mods- List all modsGET /mods/:id- Get mod detailsGET /mods/tags- List all tags
Permissions and Authorization
Authenticated endpoints use role-based access control (RBAC) with two roles:User Role
Modpack permissions:create- Create new modpacksread- View own/shared modpacksupdate- Update own modpacksarchive- Archive own modpacksexport- Export server filesadd-mod- Add mods to modpacksremove-mod- Remove mods from modpacksimport- Import from Steam collectionsmanager-members- Manage modpack members
create,read,update,remove- Standard CRUD operations
read,update- View and update notifications
Admin Role
Admins have all user permissions plus:mod.update-all- Trigger global mod updatesadmin.access- Access admin endpoints
Rate Limiting
Rate limiting is currently not implemented. In production deployments, consider implementing rate limiting at the infrastructure level (e.g., using a reverse proxy or API gateway).
CORS Configuration
The API is configured with CORS support:- Allowed Origins: Configured via
ORIGIN_ALLOWEDenvironment variable (comma-separated list) - Allowed Methods:
GET,POST,PUT,PATCH,DELETE,OPTIONS - Credentials: Enabled (cookies are supported)
- Allowed Headers:
Content-Type,Authorization
OpenAPI Documentation
In development mode, interactive API documentation is available via Elysia’s OpenAPI plugin:OpenAPI documentation is automatically disabled in production (
NODE_ENV=production).Health Check
Monitor API availability using the health check endpoint:Next Steps
Authentication
Learn how to authenticate API requests
Modpack Endpoints
Explore modpack API endpoints