Frontend API
Endpoints
Section titled “Endpoints”| Method | Path | Purpose |
|---|---|---|
| POST | /v1/{app_id}/frontend/deployments | Create a deployment |
| POST | /v1/{app_id}/frontend/deployments/{id}/start | Start a deployment |
| GET | /v1/{app_id}/frontend/deployments | List deployment history |
| GET | /v1/{app_id}/frontend/deployments/{id} | Get deployment details |
| POST | /v1/{app_id}/frontend/deployments/{id}/sync | Force-sync status |
| POST | /v1/{app_id}/frontend/deployments/{id}/cancel | Cancel deployment |
| DELETE | /v1/{app_id}/frontend/deployments/{id} | Delete a deployment |
| PUT | /v1/{app_id}/frontend/env | Set environment variables |
| GET | /v1/{app_id}/frontend/env | List environment variable keys |
Create deployment
Section titled “Create deployment”POST /v1/{app_id}/frontend/deploymentsAuthorization: Bearer {token}
{ "framework": "react-vite"}Response:
{ "id": "deployment-uuid", "uploadUrl": "https://...", "expiresIn": 900, "maxSizeBytes": 104857600}Framework values
Section titled “Framework values”| Framework | Value |
|---|---|
| React (Vite) | react-vite |
| Next.js (static) | nextjs-static |
| Static HTML | static |
| Other | other |
Upload and start
Section titled “Upload and start”Upload zip:
curl -X PUT "{uploadUrl}" \ -H "Content-Type: application/zip" \ --data-binary @frontend.zipStart deployment:
POST /v1/{app_id}/frontend/deployments/{id}/startDeployment statuses
Section titled “Deployment statuses”| Status | Meaning |
|---|---|
WAITING | Created, awaiting upload |
UPLOADING | Processing |
BUILDING | Building |
READY | Succeeded |
ERROR | Failed |
CANCELED | Canceled |
Environment variables
Section titled “Environment variables”PUT /v1/{app_id}/frontend/env
{ "VITE_API_URL": "https://api.butterbase.ai/v1/app_abc123", "NEXT_PUBLIC_API_KEY": "pk_test_123"}Values are encrypted at rest. Only keys are returned when listing.
Limits
Section titled “Limits”| Limit | Value |
|---|---|
| Max size | 100 MB (compressed) |
| Upload expiration | 15 minutes |
| Free plan | 1 active deployment |
| Pro plan | Unlimited |